From 5c316e8d505a556fbbe804935cf0f567177b4757 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 16 Mar 2023 15:38:15 +0000 Subject: [PATCH] CI: Remove most usages of `actions-rs` actions These actions are unmaintained. The only one we continue to use is `actions-rs/clippy-check` because there is no suitable alternative. --- .github/workflows/audits.yml | 22 +++++----------------- .github/workflows/book.yml | 5 +---- .github/workflows/lints.yml | 19 +++---------------- rust-toolchain.toml | 1 + 4 files changed, 10 insertions(+), 37 deletions(-) diff --git a/.github/workflows/audits.yml b/.github/workflows/audits.yml index db1d6fc8f..374d70ae5 100644 --- a/.github/workflows/audits.yml +++ b/.github/workflows/audits.yml @@ -11,20 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Install cargo-vet - uses: actions-rs/cargo@v1 - with: - command: install - args: cargo-vet - - - name: Run cargo vet --locked - uses: actions-rs/cargo@v1 - with: - command: vet - args: --locked + - uses: dtolnay/rust-toolchain@stable + id: toolchain + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: cargo install cargo-vet + - run: cargo vet --locked diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 86d3d076c..fac308c59 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -21,10 +21,7 @@ jobs: mdbook-version: 'latest' - name: Install mdbook-katex - uses: actions-rs/cargo@v1 - with: - command: install - args: mdbook-katex + run: cargo install mdbook-katex - name: Build zcashd book run: mdbook build doc/book/ diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index a53a84054..71ca24dc6 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -75,19 +75,14 @@ jobs: if: always() rust-clippy: - name: Clippy (1.68.0) + name: Clippy (MSRV) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.68.0 - components: clippy - override: true - name: Run clippy uses: actions-rs/clippy-check@v1 with: - name: Clippy (1.68.0) + name: Clippy (MSRV) token: ${{ secrets.GITHUB_TOKEN }} args: --all-features --all-targets -- -D warnings @@ -96,12 +91,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.68.0 - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check + - run: cargo fmt -- --check diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 421bf0f8b..0cf440a7e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,3 @@ [toolchain] channel = "1.68.0" +components = ["clippy", "rustfmt"]