-
Notifications
You must be signed in to change notification settings - Fork 33
Add jobs for Linux static SDK and Wasm SDK builds #142
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
|
Thank you for adding support for static sdk, can you please add a check in https://github.com/swiftlang/github-workflows/blob/main/.github/workflows/pull_request.yml to make sure we don't regress the static sdk check in the future. |
|
Yes will do. I think I'll also add support for more Swift versions, so we could also test with the 6.1 release static SDK, etc. if desired |
e99b1d9 to
47757d7
Compare
| run: | | ||
| ${{ inputs.linux_static_sdk_pre_build_command }} | ||
| which curl || (apt -q update && apt -yq install curl) | ||
| curl -s --retry 3 https://raw.githubusercontent.com/jrflat/github-workflows/refs/heads/linux-static-sdk-build/.github/workflows/scripts/install-and-build-with-sdk.sh | \ |
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.
Will change this to swiftlang/github-workflows/refs/heads/main before merging, but I wanted to get testing in this PR.
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.
Updated in 85552f9
.github/workflows/pull_request.yml
Outdated
| enable_windows_docker: true | ||
| # TODO: jflat - Remove after PR testing | ||
| linux_static_sdk_versions: "[\"6.0\", \"6.1\", \"nightly-main\", \"nightly-6.2\"]" | ||
| wasm_sdk_versions: "[\"nightly-main\", \"nightly-6.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.
Will remove these before merging so that only the default versions (nightly-6.2) are tested, but I wanted to get more extended coverage when testing this PR.
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.
Removed in 85552f9
|
Seems like #140 should prevent the Xcode 16.0 and 16.1 failures (by removing them). |
|
Updated the script URL to point to Passing tests from the previous commit for reference: https://github.com/swiftlang/github-workflows/pull/142/checks?sha=47757d7ea31678a1e11791bf5a9fd248659508c5 |
|
@shahmishal if the above merge strategy sounds good to you would you mind merging this? Another option could be to merge the script first, and then enable the PR tests separately, but I figured it would be easier to do it in one go. |
|
thanks! |
This PR adds
linux-static-sdk-buildandwasm-sdk-buildjobs to theswift_package_test.ymlworkflow. These jobs use a new scriptinstall-and-build-with-sdk.shthat finds the latest Linux static or Wasm SDKs for the given Swift version, downloads a matching toolchain if needed, and runs<swift-executable> build --swift-sdk <sdk-name> <flags>.The script is called with the following parameters
such as
The
swift_package_test.ymlworkflow includes new inputs:enable_linux_static_sdk_build: boolean(default:false)linux_static_sdk_versions: string(default:"[\"nightly-6.2\"]")linux_static_sdk_pre_build_command: string(default:"")enable_wasm_sdk_build: boolean(default:false)wasm_sdk_versions: string(default:"[\"nightly-6.2\"]")wasm_sdk_pre_build_command: string(default:"")The jobs run on a Ubuntu container with the provided Swift version to maximize the chance that the installed toolchain snapshot will match the static or Wasm SDK snapshot. However, even if they don't match, the script will find and download the correct toolchain and use the correct Swift executable in the build command. For instance, I tested a variety of versions like 6.0, 6.1, and nightly-6.2 on a container with a Swift main snapshot, and the script downloads and uses the respective 6.0, 6.1, and nightly-6.2 toolchains to build.
Note that inputting an older Swift version where the corresponding SDK isn't available, such as
wasm_sdk_versions: "[\"6.0\"]", will still result in an error.