Skip to content

Commit

Permalink
Add new platforms (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahsmartin authored Feb 12, 2024
1 parent 3b4cad1 commit 87d669a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Xcode select
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'
- name: Show destinations
run: xcodebuild -scheme ETTrace -showdestinations
- name: Build ETTrace for iOS Simulator
run: xcodebuild build -scheme ETTrace -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' CLANG_CXX_LANGUAGE_STANDARD=c++17
- name: Build ETTrace for iOS
run: xcodebuild build -scheme ETTrace -sdk iphoneos -destination 'generic/platform=iOS' CLANG_CXX_LANGUAGE_STANDARD=c++17
- name: Build ETTrace for macOS
run: xcodebuild build -scheme ETTraceRunner -sdk macosx -destination 'generic/platform=macOS' ONLY_ACTIVE_ARCH=NO
run: xcodebuild build -scheme ETTraceRunner -sdk macosx -destination 'generic/platform=macOS' ONLY_ACTIVE_ARCH=NO
- name: Build ETTrace for tvOS
run: xcodebuild build -scheme ETTrace -sdk appletvos -destination 'generic/platform=tvOS' ONLY_ACTIVE_ARCH=NO
- name: Build ETTrace for tvOS Simulator
run: xcodebuild build -scheme ETTrace -sdk appletvsimulator -destination 'generic/platform=tvOS Simulator' ONLY_ACTIVE_ARCH=NO
- name: Build ETTrace for visionOS
run: xcodebuild build -scheme ETTrace -sdk xros -destination 'generic/platform=visionOS' ONLY_ACTIVE_ARCH=NO
- name: Build ETTrace for visionOS Simulator
run: xcodebuild build -scheme ETTrace -sdk xrsimulator -destination 'generic/platform=visionOS Simulator' ONLY_ACTIVE_ARCH=NO
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:

jobs:
release:
runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Xcode select
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'
- name: Setup Signing Certificate
uses: apple-actions/import-codesign-certs@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "ETTrace",
platforms: [.iOS(.v13), .macOS(.v12)],
platforms: [.iOS(.v13), .macOS(.v12), .tvOS(.v13), .visionOS(.v1)],
products: [
.library(
name: "ETTrace",
Expand Down
22 changes: 22 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,29 @@ xcodebuild archive \
SKIP_INSTALL=NO \
CLANG_CXX_LANGUAGE_STANDARD=c++17

xcodebuild archive \
-scheme ETTrace \
-archivePath ./ETTrace-tvOSSimulator.xcarchive \
-sdk appletvsimulator \
-destination 'generic/platform=tvOS Simulator' \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
INSTALL_PATH='Library/Frameworks' \
SKIP_INSTALL=NO \
CLANG_CXX_LANGUAGE_STANDARD=c++17

xcodebuild archive \
-scheme ETTrace \
-archivePath ./ETTrace-visionOSSimulator.xcarchive \
-sdk xrsimulator \
-destination 'generic/platform=visionOS Simulator' \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
INSTALL_PATH='Library/Frameworks' \
SKIP_INSTALL=NO \
CLANG_CXX_LANGUAGE_STANDARD=c++17

xcodebuild -create-xcframework \
-framework ./ETTrace-iphonesimulator.xcarchive/Products/Library/Frameworks/ETTrace.framework \
-framework ./ETTrace-iphoneos.xcarchive/Products/Library/Frameworks/ETTrace.framework \
-framework ./ETTrace-visionOSSimulator.xcarchive/Products/Library/Frameworks/ETTrace.framework \
-framework ./ETTrace-tvOSSimulator.xcarchive/Products/Library/Frameworks/ETTrace.framework \
-output ./ETTrace.xcframework

0 comments on commit 87d669a

Please sign in to comment.