From cd29721656748afa69e83fbc66ff6d3ea93c19b9 Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Mon, 16 Sep 2024 13:31:49 +0100 Subject: [PATCH 1/4] actions: update upload-artifact to v4 Also add rust version to artifact name, as uploading twice to the same name no longer works. --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f905706..f59b074 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -51,9 +51,9 @@ jobs: with: command: build args: --release --all-features - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: - name: plotsweep ${{ matrix.os }} + name: plotsweep ${{ matrix.os }} rust-${{ matrix.rust }} path: | target/release/plotsweep target/release/plotsweep.exe From 2ed5e9cf4539706bd14bddcf0c732e59abb6beeb Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Mon, 16 Sep 2024 13:41:19 +0100 Subject: [PATCH 2/4] actions: update checkout to v4 --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f59b074..552fa96 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install stable components uses: actions-rs/toolchain@v1 @@ -43,7 +43,7 @@ jobs: rust: '1.41' runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} From 8d708bafeaafdfdcc8a7bd36cd0e6ec9a95fdb74 Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Mon, 16 Sep 2024 14:15:51 +0100 Subject: [PATCH 3/4] actions: update MSRV to 1.63 --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 552fa96..4bc1cbc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -40,7 +40,7 @@ jobs: rust: ['stable'] include: - os: 'ubuntu-20.04' - rust: '1.41' + rust: '1.63' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From d206c5c1fca45589b0cfd2d5832c0db8d8cbb4cd Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Mon, 16 Sep 2024 13:44:16 +0100 Subject: [PATCH 4/4] actions: replace Rust actions with direct use of rustup and cargo --- .github/workflows/rust.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4bc1cbc..c5bc3cb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,18 +18,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install stable components - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: clippy + - name: Install toolchain + run: | + rustup toolchain install stable + rustup default stable - name: Run clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --verbose --release -- -D warnings + run: cargo clippy -- --deny warnings build_and_test: name: Rust project @@ -44,13 +39,12 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --all-features + - name: Install toolchain + run: | + rustup toolchain install ${{ matrix.rust }} + rustup default ${{ matrix.rust }} + - name: Build + run: cargo build --release - uses: actions/upload-artifact@v4 with: name: plotsweep ${{ matrix.os }} rust-${{ matrix.rust }}