Skip to content

Commit cada3e8

Browse files
committed
ci: move scripts inline to yml configuration to work around issues with script pathing in CI.
1 parent aa4565b commit cada3e8

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

.github/workflows/pull_request.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727
image: "swift:6.0-noble"
2828
steps:
2929
- name: WasmBuild
30-
# TODO: Update this to use swift-nio once https://github.com/apple/swift-nio/pull/3159/ is merged
30+
# TODO: Update this to use swift-nio once https://github.com/apple/swift-nio/pull/3159/ is merged
3131
run: |
32-
apt-get update -y -q && apt-get install -y -q curl && $workspace/scripts/install_wasm_sdk.sh
33-
swift build --swift-sdk wasm32-unknown-wasi
32+
apt-get update -y -q
33+
apt-get install -y -q curl
34+
version="$(swift --version | head -n1)"
35+
tag="$(curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/tag-by-version.json" | jq -e -r --arg v "$version" '.[$v] | .[-1]')"
36+
curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/builds/$tag.json" | jq -r '.["swift-sdks"]["wasm32-unknown-wasi"] | "swift sdk install \"\(.url)\" --checksum \"\(.checksum)\""' | sh -x
37+
swift build --swift-sdk wasm32-unknown-wasi

scripts/install_wasm_sdk.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)