-
Notifications
You must be signed in to change notification settings - Fork 32
Update CI to Xcode 15.1 & run builds for iOS, watchOS, tvOS #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updates CI to run tests against macOS, iOS, tvOS, and watchOS rather than only the default environment (macOS) - Switches from using `swift test` to `xcodebuild test` since the former does not allow 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/)) - Updates `@available` annotations to properly accomodate these additional platforms Follow-up to #227 and related to #226.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one suggestion/idea.
Makefile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I am doing this unnecessarily, but one thing I always add when running this in my own CI jobs is set -o pipefail
so that encountered errors will properly fail the job.
Also, I brew install xcbeautify
and pipe the output of the xcodebuild command to xcbeautify to make the log output way more manageable.
So my invocations would look something like this (note that I normally put the test
earlier in the command - no logical difference):
set -o pipefail && xcodebuild test -scheme Connect-Package -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0.1' | xcbeautify
Not sure why the CI is failing, but I do know that we've had issues since moving to Xcode 15 in Actions on my own projects. I see that Xcode 15.1 has just been released, and there's a pending issue to get the actions runners updated with it. 🤞 |
Yeah I'm not really sure why these are failing either - the job seems to just hang during compilation despite it passing in a reasonable time locally. Can you link the issue you're referring to? |
Seems imminent: actions/runner-images#8997 |
Looks like 15.1 didn't fix the issue on the GitHub runners. I updated the PR and its description to instead build for each platform (which does work on GitHub runners) and run tests the same way we do today on macOS. Tests are green now |
@available
annotations to properly accommodate these additional platformsOriginally 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 usexcodebuild
to build for each platform since it allows for specifying a target SDK/environment (see this question and these notes).Follow-up to #227 and related to #226.