Skip to content

Commit

Permalink
Update CI configs and use stable clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oxalica committed Sep 29, 2024
1 parent fa78d18 commit 5763ccd
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
57 changes: 38 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rust-analyzer
uses: actions/checkout@v4

- name: Install Rust ${{ matrix.rust }}
run: |
rustup update --no-self-update beta
rustup default ${{ matrix.rust }}
rustup component add rust-analyzer
- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Install cargo-hack
# Always use stable rustc to compile cargo-hack, which has MSRV 1.65.
# https://github.com/taiki-e/cargo-hack/commit/5baa4262710414ebde4845494f1db22643acc0ba
run: cargo +stable install cargo-hack

# `cargo build` doesn't pull in [dev-dependencies].
- name: Build
run: cargo hack build --each-feature
Expand All @@ -55,13 +61,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Sync with Cargo.toml!
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
# Sync with Cargo.toml!
toolchain: "1.64"
components: rust-analyzer
run: |
rustup update --no-self-update stable
rustup default 1.64
rustup component add rust-analyzer
- name: Build
# Workaround of `-Z avoid-dev-deps`
# See: https://github.com/rust-lang/cargo/issues/5133#issuecomment-1307094647
Expand All @@ -74,20 +82,31 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy --all-targets --all-features -- -Dclippy::all
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
run: |
rustup update --no-self-update stable
rustup default stable
- run: |
cargo clippy --all-targets --all-features -- -Dclippy::all
docs:
name: Docs
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install clippy
uses: dtolnay/rust-toolchain@clippy
- name: Rustdoc
uses: actions/checkout@v4

- name: Install Rust
run: |
rustup update --no-self-update stable
rustup default stable
- name: cargo doc
env:
RUSTDOCFLAGS: --cfg docsrs_ -Dwarnings
run: cargo doc --all-features
4 changes: 3 additions & 1 deletion .github/workflows/future_proof.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install cargo-outdated
uses: dtolnay/install@cargo-outdated

- name: cargo-outdated
run: rm -f Cargo.lock && cargo outdated --workspace --exit-code 1 --root-deps-only --exclude=clap,anstyle,clap_lex,regex,lsp-types

0 comments on commit 5763ccd

Please sign in to comment.