64 lines
1.9 KiB
YAML
Raw Normal View History

2021-09-14 00:45:42 +00:00
name: Rust
on:
push:
branches: [ '*' ]
pull_request:
branches: [ 'main', 'develop', 'release/2.0' ]
2021-09-14 00:45:42 +00:00
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-D warnings'
2021-09-14 00:45:42 +00:00
jobs:
test:
2021-09-14 00:45:42 +00:00
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 32-bit target
- target: i686-unknown-linux-gnu
deps: sudo apt update && sudo apt install gcc-multilib
# 64-bit target
- target: x86_64-unknown-linux-gnu
2021-09-14 00:45:42 +00:00
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: rustup target add ${{ matrix.target }}
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --no-default-features --features alloc
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --features batch
- run: cargo test --target ${{ matrix.target }} --features batch_deterministic
- run: cargo test --target ${{ matrix.target }} --features serde
2021-09-14 00:45:42 +00:00
test-simd:
name: Test simd backend (nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --features simd_backend
2021-09-14 00:45:42 +00:00
msrv:
name: Current MSRV is 1.56.1
2021-09-14 00:45:42 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# First run `cargo +nightly -Z minimal-verisons check` in order to get a
# Cargo.lock with the oldest possible deps
- uses: dtolnay/rust-toolchain@nightly
- run: cargo -Z minimal-versions check --no-default-features --features serde
# Now check that `cargo build` works with respect to the oldest possible
# deps and the stated MSRV
- uses: dtolnay/rust-toolchain@1.56.1
- run: cargo build
2021-09-14 00:45:42 +00:00
bench:
name: Check that benchmarks compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --benches --features batch