Skip to content

Commit

Permalink
Use dtolnay/rust-toolchain github actions instead of actions-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jul 24, 2024
1 parent faff4a7 commit e811175
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #v1.0.7
- uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master at the time of writing this
with:
toolchain: ${{ matrix.rust }}
profile: minimal
default: true

- name: Build
run: cargo build --all-targets --locked
run: cargo --version && cargo build --all-targets --locked

- name: Test
run: cargo test --locked
Expand All @@ -47,16 +45,14 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable Rust
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #v1.0.7
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master at the time of writing this
with:
toolchain: stable
profile: minimal

- name: Install nightly Rust
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #v1.0.7
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master at the time of writing this
with:
toolchain: nightly
profile: minimal

- name: Downgrade dependencies to minimal versions
run: cargo +nightly update -Z minimal-versions
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #v1.0.7
- name: Install stable Rust
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master at the time of writing this
with:
toolchain: stable
profile: minimal
components: rustfmt
default: true

- name: Check formatting
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions-rs/[email protected]

- name: Install stable Rust
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master at the time of writing this
with:
toolchain: stable
profile: minimal
components: clippy
default: true

- name: Clippy check
env:
Expand Down

0 comments on commit e811175

Please sign in to comment.