Skip to content

Commit

Permalink
CI: use dtolnay/rust-toolchain for Rust
Browse files Browse the repository at this point in the history
Action `actions-rs/toolchain` seems to be dead, see: actions-rs/toolchain#216

See: https://github.com/dtolnay/rust-toolchain
  • Loading branch information
mrtnzlml committed Jul 14, 2022
1 parent 8968820 commit 0d6af56
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 61 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/continuous-integration-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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).
Expand Down
46 changes: 9 additions & 37 deletions .github/workflows/continuous-integration-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
# 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/[email protected]
# 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
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/daily-rust-cargo-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,11 @@ jobs:
# https://github.com/actions/checkout
- uses: actions/[email protected]

# https://github.com/actions-rs/toolchain
- uses: actions-rs/[email protected]
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/[email protected]
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
Expand Down

0 comments on commit 0d6af56

Please sign in to comment.