Trim down CI and add cross tests for i686-linux and aarch64-linux #1153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-wasip1: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: [stable, beta, nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: wasm32-wasip1 | |
- name: Setup Wasmer | |
uses: wasmerio/[email protected] | |
- name: Install WASM Runner | |
run: cargo install wasm-runner | |
- name: Run tests | |
run: | | |
for features in "" "--features std" "--features public_imp" "--features std,public_imp"; do | |
for rustflags in "" "-C target-feature=+simd128"; do | |
cargo clean; RUSTFLAGS=$rustflags cargo test --no-default-features $features --target wasm32-wasip1 --all-targets --verbose | |
done | |
done | |
env: | |
CARGO_TARGET_WASM32_WASIP1_RUNNER: wasm-runner wasmer | |
WASM_RUNNER_VERBOSE: 1 | |
test-inlining-wasm32: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: inlining | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: "wasm32-wasip1,wasm32-unknown-unknown" | |
- name: Install rustfilt | |
run: cargo install rustfilt | |
- name: Check if the expected fns are inlined | |
env: | |
RUSTFLAGS: "-C target-feature=+simd128" | |
run: | | |
for target in wasm32-wasip1 wasm32-unknown-unknown; do | |
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt | |
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt --no-default-features | |
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt "--features public_imp" | |
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt "--features public_imp,std" | |
done | |
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@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: ${{ matrix.target }} | |
- name: Run build | |
run: cargo build --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --verbose | |
env: | |
RUSTFLAGS: ${{ matrix.rustflags }} | |
clippy_check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest, macos-13] | |
target: [wasm32-wasip1, wasm32-unknown-unknown] | |
env: | |
RUSTFLAGS: "-D warnings -C target-feature=+simd128" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
targets: ${{ matrix.target }} | |
- name: Clippy | |
run: | | |
for rustflags in "-D warnings" "-D warnings -C target-feature=+simd128"; do | |
RUSTFLAGS=$rustflags cargo clippy --target ${{ matrix.target }} --all-targets --all-features | |
RUSTFLAGS=$rustflags cargo clippy --target ${{ matrix.target }} --all-targets --no-default-features | |
done |