From 3cbe65f420bb0dbd3ddc54249b9c7cc46d4e959d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Zl=C3=A1mal?= Date: Thu, 14 Jul 2022 14:34:53 -0500 Subject: [PATCH] CI: use `dtolnay/rust-toolchain` for Rust Action `actions-rs/toolchain` seems to be dead, see: https://github.com/actions-rs/toolchain/issues/216 See: https://github.com/dtolnay/rust-toolchain --- .../continuous-integration-javascript.yml | 12 +---- .../workflows/continuous-integration-rust.yml | 46 ++++--------------- .github/workflows/daily-rust-cargo-update.yml | 18 ++------ 3 files changed, 15 insertions(+), 61 deletions(-) diff --git a/.github/workflows/continuous-integration-javascript.yml b/.github/workflows/continuous-integration-javascript.yml index 30fe8eef47..be9453a403 100644 --- a/.github/workflows/continuous-integration-javascript.yml +++ b/.github/workflows/continuous-integration-javascript.yml @@ -34,16 +34,8 @@ jobs: - name: Install Yarn dependencies run: yarn install --immutable - # TODO: https://github.com/yarnpkg/berry/issues/2783 - # - name: Check Yarn versions releases - # run: yarn version check - - # https://github.com/actions-rs/toolchain - - uses: actions-rs/toolchain@v1.0.7 - with: - profile: minimal - toolchain: stable - override: true + # https://github.com/dtolnay/rust-toolchain + - uses: dtolnay/rust-toolchain@stable # We are purposefully expecting zero warnings in the output to make sure flowtests are # working as expected (Flow returns warnings for unused suppression comments). diff --git a/.github/workflows/continuous-integration-rust.yml b/.github/workflows/continuous-integration-rust.yml index 1c25d2fbc9..1fd426795e 100644 --- a/.github/workflows/continuous-integration-rust.yml +++ b/.github/workflows/continuous-integration-rust.yml @@ -26,52 +26,24 @@ jobs: - 'src/abacus/**' - 'src/x/**' - # https://github.com/actions-rs/toolchain - - uses: actions-rs/toolchain@v1.0.7 + # https://github.com/dtolnay/rust-toolchain + - uses: dtolnay/rust-toolchain@stable if: steps.paths-filter.outputs.src == 'true' with: - profile: minimal components: clippy, rustfmt - toolchain: stable - override: true - target: 'x86_64-unknown-linux-gnu' # 64-bit Linux (kernel 2.6.32+, glibc 2.11+) - # https://github.com/actions-rs/cargo - - uses: actions-rs/cargo@v1.0.3 + # Cargo fmt + - run: cargo fmt --all --check --verbose --message-format=human --manifest-path ${{ matrix.manifest }} if: steps.paths-filter.outputs.src == 'true' - with: - command: fmt - args: >- - --all - --check - --verbose - --message-format=human - --manifest-path ${{ matrix.manifest }} - # https://github.com/actions-rs/cargo - - uses: actions-rs/cargo@v1.0.3 + # Cargo clippy + # `--all-targets` + `--all-features` (in order to also check tests and non-default crate features) + - run: cargo clippy --locked --all-targets --all-features --manifest-path ${{ matrix.manifest }} if: steps.paths-filter.outputs.src == 'true' - with: - command: clippy - # `--all-targets` + `--all-features` (in order to also check tests and non-default crate features) - args: >- - --locked - --all-targets - --all-features - --manifest-path ${{ matrix.manifest }} - --target x86_64-unknown-linux-gnu - # https://github.com/actions-rs/cargo - - name: Run all tests - uses: actions-rs/cargo@v1.0.3 + # Cargo test + - run: cargo test --no-fail-fast --manifest-path ${{ matrix.manifest }} --color always if: steps.paths-filter.outputs.src == 'true' - with: - command: test - args: >- - --no-fail-fast - --manifest-path ${{ matrix.manifest }} - --target x86_64-unknown-linux-gnu - --color always # https://github.com/actions-rs/cargo # TODO: replace with `--include-ignored` once it's in stable Rust Compiler diff --git a/.github/workflows/daily-rust-cargo-update.yml b/.github/workflows/daily-rust-cargo-update.yml index 65bc79c7a4..305eadfc80 100644 --- a/.github/workflows/daily-rust-cargo-update.yml +++ b/.github/workflows/daily-rust-cargo-update.yml @@ -19,21 +19,11 @@ jobs: # https://github.com/actions/checkout - uses: actions/checkout@v3.0.2 - # https://github.com/actions-rs/toolchain - - uses: actions-rs/toolchain@v1.0.7 - with: - profile: minimal - toolchain: stable - override: true + # https://github.com/dtolnay/rust-toolchain + - uses: dtolnay/rust-toolchain@stable - # https://github.com/actions-rs/cargo - - name: Run cargo-update - uses: actions-rs/cargo@v1.0.3 - with: - command: update - args: >- - --manifest-path ${{ matrix.manifest }} - --color always + # Cargo update + - run: cargo update --manifest-path ${{ matrix.manifest }} --color always # https://github.com/peter-evans/create-pull-request - name: Create Pull Request