From 87d669a8f822bd425ff1bd028e5486eda682b5ba Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Mon, 12 Feb 2024 14:26:14 -0500 Subject: [PATCH] Add new platforms (#73) --- .github/workflows/build.yml | 14 ++++++++++++-- .github/workflows/release.yml | 4 +++- Package.swift | 4 ++-- build.sh | 22 ++++++++++++++++++++++ 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18bd0ac..ca7be82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,11 +7,13 @@ 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 @@ -19,4 +21,12 @@ jobs: - 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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97bb22d..b72005a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/Package.swift b/Package.swift index 2c60912..a1ee440 100644 --- a/Package.swift +++ b/Package.swift @@ -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", diff --git a/build.sh b/build.sh index 73b337b..d400564 100755 --- a/build.sh +++ b/build.sh @@ -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 \ No newline at end of file