Skip to content

Commit 29f9993

Browse files
authored
Migrating to swift wasm on for github actions (#8814)
Migrate to use the native SDK for Wasm that's built for swift
1 parent 597e76a commit 29f9993

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,17 +530,20 @@ jobs:
530530
build-swift-wasm:
531531
name: Test Swift Wasm
532532
runs-on: ubuntu-24.04
533-
container:
534-
image: ghcr.io/swiftwasm/carton:0.20.1
535533
steps:
536534
- uses: actions/checkout@v3
537-
- uses: bytecodealliance/actions/wasmtime/setup@v1
538-
- uses: swiftwasm/setup-swiftwasm@v1
535+
- uses: swift-actions/setup-swift@v2
539536
with:
540-
swift-version: "wasm-6.0.2-RELEASE"
537+
swift-version: 6.2.1
538+
- uses: bytecodealliance/actions/wasmtime/setup@v1
539+
- name: Install Swift SDK
540+
run: swift sdk install https://download.swift.org/swift-6.2.1-release/wasm-sdk/swift-6.2.1-RELEASE/swift-6.2.1-RELEASE_wasm.artifactbundle.tar.gz --checksum 482b9f95462b87bedfafca94a092cf9ec4496671ca13b43745097122d20f18af
541541
- name: Test
542542
working-directory: tests/swift/Wasm.tests
543-
run: swift run carton test
543+
run: |
544+
swift sdk list
545+
swift build --build-tests --swift-sdk swift-6.2.1-RELEASE_wasm
546+
wasmtime --dir . .build/wasm32-unknown-wasip1/debug/FlatBuffers.Test.Swift.WasmPackageTests.xctest
544547
545548
build-ts:
546549
name: Build TS
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
wasm-6.0.2-RELEASE
1+
6.2.1

tests/swift/Wasm.tests/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let package = Package(
2424
],
2525
dependencies: [
2626
.package(path: "../../.."),
27-
.package(url: "https://github.com/swiftwasm/carton", exact: "1.1.2"),
27+
.package(url: "https://github.com/swiftwasm/WasmKit", exact: "0.1.6")
2828
],
2929
targets: [
3030
.target(name: "Wasm"),

0 commit comments

Comments
 (0)