Skip to content

CI

CI #378

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
- cron: '0 0 * * 0' # at midnight of each sunday
name: CI
jobs:
develop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
- run: cargo build --release --workspace --tests
rust-version-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- 1.70.0 # MSRV
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: |
if [ "${{ matrix.toolchain }}" = "stable" ]; then
cargo test --release --workspace --exclude simd-benches
else
cargo build --release --workspace --exclude simd-benches
fi
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
- aarch64-unknown-linux-gnu
# - armv7-unknown-linux-gnueabihf # FIXME
- wasm32-unknown-unknown
# - mips-unknown-linux-gnu # missing toolchain
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- uses: taiki-e/install-action@v2
with:
tool: cross
- run: |
if [ "${{ matrix.target }}" == "wasm32-unknown-unknown" ]; then
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash
fi
- run: |
python3 ./scripts/testgen.py --target "${{ matrix.target }}" | bash -ex
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: |
cargo miri test --workspace --exclude simd-benches