Skip to content
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

build: Build Swift SDK for WebAssembly #72728

Merged
merged 3 commits into from
May 23, 2024

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Mar 30, 2024

This change adds a new product, WasmSwiftSDK, to build the Swift SDK for WebAssembly. The product is built using the swift-sdk-generator package and takes just built WebAssembly stdlib, clang runtime libraries, and wasi-sysroot as input, and produces a Swift SDK artifactbundle under swift-sdk-generator/Bundles.

The main purpose of building SDK on CI is to test WebAssembly target-specific code in SwiftPM like test runner for now

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly platform

@kateinoigakukun
Copy link
Member Author

Hmm, CI is still using Swift 5.8 but swift-sdk-generator requires 5.9. We might need to wait swiftlang/swift-docker#368 or relax minimum version requirement on swift-sdk-generator? CC: @MaxDesiatov

@MaxDesiatov
Copy link
Contributor

I think lowering the requirement to 5.8 should be possible, I will look into that.

@MaxDesiatov
Copy link
Contributor

@swift-ci test WebAssembly

2 similar comments
@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@MaxDesiatov
Copy link
Contributor

@swift-ci test WebAssembly

@MaxDesiatov
Copy link
Contributor

Looks like there's some bug with CI status propagation. A build seems to be running, but its status is not reflected in the list of current PR checks 😞

@MaxDesiatov MaxDesiatov added continuous integration cross-compilation Area → utils: Cross-compilation of project sources WebAssembly Platform: WebAssembly labels Apr 23, 2024
@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun kateinoigakukun marked this pull request as ready for review April 26, 2024 06:04
@shahmishal shahmishal requested review from etcwilde and edymtt April 30, 2024 14:55
@kateinoigakukun kateinoigakukun force-pushed the yt/wasm-sdk-generator branch from 5715425 to a0ff5f1 Compare May 4, 2024 06:38
@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@MaxDesiatov MaxDesiatov requested review from edymtt and al45tair May 7, 2024 09:24
@kateinoigakukun kateinoigakukun force-pushed the yt/wasm-sdk-generator branch from a0ff5f1 to 3cbc37e Compare May 21, 2024 07:55
@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test Linux platform

This change adds a new product, WasmSwiftSDK, to build the Swift SDK for
WebAssembly. The product is built using the swift-sdk-generator package
and takes just built WebAssembly stdlib, clang runtime libraries,
and wasi-sysroot as input, and produces a Swift SDK artifactbundle under
swift-sdk-generator/Bundles.
swift-nio and swift-async-algorithms have been updated to support
`SWIFTCI_USE_LOCAL_DEPS` convention. This change updates them to the
versions including the support.
Just built Swift SDK would be useful for SwiftPM to perform integration
tests. All of those products do not depend on just built SwiftPM
(WasmKit is built using host tools), so it is safe to build them earlier.
@kateinoigakukun kateinoigakukun force-pushed the yt/wasm-sdk-generator branch from 3cbc37e to 1148e26 Compare May 22, 2024 14:14
@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun kateinoigakukun merged commit 33323a8 into swiftlang:main May 23, 2024
4 checks passed
@kateinoigakukun
Copy link
Member Author

@shahmishal Could you add swift-sdk-generator repository to checkout in CI infrastructure? 🙏

@@ -123,7 +125,7 @@
"swift-crypto": "3.0.0",
"swift-certificates": "1.0.1",
"swift-asn1": "1.0.0",
"swift-async-algorithms": "1.0.0",
"swift-async-algorithms": "main",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we are using main branch now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use a revision including apple/swift-async-algorithms@6ae9a05 to make SDK generator build work.
But it's not ideal situation, so I asked a new release including the fix just now apple/swift-async-algorithms#314

@kateinoigakukun
Copy link
Member Author

@shahmishal Gentle ping🙏

MaxDesiatov added a commit that referenced this pull request Jun 17, 2024
We've temporarily unpinned this repository in #72728 to get recent changes. Now a new tag is available, we should pin it again.
kateinoigakukun pushed a commit to kateinoigakukun/swift that referenced this pull request Jun 26, 2024
We've temporarily unpinned this repository in swiftlang#72728 to get recent changes. Now a new tag is available, we should pin it again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous integration cross-compilation Area → utils: Cross-compilation of project sources WebAssembly Platform: WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants