From 81814519449bff6430ae8accc3cff7a841a111cd Mon Sep 17 00:00:00 2001 From: Andreas Rottmann Date: Wed, 8 Mar 2023 21:14:52 +0100 Subject: [PATCH] CI: Stop using `actions-rs` It seems the `actions-rs` collection of github actions are unmaintained; using the `actions-rs/toolchain@v1` action causes deprecation warnings in Github CI; see . So: - Replace the `toolchain` action with `dtolnay/rust-toolchain`. - Just run cargo directly instead of using the `cargo` action. - Get rid of the code coverage check, which was broken anyway. --- .github/workflows/CI.yml | 79 +++++----------------------------------- 1 file changed, 9 insertions(+), 70 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cde313b..627507b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,16 +10,10 @@ jobs: uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable - name: Run cargo check - uses: actions-rs/cargo@v1 - with: - command: check + run: cargo check --all-features --all-targets test: name: Test Suite @@ -29,16 +23,10 @@ jobs: uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test --all-features --all-targets msrv-check: # We require at least Rust 1.45, so we can use proc macros in @@ -51,11 +39,8 @@ jobs: uses: actions/checkout@v3 - name: Install 1.45 toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.45.0 - override: true + uses: dtolnay/rust-toolchain@1.45.0 + # We use the git CLI here, since otherwise cargo fails with # "error reading from the zlib stream; class=Zlib (5)", see # . @@ -71,56 +56,10 @@ jobs: uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt, clippy + uses: dtolnay/rust-toolchain@stable - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings - - - codecov: - name: Code coverage - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install nightly toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - - - name: Build with instrumentation - uses: actions-rs/cargo@v1 - with: - command: test - args: --package lexpr --all-features --no-fail-fast - env: - CARGO_INCREMENTAL: '0' - RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' - RUSTDOCFLAGS: '-Cpanic=abort' - - # TODO: collect statistics with `gcovr`, which doesn't play with - # current "gcov" binary format. - - name: Collect coverage information - uses: actions-rs/grcov@v0.1 - - # TODO: upload coverage, see - # - - name: Upload to codecov - uses: codecov/codecov-action@v1 + run: cargo clippy -- -D warnings