Skip to content

Commit 5763ccd

Browse files
committed
Update CI configs and use stable clippy
1 parent fa78d18 commit 5763ccd

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

.github/workflows/ci.yaml

+38-19
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
28-
- name: Install Rust
29-
uses: dtolnay/rust-toolchain@master
30-
with:
31-
toolchain: ${{ matrix.rust }}
32-
components: rust-analyzer
27+
uses: actions/checkout@v4
28+
29+
- name: Install Rust ${{ matrix.rust }}
30+
run: |
31+
rustup update --no-self-update beta
32+
rustup default ${{ matrix.rust }}
33+
rustup component add rust-analyzer
34+
35+
- name: Cache dependencies
36+
uses: Swatinem/rust-cache@v2
37+
3338
- name: Install cargo-hack
3439
# Always use stable rustc to compile cargo-hack, which has MSRV 1.65.
3540
# https://github.com/taiki-e/cargo-hack/commit/5baa4262710414ebde4845494f1db22643acc0ba
3641
run: cargo +stable install cargo-hack
42+
3743
# `cargo build` doesn't pull in [dev-dependencies].
3844
- name: Build
3945
run: cargo hack build --each-feature
@@ -55,13 +61,15 @@ jobs:
5561
runs-on: ${{ matrix.os }}
5662
steps:
5763
- name: Checkout
58-
uses: actions/checkout@v3
64+
uses: actions/checkout@v4
65+
66+
# Sync with Cargo.toml!
5967
- name: Install Rust
60-
uses: dtolnay/rust-toolchain@master
61-
with:
62-
# Sync with Cargo.toml!
63-
toolchain: "1.64"
64-
components: rust-analyzer
68+
run: |
69+
rustup update --no-self-update stable
70+
rustup default 1.64
71+
rustup component add rust-analyzer
72+
6573
- name: Build
6674
# Workaround of `-Z avoid-dev-deps`
6775
# See: https://github.com/rust-lang/cargo/issues/5133#issuecomment-1307094647
@@ -74,20 +82,31 @@ jobs:
7482
runs-on: ubuntu-latest
7583
timeout-minutes: 45
7684
steps:
77-
- uses: actions/checkout@v3
78-
- uses: dtolnay/rust-toolchain@clippy
79-
- run: cargo clippy --all-targets --all-features -- -Dclippy::all
85+
- name: Checkout
86+
uses: actions/checkout@v4
87+
88+
- name: Install Rust
89+
run: |
90+
rustup update --no-self-update stable
91+
rustup default stable
92+
93+
- run: |
94+
cargo clippy --all-targets --all-features -- -Dclippy::all
8095
8196
docs:
8297
name: Docs
8398
runs-on: ubuntu-latest
8499
timeout-minutes: 15
85100
steps:
86101
- name: Checkout
87-
uses: actions/checkout@v3
88-
- name: Install clippy
89-
uses: dtolnay/rust-toolchain@clippy
90-
- name: Rustdoc
102+
uses: actions/checkout@v4
103+
104+
- name: Install Rust
105+
run: |
106+
rustup update --no-self-update stable
107+
rustup default stable
108+
109+
- name: cargo doc
91110
env:
92111
RUSTDOCFLAGS: --cfg docsrs_ -Dwarnings
93112
run: cargo doc --all-features

.github/workflows/future_proof.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ jobs:
1717
timeout-minutes: 45
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
21+
2122
- name: Install cargo-outdated
2223
uses: dtolnay/install@cargo-outdated
24+
2325
- name: cargo-outdated
2426
run: rm -f Cargo.lock && cargo outdated --workspace --exit-code 1 --root-deps-only --exclude=clap,anstyle,clap_lex,regex,lsp-types

0 commit comments

Comments
 (0)