From b40d8c678427f965ba87fb410ff9e714d98cb8b8 Mon Sep 17 00:00:00 2001 From: Kevin Swiber Date: Mon, 25 Mar 2024 18:30:04 -0700 Subject: [PATCH] Using a different Rust toolchain action for CI jobs. (#76) * Using a different Rust toolchain action for CI jobs. * Using a different Rust toolchain action, because the old one is deprecated. * Fixing broken Rust toolchain CI parameters. * Adding debug info to build. * Moving CI Windows machines to 2022. --- .github/workflows/ci.yaml | 23 ++++++++++------------- .github/workflows/release.yaml | 12 ++++++------ .github/workflows/website.yaml | 11 ++++------- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f4552f..ee3c968 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ on: branches: - main schedule: - - cron: '00 00 * * *' + - cron: "00 00 * * *" jobs: test: @@ -69,10 +69,10 @@ jobs: os: macos-latest rust: nightly - build: win-msvc - os: windows-2019 + os: windows-2022 rust: nightly - build: win-gnu - os: windows-2019 + os: windows-2022 rust: nightly-x86_64-gnu steps: @@ -80,12 +80,12 @@ jobs: uses: actions/checkout@v2 - name: Install Rust - uses: ructions/toolchain@v2.0.0 + id: toolchain + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - components: rustfmt, clippy + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: rustup component add rustfmt clippy - name: Use Cross if: matrix.target != '' && matrix.build != 'wasm32' @@ -125,12 +125,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - name: Install Rust - uses: ructions/toolchain@v2.0.0 - with: - toolchain: stable - override: true - profile: minimal - components: rustfmt + id: toolchain + uses: dtolnay/rust-toolchain@stable + - run: rustup component add rustfmt - name: Check formatting run: | cargo fmt --all -- --check diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e68ec75..0c9381a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ on: # branches: # - ag/release tags: - - '[0-9]+.[0-9]+.[0-9]+**' + - "[0-9]+.[0-9]+.[0-9]+**" jobs: create-release: name: create-release @@ -64,7 +64,7 @@ jobs: build-release: name: build-release - needs: ['create-release'] + needs: ["create-release"] runs-on: ${{ matrix.os }} env: # For some builds, we use cross to test on 32-bit and big-endian @@ -118,12 +118,12 @@ jobs: # ci/macos-install-packages - name: Install Rust - uses: ructions/toolchain@v2.0.0 + id: toolchain + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - profile: minimal - override: true - target: ${{ matrix.target }} + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: rustup target add ${{ matrix.target }} - name: Use Cross if: matrix.target != '' && matrix.build != 'wasm32' diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index 8f91ba6..d865793 100644 --- a/.github/workflows/website.yaml +++ b/.github/workflows/website.yaml @@ -12,7 +12,7 @@ permissions: id-token: write concurrency: - group: 'pages' + group: "pages" cancel-in-progress: true jobs: @@ -23,12 +23,9 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: ructions/toolchain@v2.0.0 - with: - profile: minimal - toolchain: 1.64.0 - override: true - + id: toolchain + uses: dtolnay/rust-toolchain@1.64.0 + - run: rustup override set ${{steps.toolchain.outputs.name}} - name: Use Node.js uses: actions/setup-node@v3 with: