-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add SwiftPM GitHub CI support #5
base: main
Are you sure you want to change the base?
Conversation
I'm also considering adding Xcode CI in this PR. But I encounter some strange issue when using xcodebuild build \
-scheme Life \
-configuration Release \
-skipMacroValidation -skipPackagePluginValidation \
-destination "platform=macos" The error message is as following
I can't solve it in a short time. So I guess we can add the SwiftPM CI first which at least provides a layer of promise that new PR will not break SwiftPM build. |
fail-fast: false | ||
matrix: | ||
os: [macos-13, macos-14] | ||
xcode-version: ["15.2"] |
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.
Xcode version does not matter here on SwiftPM CI as we are using nightly Swift toolchain here.
Xcode 15.3 is not used because the upstream runner does not support it yet.
- uses: SwiftyLab/setup-swift@latest | ||
with: | ||
development: true | ||
swift-version: latest |
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.
Do you prefer to use the latest nightly toolchain or use a fixed nightly version here?
id: playdate | ||
uses: pd-rs/[email protected] | ||
with: | ||
version: 2.4.1 |
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.
- Fixed version: "2.4.1" (The current latest version)
- Fixed version: "2.1.1" (Aligned with the current documentation description and screenshot)
- Dynamic version: "latest" (Update automatically when there is a new version)
- name: Build with SwiftPM for ${{ matrix.TARGET }} | ||
working-directory: Examples/${{ matrix.TARGET }} | ||
run: | | ||
swift build -c release |
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.
TOOLCHAIN=xx
is injected into env
automatically in SwiftyLab/setup-swift@latest
step
@DougGregor I'm not sure about the Swift project's policy regarding CI with Github Actions currently, could you chime in? |
IIRC, we should ask @shahmishal for Swift CI related thing Related Post: https://forums.swift.org/t/dropping-support-for-swift-ci-test-and-merge-in-favor-of-auto-merge-feature-on-github/68297 |
Apple has GitHub actions disabled at the organization level, so running for PRs won't have any effect - individuals can enable GitHub actions on their own forks if they are so inclined. ci.swift.org is used for testing most other swift-family projects. |
Is there any existing CI workflow on ci.swift.org for this repo. Do we need to add such CI to ci.swift.org for this repo or enable GitHub action for this repo? @rauhul |
I have tested this on my fork. You can check it here