You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift SDK installation script improvements (#3429)
Swift SDK installation script improvements
### Motivation:
The SDK installation scripts had a few rough edges and didn't verify the
artefacts they downloaded.
### Modifications:
* Change naming to the more accurate "Swift SDK" where we can without
breaking downstream adopters.
* Separate Android NDK installation into its own script.
* Avoid using `cd` when setting up Android NDK.
* Verify checksums for SDKs and signatures for toolchains.
* Specify/control the SDK directory.
### Result:
* More accurate naming.
* More maintainable scripts.
* More secure downloads.
An example of this working
https://github.com/apple/swift-nio/actions/runs/18944235613/job/54090944716?pr=3429
log "Using Swift SDK directory: $swift_sdk_directory"
26
+
18
27
# Select the Swift SDK for WebAssembly, not the Embedded one
19
-
SWIFT_SDK="$(swift sdk list | grep _wasm | grep -v -embedded | head -n1)"
28
+
SWIFT_SDK="$(swift sdk list --swift-sdks-path "$swift_sdk_directory"| grep _wasm | grep -v -embedded | head -n1)"
20
29
if [[ -z"$SWIFT_SDK" ]];then
21
-
echo"No WebAssembly Swift SDK found. Please ensure you have the WebAssembly Swift SDK installed following https://www.swift.org/documentation/articles/wasm-getting-started.html."
22
-
exit 1
30
+
fatal "No WebAssembly Swift SDK found. Please ensure you have the WebAssembly Swift SDK installed following https://www.swift.org/documentation/articles/wasm-getting-started.html."
23
31
fi
24
32
25
-
echo"Using Swift SDK: $SWIFT_SDK"
26
-
swift build --swift-sdk "$SWIFT_SDK""${@}"
33
+
log "Building using Swift SDK: $SWIFT_SDK"
34
+
swift build --swift-sdk "$SWIFT_SDK"--swift-sdks-path "$swift_sdk_directory""${@}"
0 commit comments