Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
This PR includes changes from:
- #332: Use -C rathen than -Z for instrument-coverage
- #320: Replace unmaintained actions-rs/toolchain with dtolnay/rust-toolchain@master

It also updates actions/cache to v4.
  • Loading branch information
flodolo committed Feb 4, 2024
1 parent d72d981 commit d69f345
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Toolchain setup
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
override: true
components: rustfmt

- uses: actions/checkout@v4
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,32 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo binaries
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
- name: Toolchain setup
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
override: true
components: llvm-tools-preview
- name: Install grcov
if: matrix.rust-version == 'nightly' && matrix.cargo-args == '--all-features'
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Run tests
run: cargo test --all-features --no-fail-fast
env:
RUSTFLAGS: '-Zinstrument-coverage'
RUSTFLAGS: '-Cinstrument-coverage'
- name: Run grcov
if: matrix.rust-version == 'nightly' && matrix.cargo-args == '--all-features'
# Important! Keep in grcov flags in sync with Makefile.internal.toml.
Expand Down

0 comments on commit d69f345

Please sign in to comment.