2021-09-14 00:45:42 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ '*' ]
|
|
|
|
pull_request:
|
2022-11-20 13:08:05 -07:00
|
|
|
branches: [ 'main', 'develop', 'release/2.0' ]
|
2021-09-14 00:45:42 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
2022-11-20 20:28:09 -07:00
|
|
|
RUSTFLAGS: '-D warnings'
|
2021-09-14 00:45:42 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-11-20 13:08:05 -07:00
|
|
|
test:
|
2021-09-14 00:45:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-20 13:08:05 -07:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# 32-bit target
|
|
|
|
- target: i686-unknown-linux-gnu
|
|
|
|
deps: sudo apt update && sudo apt install gcc-multilib
|
2021-09-14 00:45:42 +00:00
|
|
|
|
2022-11-20 13:08:05 -07:00
|
|
|
# 64-bit target
|
|
|
|
- target: x86_64-unknown-linux-gnu
|
2021-09-14 00:45:42 +00:00
|
|
|
steps:
|
2022-11-20 13:08:05 -07:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- run: rustup target add ${{ matrix.target }}
|
|
|
|
- run: ${{ matrix.deps }}
|
|
|
|
- run: cargo test --target ${{ matrix.target }}
|
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: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --no-default-features --features "std nightly simd_backend"
|
|
|
|
|
|
|
|
test-defaults-serde:
|
|
|
|
name: Test default feature selection and serde
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --features "serde"
|
|
|
|
|
|
|
|
test-alloc-u32:
|
2022-11-20 13:08:05 -07:00
|
|
|
name: Test no_std+alloc
|
2021-09-14 00:45:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2022-11-20 13:08:05 -07:00
|
|
|
args: --lib --no-default-features --features "alloc"
|
2021-09-14 00:45:42 +00:00
|
|
|
|
|
|
|
test-batch-deterministic:
|
|
|
|
name: Test deterministic batch verification
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --features "batch_deterministic"
|
|
|
|
|
|
|
|
msrv:
|
2022-10-16 18:51:26 -04:00
|
|
|
name: Current MSRV is 1.56.1
|
2021-09-14 00:45:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2022-10-16 18:51:26 -04:00
|
|
|
toolchain: 1.56.1
|
2021-09-14 00:45:42 +00:00
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
|
|
|
|
bench:
|
|
|
|
name: Check that benchmarks compile
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: bench
|
|
|
|
# This filter selects no benchmarks, so we don't run any, only build them.
|
2022-10-16 18:51:26 -04:00
|
|
|
args: --features "batch" "nonexistentbenchmark"
|