Skip to content

try alt version of cargo-llvm-cov #4

try alt version of cargo-llvm-cov

try alt version of cargo-llvm-cov #4

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Update Rust
run: rustup update stable
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
cargo +nightly miri setup
- name: Instal cargo-llvm-cov
run: cargo install --git https://github.com/andrewgazelka/cargo-llvm-cov --branch codecov-improved-region cargo-llvm-cov
- name: Clippy each feature set
run: |
cargo clippy --all-targets
cargo clippy --all-targets --features "std"
- name: Build
run: cargo build --all-targets --all-features
- name: Run tests with MIRI
run: cargo +nightly miri test --all-features
- name: Run two-thread tests with Loom and coverage
run: |
cargo llvm-cov clean
cargo llvm-cov --no-report --all-features
env:
RUSTFLAGS: -Dwarnings --cfg loom
- name: Run three-thread tests with Loom and coverage
run: |
cargo llvm-cov --no-report --all-features -- --ignored
cargo llvm-cov report --codecov --output-path codecov.json
env:
RUSTFLAGS: -Dwarnings --cfg loom
LOOM_MAX_PREEMPTIONS: 3
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: codecov.json
fail_ci_if_error: true
- name: Validate documentation
run: cargo doc --no-deps
- name: Check formatting
run: cargo fmt --all -- --check
env:
RUSTDOCFLAGS: -Dwarnings