Add workflow to build packages for iOS.#169
Merged
shahmishal merged 3 commits intoswiftlang:mainfrom Oct 22, 2025
Merged
Conversation
Add workflow to build packages for iOS on a macOS VM. Can't run tests at this time, but we can at least confirm source compiles.
5c049c8 to
ae72e5b
Compare
stmontgomery
reviewed
Oct 1, 2025
kkebo
reviewed
Oct 8, 2025
| ios_build_command: | ||
| type: string | ||
| description: "macOS command to build the package for iOS" | ||
| default: "xcrun swift build --build-tests --sdk \"$(xcrun --sdk iphoneos --show-sdk-path)\" --triple arm64-apple-ios" |
Contributor
There was a problem hiding this comment.
IMHO, it would be better to use $(xcrun -f swift) instead of xcrun swift.
xcrun swift is fine with packages that do not contain executableTarget, but it causes the following errors with packages that contain executableTarget:
clang: warning: using sysroot for 'MacOSX' but targeting 'iPhone' [-Wincompatible-sysroot]
To prevent this, you can use $(xcrun -f swift) instead of xcrun swift.
Related discussion: https://forums.swift.org/t/getting-incompatible-sysroot-warning-when-compiling-for-ios-with-sdk-and-target-set/80584
You can easily reproduce this issue by the following steps:
mkdir foo && cd foo
swift package init --type executable --name Foo
xcrun swift build --sdk "$(xcrun --sdk iphoneos --show-sdk-path)" --triple arm64-apple-ios
shahmishal
approved these changes
Oct 22, 2025
grynspan
added a commit
to swiftlang/swift-testing
that referenced
this pull request
Oct 23, 2025
Enable iOS GitHub Actions workflow added in swiftlang/github-workflows#169.
2 tasks
grynspan
added a commit
to swiftlang/swift-testing
that referenced
this pull request
Oct 23, 2025
Enable iOS GitHub Actions workflow added in swiftlang/github-workflows#169. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add workflow to build packages for iOS on a macOS VM. Can't run tests at this time, but we can at least confirm source compiles.