Skip to content

Improve documentation (#3) #12

Improve documentation (#3)

Improve documentation (#3) #12

Workflow file for this run

name: "Rust tests"
on:
pull_request:
merge_group:
push:
branches:
- main
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "clippy"
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Run checks
run: cargo hack clippy --feature-powerset --no-dev-deps -- -D warnings
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "rustfmt"
- name: Run checks
run: cargo fmt --all -- --check
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo hack test --feature-powerset
miri:
name: Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "miri"
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Run tests through miri
env:
RUSTFLAGS: "-Zrandomize-layout"
run: cargo hack miri test --feature-powerset
address-sanitizer:
name: "Sanitizer: ${{ matrix.sanitizer }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, memory, thread, leak]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "rust-src"
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: "Run tests through ${{ matrix.sanitizer }} sanitizer"
env:
ASAN_OPTIONS: "detect_stack_use_after_return=1"
RUST_BACKTRACE: "0"
RUSTDOCFLAGS: "-Zrandomize-layout -Zsanitizer=${{ matrix.sanitizer }}"
RUSTFLAGS: "-Zrandomize-layout -Zsanitizer=${{ matrix.sanitizer }}"
run: cargo hack test --feature-powerset -Zbuild-std --target x86_64-unknown-linux-gnu