Skip to content

Commit

Permalink
running tests using wasm32-wasip1
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelangel-dev committed Oct 21, 2024
1 parent ee3ef15 commit 546bbb0
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ jobs:
- name: Compress Automerge XCFramework
if: steps.cache-automerge.outputs.cache-hit != 'true'
run: ./scripts/compress-framework.sh
- uses: actions/upload-artifact@v4
with:
name: libuniffi_automerge
path: |
libuniffi_automerge.a
libuniffi_automerge_threads.a
test-automerge-swift:
runs-on: macos-14
needs: automerge-dependencies
env:
LOCAL_BUILD: true
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- uses: actions/checkout@v4
- name: Restore Automerge XCFramework and library
Expand All @@ -59,6 +62,26 @@ jobs:
- name: Swift tests
run: swift test

test-automerge-wasm:
runs-on: ubuntu-latest
container: swiftwasm/swift:latest
needs: automerge-dependencies
steps:
- uses: actions/checkout@v4
- name: Restore Automerge XCFramework and library
uses: actions/cache/restore@v4
with:
path: |
automergeFFI.xcframework
automergeFFI.xcframework.zip
libuniffi_automerge.a
libuniffi_automerge_threads.a
key: automerge-dependencies-{{ hashFiles(AutomergeUniffi/automerge.swift) }}
- name: Build tests
run: swift build --swift-sdk wasm32-wasip1 --build-tests -Xlinker "`pwd`/libuniffi_automerge.a" -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
- name: Run tests
run: wasmtime run --wasm max-wasm-stack=$((1024 * 1024)) --dir . .build/debug/AutomergePackageTests.wasm

rustfmt:
runs-on: macos-latest
steps:
Expand Down

0 comments on commit 546bbb0

Please sign in to comment.