Update "chunk" benchmark #407
Workflow file for this run
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: Run tests, check code | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
RUST_LOG: info | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
- os: windows-latest | |
toolchain-suffix: -gnu | |
- os: windows-latest | |
toolchain-suffix: -msvc | |
- os: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable${{ matrix.toolchain-suffix }} | |
- name: Run tests (all features) | |
run: | | |
cargo test --workspace --all-features | |
- name: Run tests (no features) | |
run: | | |
cargo test --workspace --no-default-features | |
- name: Test benchmarks | |
run: | | |
cargo test --benches | |
msrv: | |
strategy: | |
matrix: | |
rust-version: ["1.38"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust version ${{ matrix.rust-version }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- name: Check whether it compiles | |
run: | | |
cargo check --all-features --verbose | |
check-code: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: rustfmt | |
run: | | |
cargo fmt --all --check | |
- name: clippy | |
run: | | |
cargo clippy --all-targets --all-features -- -D warnings | |
- name: Build docs | |
run: | | |
cargo rustdoc --all-features -- -D warnings | |
- name: Upload docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: target/doc/* | |
- name: packaging | |
run: | | |
cargo package --verbose | |
no_std: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Install cargo-nono | |
# --locked is recommended, see https://github.com/hobofan/cargo-nono/pull/68 | |
run: | | |
cargo install cargo-nono --locked | |
- name: Check no_std compatibility | |
run: | | |
cargo nono check | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: miri | |
- name: Run Miri | |
run: | | |
cargo miri test | |
thread-sanitizer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Run ThreadSanitizer | |
env: | |
RUSTFLAGS: "-Z sanitizer=thread" | |
run: | | |
cargo test --tests -Z build-std --target x86_64-unknown-linux-gnu |