From 90f1e35bc70bba20d68408f4c850435419090ff5 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Sat, 21 Feb 2026 00:18:26 -0800 Subject: [PATCH] ci: limit clippy --tests to one representative target --- .github/workflows/rust-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index fe8262decb..7bf4d1300b 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -389,8 +389,20 @@ jobs: cargo chef prepare --recipe-path "$RECIPE" cargo chef cook --recipe-path "$RECIPE" --target ${{ matrix.target }} --release --all-features + # Cargo timings show `--tests` repeatedly rebuilding heavy test targets + # (especially codex-core) across the full matrix. Keep test linting on one + # representative dev target and let nextest continue compiling tests on the + # runtime test matrix. - name: cargo clippy - run: cargo clippy --target ${{ matrix.target }} --all-features --tests --profile ${{ matrix.profile }} --timings -- -D warnings + shell: bash + run: | + set -euo pipefail + args=(cargo clippy --target "${{ matrix.target }}" --all-features --profile "${{ matrix.profile }}") + if [[ "${{ matrix.profile }}" == 'dev' && "${{ matrix.target }}" == 'x86_64-unknown-linux-gnu' ]]; then + args+=(--tests) + fi + args+=(--timings -- -D warnings) + "${args[@]}" - name: Upload Cargo timings (clippy) if: always()