From 7c9d93bafc15bd2ef7f2c7194f3942a73aa91bd3 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Wed, 16 Aug 2023 15:37:05 +0200 Subject: [PATCH] Remove uses of unmaintained actions-rs/cargo --- .github/actions/setup-rust/action.yml | 6 ++-- .github/workflows/build-and-test.yml | 5 +-- .github/workflows/cli-publish.yml | 9 ++--- .github/workflows/lint.yml | 39 ++++++---------------- .github/workflows/private-tangle-tests.yml | 5 +-- 5 files changed, 17 insertions(+), 47 deletions(-) diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index bb6daacc41..25db0d30dc 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -50,7 +50,5 @@ runs: - name: Install ${{ inputs.install }} if: ${{ inputs.install != '' }} - uses: actions-rs/cargo@v1 - with: - command: install - args: ${{ inputs.install }} + shell: bash + run: cargo install ${{ inputs.install }} diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index cb5069fe06..f7bc3ccc45 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -50,7 +50,4 @@ jobs: uses: taiki-e/install-action@nextest - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: nextest - args: run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core + run: cargo nextest run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core diff --git a/.github/workflows/cli-publish.yml b/.github/workflows/cli-publish.yml index f5725bec91..365586eaf8 100644 --- a/.github/workflows/cli-publish.yml +++ b/.github/workflows/cli-publish.yml @@ -12,7 +12,7 @@ jobs: RELEASE_UPLOAD_URL: ${{ steps.create_release.outputs.upload_url }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: set version env variable run: echo "CRATE_VERSION=$(cat cli/Cargo.toml | sed -n 's/.*version = "\([^"]*\)".*/\1/p' | head -1)" >> $GITHUB_ENV - name: create release @@ -55,7 +55,7 @@ jobs: ext: .exe steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install rust stable uses: dtolnay/rust-toolchain@stable @@ -83,10 +83,7 @@ jobs: # build the CLI - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./cli/Cargo.toml --profile production + run: cargo build --manifest-path ./cli/Cargo.toml --profile production - name: Import code signing assets (macOS) # Based on https://github.com/Apple-Actions/import-codesign-certs/blob/master/src/security.ts diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a00baa653b..c8fd3bd8d1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -92,10 +92,7 @@ jobs: sudo apt-get install libudev-dev libusb-1.0-0-dev - name: Run Cargo Udeps - uses: actions-rs/cargo@v1 - with: - command: udeps - args: --all-targets --all-features + run: cargo udeps --all-targets --all-features check-format: name: Check Format @@ -112,22 +109,13 @@ jobs: components: rustfmt - name: Install cargo-license-template - uses: actions-rs/cargo@v1 - with: - command: install - args: --force cargo-license-template + run: cargo install --force cargo-license-template - name: Run Cargo Fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check - name: Run cargo-license-template - uses: actions-rs/cargo@v1 - with: - command: license-template - args: --template .license_template + run: cargo license-template --template .license_template audit: name: Perform Security Audit @@ -144,15 +132,11 @@ jobs: install: cargo-audit - name: Run Cargo Audit - uses: actions-rs/cargo@v1 - with: - command: audit - # The ignored security advisories: - # - # - RUSTSEC-2021-0065: https://rustsec.org/advisories/RUSTSEC-2021-0065 - # - anymap is unmaintained 🤷‍♀️ - - args: --file Cargo.lock --deny warnings --ignore RUSTSEC-2021-0145 --ignore RUSTSEC-2021-0065 + # The ignored security advisories: + # + # - RUSTSEC-2021-0065: https://rustsec.org/advisories/RUSTSEC-2021-0065 + # - anymap is unmaintained 🤷‍♀️ + run: cargo audit --file Cargo.lock --deny warnings --ignore RUSTSEC-2021-0145 --ignore RUSTSEC-2021-0065 no_std: name: Check `no_std` compatability @@ -168,7 +152,4 @@ jobs: targets: riscv64gc-unknown-none-elf - name: Check - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features -F serde -p iota-sdk --target=riscv64gc-unknown-none-elf + run: cargo check --no-default-features -F serde -p iota-sdk --target=riscv64gc-unknown-none-elf diff --git a/.github/workflows/private-tangle-tests.yml b/.github/workflows/private-tangle-tests.yml index d69c001f43..7b0eec51a3 100644 --- a/.github/workflows/private-tangle-tests.yml +++ b/.github/workflows/private-tangle-tests.yml @@ -63,10 +63,7 @@ jobs: uses: "./.github/actions/ledger-nano" - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: nextest - args: run --tests --all-features --run-ignored ignored-only --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core + run: cargo nextest run --tests --all-features --run-ignored ignored-only --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core - name: Tear down private tangle if: always()