-
Notifications
You must be signed in to change notification settings - Fork 23
Add workflow for testing Musl #40
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,10 @@ on: | |
type: string | ||
description: "Linux command to execute before building the Swift package" | ||
default: "" | ||
musl_pre_build_command: | ||
type: string | ||
description: "Linux command to execute before building the Swift package" | ||
default: "" | ||
linux_build_command: | ||
type: string | ||
description: "Linux Build command default is swift test" | ||
|
@@ -35,13 +39,21 @@ on: | |
type: string | ||
description: "Linux Build command default is swift test" | ||
default: "swift test" | ||
musl_build_command: | ||
type: string | ||
description: "MUSL Build command default is swift test" | ||
default: "swift test" | ||
linux_env_vars: | ||
description: "List of environment variables" | ||
type: string | ||
enable_windows_checks: | ||
type: boolean | ||
description: "Boolean to enable windows testing. Defaults to true." | ||
default: true | ||
enable_musl_checks: | ||
type: boolean | ||
description: "Boolean to enable musl testing. Defaults to true." | ||
default: true | ||
|
||
jobs: | ||
linux-build: | ||
|
@@ -110,3 +122,27 @@ jobs: | |
- name: Build / Test | ||
timeout-minutes: 60 | ||
run: docker run -v ${{ github.workspace }}:C:\source swiftlang/swift:${{ matrix.swift_version }}-windowsservercore-1809 cmd /s /c "swift --version & swift test --version & cd C:\source\ & ${{ inputs.windows_build_command }} ${{ inputs.swift_nightly_flags }}" | ||
|
||
musl-build: | ||
name: MUSL | ||
if: ${{ inputs.enable_musl_checks }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
container: swift:6.0-noble | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version here must be exactly the same as the SDK below. As of today (30/10) I suggest to pass both the Swift version number and the checksum as parameters |
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Install SDK | ||
run: swift sdk install https://download.swift.org/swift-6.0.1-release/static-sdk/swift-6.0.1-RELEASE/swift-6.0.1-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum d4f46ba40e11e697387468e18987ee622908bc350310d8af54eb5e17c2ff5481 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we want a hardcoded checksum/artifact url hardcoded here? Or should they be inputs |
||
- name: Set environment variables | ||
if: ${{ inputs.linux_env_vars }} | ||
run: | | ||
for i in "${{ inputs.linux_env_vars }}" | ||
do | ||
printf "%s\n" $i >> $GITHUB_ENV | ||
done | ||
- name: Pre-build | ||
run: ${{ inputs.musl_pre_build_command }} | ||
- name: Build / Test | ||
run: ${{ inputs.musl_build_command }} ${{ inputs.swift_flags }} |
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.
I think the description here just needs updated, as it's the same as the linux_pre_build_command