-
Notifications
You must be signed in to change notification settings - Fork 722
[wasm][1/2] Add reusable WebAssembly workflow #3331
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
Merged
Lukasa
merged 1 commit into
apple:main
from
kateinoigakukun:katei/add-reusable-wasm-workflow
Aug 4, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: WebAssembly SDK | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| wasm-sdk: | ||
| name: WebAssembly Swift SDK | ||
| uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main | ||
| with: | ||
| enable_wasm_sdk_build: true | ||
| enable_linux_checks: false | ||
| enable_windows_checks: false | ||
| swift_flags: --target NIOCore | ||
| swift_nightly_flags: --target NIOCore | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
FYI: Thanks to swiftlang/github-workflows#149, these two lines can be shortened into one line.
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.
IIRC
swift_nightly_flagsin absence of a defined value is auto-populated fromswift_flags, so the workflow here should just specify the latter without a need forwasm_sdk_build_command.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.
@MaxDesiatov That's incorrect.
swift_nightly_flagsis not inherited fromswift_flags.https://github.com/swiftlang/github-workflows/blob/1f5e7cde8ba1fd63b9ec36f624453a6fc4420043/.github/workflows/swift_package_test.yml#L330
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 may be missing something, but there's
|| inputs.swift_flagson the line you've linked to?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.
Yes, I linked to the following line.
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.
This is a ternary operator.
Uh oh!
There was an error while loading. Please reload this page.
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 don't think so. If
swift_nightly_flagsis undefined, the first operand of||is falsy, which then evaluates to the second operandswift_flags. You can also seeswift_flagsrespected for nightlies in this workflow, whereswift_nightly_flagsis not defined at all https://github.com/swiftlang/swift-for-wasm-examples/blob/main/.github/workflows/pull_request.ymlUh oh!
There was an error while loading. Please reload this page.
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.
Sorry, I was wrong. I didn't expect that the empty string was falsy. Thank you.