From 0ad5ca92aa4e7ebd330a447a96611c59aea62093 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Tue, 20 Jun 2023 22:58:22 +0200 Subject: [PATCH] Update GitHub Actions CI The following updates are performed: * update actions/checkout to v3 * update actions/setup-node to v3 * replace unmaintained actions-rs/toolchain by dtolnay/rust-toolchain * update bahmutov/npm-install to v1.8.32 * update Swatinem/rust-cache to v2 --- .github/workflows/release-crates.yml | 10 ++----- .github/workflows/release.yml | 43 ++++++++-------------------- .github/workflows/test.yml | 12 ++++---- 3 files changed, 21 insertions(+), 44 deletions(-) diff --git a/.github/workflows/release-crates.yml b/.github/workflows/release-crates.yml index 17ec6003..6217bc50 100644 --- a/.github/workflows/release-crates.yml +++ b/.github/workflows/release-crates.yml @@ -7,14 +7,10 @@ jobs: runs-on: ubuntu-latest name: Release Rust crate steps: - - uses: actions/checkout@v1 - - uses: bahmutov/npm-install@v1.1.0 + - uses: actions/checkout@v3 + - uses: bahmutov/npm-install@v1.8.32 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - run: cargo login ${CRATES_IO_TOKEN} env: CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53bd3791..890bf817 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,16 +27,12 @@ jobs: with: node-version: 18 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - name: Setup rust target run: rustup target add ${{ matrix.target }} - - uses: bahmutov/npm-install@v1.1.0 + - uses: bahmutov/npm-install@v1.8.32 - name: Build release run: yarn build-release env: @@ -66,16 +62,12 @@ jobs: with: node-version: 18 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - name: Setup rust target run: rustup target add aarch64-apple-darwin - - uses: bahmutov/npm-install@v1.1.0 + - uses: bahmutov/npm-install@v1.8.32 - name: Build release run: yarn build-release env: @@ -136,11 +128,7 @@ jobs: with: node-version: 18 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - name: Setup cross compile toolchain if: ${{ matrix.setup }} @@ -149,7 +137,7 @@ jobs: - name: Setup rust target run: rustup target add ${{ matrix.target }} - - uses: bahmutov/npm-install@v1.1.0 + - uses: bahmutov/npm-install@v1.8.32 - name: Build release run: yarn build-release env: @@ -178,12 +166,9 @@ jobs: with: node-version: 18 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal - override: true - target: wasm32-unknown-unknown + targets: wasm32-unknown-unknown - name: Install wasm-opt run: | curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_111/binaryen-version_111-x86_64-linux.tar.gz @@ -210,7 +195,7 @@ jobs: - build-wasm steps: - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1.1.0 + - uses: bahmutov/npm-install@v1.8.32 - name: Download artifacts uses: actions/download-artifact@v3 with: @@ -246,14 +231,10 @@ jobs: runs-on: ubuntu-latest name: Release Rust crate steps: - - uses: actions/checkout@v1 - - uses: bahmutov/npm-install@v1.1.0 + - uses: actions/checkout@v3 + - uses: bahmutov/npm-install@v1.8.32 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - run: cargo login ${CRATES_IO_TOKEN} env: CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4863886a..a8a765fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,20 +14,20 @@ jobs: RUST_BACKTRACE: full RUSTFLAGS: -D warnings steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 - run: cargo fmt - run: cargo test --all-features test-js: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - - uses: bahmutov/npm-install@v1.1.0 + - uses: bahmutov/npm-install@v1.8.32 - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 - run: yarn build - run: yarn test