Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to make it compile in WASM #9

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ on:

jobs:
test:
name: BezierKit WASM support
name: WASM support
runs-on: ubuntu-latest
container: ghcr.io/swiftwasm/carton:0.16.0
container: ghcr.io/swiftwasm/carton:0.17.0

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

# Work around to avoid this issue: https://github.com/ChimeHQ/SwiftTreeSitter/issues/8
# We are running wasm-opt -O before execute the test for avoiding maximum of locals
- name: Test WebAssembly
run: carton test
run: |
swift build -c debug --product SwiftTreeSitterPackageTests -Xswiftc -color-diagnostics --triple wasm32-unknown-wasi
wasm-opt -O .build/wasm32-unknown-wasi/debug/SwiftTreeSitterPackageTests.wasm -o SwiftTreeSitterPackageTests.wasm
wasmer SwiftTreeSitterPackageTests.wasm