Skip to content

ci: better cargo test parameters + update dependencies #253

ci: better cargo test parameters + update dependencies

ci: better cargo test parameters + update dependencies #253

Workflow file for this run

name: Rust
on:
push:
branches: [dev]
pull_request:
branches: [dev]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: "Build and Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/[email protected]
- name: Cargo update
run: cargo update
- name: "Build"
run: cargo build
- name: "Test"
# Run all tests (bins, examples, lib, integration and docs)
# https://doc.rust-lang.org/cargo/commands/cargo-test.html#target-selection
run: cargo test
- name: "Check documentation"
# env:
# RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --workspace --lib --document-private-items --examples
rustfmt_and_clippy:
name: Rustfmt and Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Nightly with rustfmt and clippy
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt, clippy
- uses: Swatinem/[email protected]
- name: "Check formatting"
run: cargo +nightly fmt --check --all
- name: Run Clippy
run: cargo clippy --all-targets --all-features
miri:
if: ( ! github.event.pull_request.draft )
name: "Test with Miri"
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
steps:
- uses: actions/checkout@v4
- name: Install Rust nightly with Miri
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: miri
targets: ${{ matrix.target }}
- uses: Swatinem/[email protected]
- name: Build
run: |
cargo version --verbose
cargo update
cargo build --target ${{ matrix.target }}
- name: Test with Miri on ${{ matrix.target }}
run: cargo miri test -p clmul -p matrix-transpose --target ${{ matrix.target }}