Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml72
1 files changed, 52 insertions, 20 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 1a0deee564..c27d84fb0b 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -30,8 +30,8 @@ jobs:
outputs:
typescript: ${{ steps.filter.outputs.typescript }}
steps:
- - uses: actions/checkout@v4
- - uses: dorny/paths-filter@1441771bbfdd59dcd748680ee64ebd8faab1a242
+ - uses: actions/checkout@v6
+ - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
@@ -45,12 +45,12 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install rustup-toolchain-install-master
- run: cargo install [email protected]
+ run: cargo install [email protected]
# Install a pinned rustc commit to avoid surprises
- name: Install Rust toolchain
@@ -88,7 +88,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -96,7 +96,7 @@ jobs:
run: |
rustup update --no-self-update stable
rustup default stable
- rustup component add --toolchain stable rust-src clippy rustfmt
+ rustup component add --toolchain stable rust-src rustfmt
# We also install a nightly rustfmt, because we use `--file-lines` in
# a test.
rustup toolchain install nightly --profile minimal --component rustfmt
@@ -128,10 +128,6 @@ jobs:
- name: Run cargo-machete
run: cargo machete
- - name: Run Clippy
- if: matrix.os == 'macos-latest'
- run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr
-
analysis-stats:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest
@@ -140,7 +136,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
@@ -168,7 +164,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
@@ -178,18 +174,43 @@ jobs:
- run: cargo fmt -- --check
+ clippy:
+ if: github.repository == 'rust-lang/rust-analyzer'
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+
+ # Note that clippy output is currently dependent on whether rust-src is installed,
+ # https://github.com/rust-lang/rust-clippy/issues/14625
+ - name: Install Rust toolchain
+ run: |
+ rustup update --no-self-update stable
+ rustup default stable
+ rustup component add --toolchain stable rust-src clippy
+
+ # https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json
+ - name: Install Rust Problem Matcher
+ run: echo "::add-matcher::.github/rust.json"
+
+ - run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr
+
miri:
if: github.repository == 'rust-lang/rust-analyzer'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
- rustup update --no-self-update nightly
- rustup default nightly
+ # FIXME: Pin nightly due to a regression in miri on nightly-2026-02-12.
+ # See https://github.com/rust-lang/miri/issues/4855.
+ # Revert to plain `nightly` once this is fixed upstream.
+ rustup toolchain install nightly-2026-02-10
+ rustup default nightly-2026-02-10
rustup component add miri
# - name: Cache Dependencies
@@ -214,7 +235,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
@@ -242,10 +263,10 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Install Nodejs
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v6
with:
node-version: 22
@@ -301,7 +322,7 @@ jobs:
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -309,7 +330,18 @@ jobs:
run: typos
conclusion:
- needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv, miri, rustfmt, analysis-stats]
+ needs:
+ [
+ rust,
+ rust-cross,
+ typescript,
+ typo-check,
+ proc-macro-srv,
+ miri,
+ rustfmt,
+ clippy,
+ analysis-stats,
+ ]
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run