Skip to content

Commit

Permalink
ci: Use dtolnay/rust-toolchain, not actions-rs
Browse files Browse the repository at this point in the history
The `actions-rs` actions are not maintained (and haven't been
for a long time). Some tests used `dtolnay/rust-toolchain`, so
use it consistently.
  • Loading branch information
waywardmonkeys authored and emilio committed Jul 2, 2024
1 parent 99ae2d3 commit 218bae9
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions .github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,18 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
# TODO: Should ideally be stable, but we use some nightly-only
# features.
toolchain: nightly
override: true
components: rustfmt, clippy

- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt -- --check

- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests
run: cargo clippy --tests

msrv:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -73,11 +65,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true

- name: Check without default features
run: cargo check -p bindgen --no-default-features --features=runtime
Expand All @@ -90,11 +80,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true

- name: Generate documentation for `bindgen`
run: cargo doc --document-private-items --no-deps -p bindgen
Expand All @@ -108,11 +96,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true

# TODO: Actually run quickchecks once `bindgen` is reliable enough.
- name: Build quickcheck tests
Expand All @@ -127,11 +113,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true

- name: Test expectations
run: cd bindgen-tests/tests/expectations && cargo test
Expand Down Expand Up @@ -205,12 +189,10 @@ jobs:
sudo apt-get install libc6:${{matrix.target.debian}} libstdc++6:${{matrix.target.debian}}
- name: Install stable
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
target: ${{matrix.target.rust}}
override: true
- name: Install libtinfo
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -237,11 +219,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install nightly
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true

- name: Check cfg
run: cargo check -Z unstable-options -Z check-cfg
Expand Down

0 comments on commit 218bae9

Please sign in to comment.