Trim down CI and add cross tests for i686-linux and aarch64-linux #1148
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: ${{ 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-wasip1] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: ${{ matrix.target }} | |
- name: Setup Wasmer | |
uses: wasmerio/[email protected] | |
- 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_WASIP1_RUNNER: wasm-runner wasmer | |
WASM_RUNNER_VERBOSE: 1 | |
test-inlining-wasm32: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: [wasm32-wasip1, wasm32-unknown-unknown] | |
defaults: | |
run: | |
working-directory: inlining | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.target }} | |
- name: Install rustfilt | |
run: cargo install rustfilt | |
- name: Check if the expected fns are inlined | |
env: | |
RUSTFLAGS: "-C target-feature=+simd128" | |
run: | | |
./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" | |
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@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] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
targets: ${{ matrix.target }} | |
- name: Clippy - all features enabled | |
run: cargo clippy --target ${{ matrix.target }} --all-targets --all-features | |
env: | |
RUSTFLAGS: "-D warnings" | |
- name: Clippy - all features disabled | |
run: cargo clippy --target ${{ matrix.target }} --all-targets --no-default-features | |
env: | |
RUSTFLAGS: "-D warnings" |