-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI to Xcode 15.1 & run builds for iOS, watchOS, tvOS (#231)
- Adds new CI jobs to build the library against macOS, iOS, tvOS, and watchOS rather than only the default environment (macOS) - Updates `@available` annotations to properly accommodate these additional platforms - Updates CI to use Xcode 15.1 Originally the intent was to run tests on each platform, but for some reason GitHub runners are refusing to cooperate and jobs are stalling. Instead, we'll continue running `swift test` which runs tests on the host environment (macOS) and will use `xcodebuild` to build for each platform since it allows for specifying a target SDK/environment (see [this question](https://stackoverflow.com/questions/60245159/how-can-i-build-a-swift-package-for-ios-over-command-line) and [these notes](https://www.jessesquires.com/blog/2021/11/03/swift-package-ios-tests/)). Follow-up to #227 and related to #226.
- Loading branch information
Showing
7 changed files
with
67 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,45 +8,84 @@ on: | |
permissions: | ||
contents: read | ||
jobs: | ||
build-connect-library: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
- name: Build Connect library | ||
run: make buildpackage | ||
build-eliza-cocoapods-example: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Build Eliza CocoaPods example | ||
run: | | ||
cd Examples/ElizaCocoaPodsApp | ||
pod install | ||
xcodebuild -workspace ElizaCocoaPodsApp.xcworkspace -scheme ElizaCocoaPodsApp build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
set -o pipefail && xcodebuild -workspace ElizaCocoaPodsApp.xcworkspace -scheme ElizaCocoaPodsApp build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcbeautify | ||
build-eliza-swiftpm-example: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Build Eliza Swift PM example | ||
run: | | ||
cd Examples/ElizaSwiftPackageApp | ||
xcodebuild -scheme ElizaSwiftPackageApp build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
set -o pipefail && xcodebuild -scheme ElizaSwiftPackageApp build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcbeautify | ||
build-library-ios: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Build Connect iOS library | ||
run: set -o pipefail && xcodebuild -scheme Connect-Package -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' | xcbeautify | ||
build-library-macos: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Build Connect macOS library | ||
run: set -o pipefail && xcodebuild -scheme Connect-Package -destination 'platform=macOS' | xcbeautify | ||
build-library-tvos: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Build Connect tvOS library | ||
run: set -o pipefail && xcodebuild -scheme Connect-Package -destination 'platform=tvOS Simulator,name=Apple TV,OS=17.2' | xcbeautify | ||
build-library-watchos: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Build Connect watchOS library | ||
run: set -o pipefail && xcodebuild -scheme Connect-Package -destination 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm),OS=10.2' | xcbeautify | ||
build-plugin-and-generate: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
|
@@ -63,8 +102,8 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- name: Set up docker (missing on macOS GitHub runners) | ||
# https://github.com/actions/runner-images/issues/2150 | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Select Xcode version | ||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
# https://github.com/actions/runner-images/releases/tag/macos-13%2F20231218.2 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters