name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
rust:
- 1.46.0
- stable
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build with minimal features (no_std)
run: cargo build --verbose --no-default-features --features libm
- name: Run tests without SIMD
run: cargo test --verbose --no-default-features --features png-format
- name: Run tests with SSE2
env:
RUSTFLAGS: -Ctarget-feature=+sse2
run: cargo test --verbose --all-features
- name: Run tests with SSE4.1
env:
RUSTFLAGS: -Ctarget-feature=+sse4.1
run: cargo test --verbose --all-features
- name: Run tests with AVX
env:
RUSTFLAGS: -Ctarget-feature=+avx
run: cargo test --verbose --all-features
- name: Run tests with AVX2
env:
RUSTFLAGS: -Ctarget-feature=+avx2
run: cargo test --verbose --all-features
wasm:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: wasm32-wasi
- 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