Skip to content

ci-wasm

ci-wasm #520

Workflow file for this run

name: ci-wasm
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "17 3 * * *"
env:
CARGO_TERM_COLOR: always
INLINE_IGNORE_PATTERN: "drop_in_place|::fmt::"
jobs:
test-wasm32-wasi:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
toolchain: [stable, beta, nightly]
features: ["", "--features std", "--features public_imp", "--features std,public_imp"]
rustflags: ["-D warnings", "-D warnings -C target-feature=+simd128"]
target: [wasm32-wasi]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@v1
- name: Install WASM Runner
run: cargo install wasm-runner
- name: Run tests
run: cargo test --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --all-targets --verbose
env:
RUSTFLAGS: ${{ matrix.rustflags }}
CARGO_TARGET_WASM32_WASI_RUNNER: wasm-runner wasmer
WASM_RUNNER_VERBOSE: 1
test-inlining-wasm32:
runs-on: ubuntu-latest
strategy:
matrix:
target: [wasm32-wasi, wasm32-unknown-unknown]
defaults:
run:
working-directory: inlining
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
target: ${{ matrix.target }}
override: true
- name: Install cargo-asm
run: cargo install cargo-asm
- name: Check if the expected fns are inlined
run: |
cargo clean;RUSTFLAGS="-C target-feature=+simd128" cargo asm --target ${{ matrix.target }}|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-wasm32-simd128.txt -
cargo clean;RUSTFLAGS="-C target-feature=+simd128" cargo asm --target ${{ matrix.target }} --no-default-features|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-wasm32-simd128.txt -
cargo clean;cargo asm --target ${{ matrix.target }}|egrep -v $INLINE_IGNORE_PATTERN|diff -u empty.txt -
cargo clean;cargo asm --target ${{ matrix.target }} --no-default-features|egrep -v $INLINE_IGNORE_PATTERN|diff -u empty.txt -
cross-build-wasm32-unknown:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.38.0", stable, beta, nightly]
features: ["", "--features std", "--features public_imp", "--features std,public_imp"]
rustflags: ["-D warnings", "-D warnings -C target-feature=+simd128"]
target: [wasm32-unknown-unknown]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Run build
run: cargo build --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --verbose
env:
RUSTFLAGS: ${{ matrix.rustflags }}