Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw committed Aug 26, 2024
1 parent 3cadfd2 commit 93f24a7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,26 @@ jobs:
# run: make test-linux SWIFT_VERSION=${{ matrix.swift }}

wasm:
name: SwiftWasm
runs-on: ubuntu-latest
name: Wasm
runs-on: macos-14
strategy:
matrix:
toolchain:
- wasm-DEVELOPMENT-SNAPSHOT-2024-07-08-a
steps:
- uses: actions/checkout@v4
- uses: bytecodealliance/actions/wasmtime/setup@v1
- uses: swiftwasm/setup-swiftwasm@v1
- name: Cache toolchains
uses: actions/cache@v3
with:
swift-version: "wasm-DEVELOPMENT-SNAPSHOT-2024-07-16-a"
- name: Build tests
run: swift build --triple wasm32-unknown-wasi --build-tests
- name: Run tests
run: wasmtime .build/debug/swift-custom-dumpPackageTests.wasm
path: |
~/Library/Developer/Toolchains
key: ${{ matrix.toolchain }}
- uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Select Swift version
run: echo '${{ matrix.toolchain }}' > .swift-version
- name: Build
run: swift run carton bundle --debug

# windows:
# name: Windows
Expand Down
14 changes: 14 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,17 @@ let package = Package(
),
]
)

#if os(macOS)
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/swiftwasm/carton", from: "1.0.0"),
])
package.targets.append(
.executableTarget(
name: "WasmTests",
dependencies: [
"CustomDump"
]
)
)
#endif
14 changes: 14 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ let package = Package(
),
]
)

#if os(macOS)
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/swiftwasm/carton", from: "1.0.0"),
])
package.targets.append(
.executableTarget(
name: "WasmTests",
dependencies: [
"CustomDump"
]
)
)
#endif

0 comments on commit 93f24a7

Please sign in to comment.