Skip to content

Commit 93f24a7

Browse files
committed
wip
1 parent 3cadfd2 commit 93f24a7

File tree

3 files changed

+46
-10
lines changed

3 files changed

+46
-10
lines changed

.github/workflows/ci.yml

+18-10
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,26 @@ jobs:
4444
# run: make test-linux SWIFT_VERSION=${{ matrix.swift }}
4545

4646
wasm:
47-
name: SwiftWasm
48-
runs-on: ubuntu-latest
47+
name: Wasm
48+
runs-on: macos-14
49+
strategy:
50+
matrix:
51+
toolchain:
52+
- wasm-DEVELOPMENT-SNAPSHOT-2024-07-08-a
4953
steps:
50-
- uses: actions/checkout@v4
51-
- uses: bytecodealliance/actions/wasmtime/setup@v1
52-
- uses: swiftwasm/setup-swiftwasm@v1
54+
- name: Cache toolchains
55+
uses: actions/cache@v3
5356
with:
54-
swift-version: "wasm-DEVELOPMENT-SNAPSHOT-2024-07-16-a"
55-
- name: Build tests
56-
run: swift build --triple wasm32-unknown-wasi --build-tests
57-
- name: Run tests
58-
run: wasmtime .build/debug/swift-custom-dumpPackageTests.wasm
57+
path: |
58+
~/Library/Developer/Toolchains
59+
key: ${{ matrix.toolchain }}
60+
- uses: actions/checkout@v4
61+
- name: Select Xcode
62+
run: sudo xcode-select -s /Applications/Xcode_15.4.app
63+
- name: Select Swift version
64+
run: echo '${{ matrix.toolchain }}' > .swift-version
65+
- name: Build
66+
run: swift run carton bundle --debug
5967

6068
# windows:
6169
# name: Windows

Package.swift

+14
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,17 @@ let package = Package(
3838
),
3939
]
4040
)
41+
42+
#if os(macOS)
43+
package.dependencies.append(contentsOf: [
44+
.package(url: "https://github.com/swiftwasm/carton", from: "1.0.0"),
45+
])
46+
package.targets.append(
47+
.executableTarget(
48+
name: "WasmTests",
49+
dependencies: [
50+
"CustomDump"
51+
]
52+
)
53+
)
54+
#endif

[email protected]

+14
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ let package = Package(
3535
),
3636
]
3737
)
38+
39+
#if os(macOS)
40+
package.dependencies.append(contentsOf: [
41+
.package(url: "https://github.com/swiftwasm/carton", from: "1.0.0"),
42+
])
43+
package.targets.append(
44+
.executableTarget(
45+
name: "WasmTests",
46+
dependencies: [
47+
"CustomDump"
48+
]
49+
)
50+
)
51+
#endif

0 commit comments

Comments
 (0)