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 debeaf4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 63 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/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).
Expand Down
49 changes: 10 additions & 39 deletions .github/workflows/continuous-integration-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,55 +23,26 @@ jobs:
with:
filters: |
src:
- '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
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/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
Expand Down

0 comments on commit debeaf4

Please sign in to comment.