Skip to content

Commit

Permalink
Implement Testing on CI via wasmtime
Browse files Browse the repository at this point in the history
  • Loading branch information
CryZe committed Jun 12, 2021
1 parent b1d1ad3 commit e8df804
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-wasi]
runner = "wasmtime run --wasm-features all --dir ."
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
override: true
target: wasm32-wasi

- name: Build with minimal features (no_std)
run: cargo build --verbose --no-default-features --features libm
Expand Down Expand Up @@ -53,3 +54,35 @@ jobs:
env:
RUSTFLAGS: -Ctarget-feature=+avx2
run: cargo test --verbose --all-features

wasm:
runs-on: ubuntu-18.04
strategy:
matrix:
rust:
- nightly
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Build with minimal features (no_std)
run: cargo build --target wasm32-wasi --verbose --no-default-features --features libm

- name: Run tests without SIMD
run: cargo test --target wasm32-wasi --verbose --no-default-features --features png-format

- name: Run tests with SIMD128
env:
RUSTFLAGS: -Ctarget-feature=+simd128,+bulk-memory,+nontrapping-fptoint,+sign-ext
run: cargo test --target wasm32-wasi --verbose --all-features

0 comments on commit e8df804

Please sign in to comment.