diff --git a/.github/workflows/crate.yml b/.github/workflows/crate.yml index 45b2509..4edf13e 100644 --- a/.github/workflows/crate.yml +++ b/.github/workflows/crate.yml @@ -8,13 +8,15 @@ on: env: CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + GRCOV_VERSION: v0.8.19 jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build run: cargo build --verbose - name: Run tests @@ -24,12 +26,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust nightly and miri - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly components: miri, rust-src - name: Run miri @@ -43,31 +44,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Install Rust stable + - name: Install Rust stable and LLVM tools uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + components: llvm-tools-preview - name: Install grcov - env: - GRCOV_LINK: https://github.com/mozilla/grcov/releases/download - GRCOV_VERSION: v0.8.7 - run: | - curl -L "$GRCOV_LINK/$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" | - tar xj -C $HOME/.cargo/bin - - name: Install llvm-tools-preview - run: | - rustup component add llvm-tools-preview + run: > + curl -L "https://github.com/mozilla/grcov/releases/download/$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" + | tar xj -C "$HOME/.cargo/bin" - name: Run cargo clean - run: | - cargo clean + run: cargo clean - name: Run tests env: - CARGO_INCREMENTAL: 0 LLVM_PROFILE_FILE: "{{ name }}-%p-%m.profraw" RUSTFLAGS: > -Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code @@ -75,8 +68,7 @@ jobs: RUSTDOCFLAGS: > -Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off - run: | - cargo test --verbose + run: cargo test - name: Get coverage data for codecov run: | grcov . --binary-path ./target/debug/ -s . -t lcov --branch \