From 18cc02eb6bb8bdb7203d0226afb9225cc238f277 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 7 Jul 2023 23:42:02 +0700 Subject: [PATCH 1/4] ci: Update to actions/checkout@v3. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fb74f2b..93472c20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest name: cargo fmt steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install stable toolchain uses: actions-rs/toolchain@v1 @@ -37,7 +37,7 @@ jobs: os: [macOS-latest, windows-2019, ubuntu-latest] name: cargo clippy+test steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install stable toolchain uses: actions-rs/toolchain@v1 @@ -76,7 +76,7 @@ jobs: name: cargo clippy+test (wasm32) steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install stable toolchain uses: actions-rs/toolchain@v1 @@ -107,7 +107,7 @@ jobs: os: [macOS-latest, windows-2019, ubuntu-latest] name: cargo test nightly steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install nightly toolchain uses: actions-rs/toolchain@v1 @@ -129,7 +129,7 @@ jobs: matrix: os: [macOS-latest, windows-2019, ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: install stable toolchain uses: actions-rs/toolchain@v1 From b5f780eb40fc2bbea627aca8c15dc72e707521de Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 7 Jul 2023 23:42:02 +0700 Subject: [PATCH 2/4] ci: actions-rs/toolchain to dtolnay/rust-toolchain `actions-rs` actions have been unmaintained for years and produce warnings when used as they trigger deprecation notices about functionality that GitHub will be removing. --- .github/workflows/ci.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93472c20..7971b62f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,12 +14,10 @@ jobs: - uses: actions/checkout@v3 - name: install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: stable - profile: minimal + toolchain: "stable" components: rustfmt - override: true - name: install rustfmt run: rustup component add rustfmt @@ -40,12 +38,10 @@ jobs: - uses: actions/checkout@v3 - name: install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: stable + toolchain: "stable" components: clippy - profile: minimal - override: true - run: rustup target add thumbv7m-none-eabi @@ -79,13 +75,11 @@ jobs: - uses: actions/checkout@v3 - name: install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: stable + toolchain: "stable" target: wasm32-unknown-unknown components: clippy - profile: minimal - override: true - name: cargo clippy uses: actions-rs/cargo@v1 @@ -110,11 +104,9 @@ jobs: - uses: actions/checkout@v3 - name: install nightly toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: nightly - profile: minimal - override: true + toolchain: "nightly" - name: cargo test uses: actions-rs/cargo@v1 @@ -132,11 +124,9 @@ jobs: - uses: actions/checkout@v3 - name: install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: stable - profile: minimal - override: true + toolchain: "stable" - name: cargo doc uses: actions-rs/cargo@v1 From cf63413eb1553677eb471b0e9bc2c6d8d9007594 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 7 Jul 2023 23:42:03 +0700 Subject: [PATCH 3/4] ci: Remove explicit install of rustfmt. This is already handled in the toolchain install prior to this step. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7971b62f..1305d04d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,6 @@ jobs: toolchain: "stable" components: rustfmt - - name: install rustfmt - run: rustup component add rustfmt - - name: cargo fmt uses: actions-rs/cargo@v1 with: From 0de15bdb9b639582d43d70b91e14428a9d350692 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 7 Jul 2023 23:42:03 +0700 Subject: [PATCH 4/4] ci: Run cargo directly, no actions-rs/cargo. `actions-rs` actions have been unmaintained for years and produce warnings when used as they trigger deprecation notices about functionality that GitHub will be removing. --- .github/workflows/ci.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1305d04d..eeba953e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,10 +20,7 @@ jobs: components: rustfmt - name: cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check test-stable: runs-on: ${{ matrix.os }} @@ -43,16 +40,10 @@ jobs: - run: rustup target add thumbv7m-none-eabi - name: cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets -- -D warnings + run: cargo clippy --all-features --all-targets -- -D warnings - name: cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features + run: cargo test --all-features - name: Build with no default features # Use no-std target to ensure we don't link to std. @@ -79,17 +70,11 @@ jobs: components: clippy - name: cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets --target wasm32-unknown-unknown -- -D warnings + run: cargo clippy --all-features --all-targets --target wasm32-unknown-unknown -- -D warnings # TODO: Find a way to make tests work. Until then the tests are merely compiled. - name: cargo test compile - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --no-run --target wasm32-unknown-unknown + run: cargo test --all-features --no-run --target wasm32-unknown-unknown test-nightly: runs-on: ${{ matrix.os }} @@ -106,10 +91,7 @@ jobs: toolchain: "nightly" - name: cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features + run: cargo test --all-features check-docs: name: Docs @@ -126,7 +108,4 @@ jobs: toolchain: "stable" - name: cargo doc - uses: actions-rs/cargo@v1 - with: - command: doc - args: --all-features --document-private-items + run: cargo doc --all-features --document-private-items