From e85d7a1e49e9b21b583834211c33003552e116c9 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:25:52 +0100 Subject: [PATCH] fix(ci): remove unmaintained `actions-rs` ci actions Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- .github/workflows/audit.yml | 6 ++--- .github/workflows/ci.yml | 33 ++++++++++--------------- .github/workflows/release-cd.yml | 41 +++++++++++++++----------------- .github/workflows/release-ci.yml | 16 +++++-------- 4 files changed, 39 insertions(+), 57 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index bfcf9dc..b9ceeed 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -21,12 +21,10 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 # Ensure that the latest version of Cargo is installed - - name: Install Rust - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 with: toolchain: stable - profile: minimal - override: true - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 - uses: actions-rs/audit-check@35b7b53b1e25b55642157ac01b4adceb5b9ebef3 # v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30c1ae7..840ee0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,16 +21,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 with: - profile: minimal toolchain: stable - override: true - run: rustup component add rustfmt - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 - with: - command: fmt - args: --all -- --check + - name: Run Cargo Fmt + run: cargo fmt --all -- --check clippy: name: Clippy @@ -38,17 +35,14 @@ jobs: steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 with: toolchain: stable components: clippy - override: true - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 - - uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-targets --all-features -- -D warnings - name: Clippy Output + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings test: name: Test @@ -72,16 +66,13 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 with: - profile: minimal toolchain: stable - override: true - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 - with: - command: test - args: -r --all-targets --all-features --workspace + - name: Run Cargo Test + run: cargo test -r --all-targets --all-features --workspace result: name: Result (CI) diff --git a/.github/workflows/release-cd.yml b/.github/workflows/release-cd.yml index 50f55dc..8df6052 100644 --- a/.github/workflows/release-cd.yml +++ b/.github/workflows/release-cd.yml @@ -97,25 +97,22 @@ jobs: sign-release: true hash-release: true use-project-version: false # not being used in rustic_scheduler -# -# TODO!: add publishing to release draft -# TODO!: include changelog in release draft -# -# publish-cargo: -# name: Publishing to Cargo -# runs-on: ubuntu-latest -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 -# - uses: actions-rs/toolchain@v1 -# with: -# toolchain: stable -# profile: minimal -# override: true -# - uses: Swatinem/rust-cache@v2 -# with: -# key: ${{ matrix.job.target }} -# - uses: actions-rs/cargo@v1 -# with: -# command: publish -# args: --token ${{ secrets.CARGO_API_KEY }} + # + # TODO!: add publishing to release draft + # TODO!: include changelog in release draft + # + # publish-cargo: + # name: Publishing to Cargo + # runs-on: ubuntu-latest + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + # - name: Install Rust toolchain + # uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 + # with: + # toolchain: stable + # - uses: Swatinem/rust-cache@v2 + # with: + # key: ${{ matrix.job.target }} + # - name: Run Cargo Publish + # run: cargo publish --token ${{ secrets.CARGO_API_KEY }} diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 3c4fb0c..8d9cc1b 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -42,16 +42,13 @@ jobs: - os: windows-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 with: - profile: minimal toolchain: stable - override: true - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 - with: - command: test - args: -r --all-targets --all-features --workspace -p ${{ needs.determine-package.outputs.package }} -- --ignored + - name: Run Cargo Test + run: cargo test -r --all-targets --all-features --workspace -p ${{ needs.determine-package.outputs.package }} -- --ignored semver-check: name: Check SemVer @@ -66,11 +63,10 @@ jobs: # - os: macos-latest # Panics steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # v1 with: - profile: minimal toolchain: stable - override: true - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 - name: Check semver