From 3f3364bc597ff8aae8c1958244f9961d60e1f46b Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sun, 4 Oct 2026 21:27:09 +0200 Subject: [PATCH] ci: speedup lint job and the Rust test builds Since #8350 (2026-09-09) deltachat-jsonrpc-bindings build-depends on deltachat-jsonrpc, so clippy, nextest and the doctests, which select the whole workspace, compiled core and its whole dependency tree a second time for the host. The lint job also checked every dependency twice, once per panic strategy, and repeated clippy's checks in a separate all-features `cargo check`. With a warm cache on 4 CPUs on my machine, the lint job drops from 150 to 60 seconds and the tests build from 100 to 75 seconds. Peak memory falls for lint from 5.1 to 3.5 GiB and for tests 7.5 to 5.4 GiB. --- .github/workflows/ci.yml | 10 ++++++---- scripts/clippy.sh | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48cbd6400..c4adf8645 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,10 @@ jobs: name: Lint Rust runs-on: ubuntu-latest timeout-minutes: 60 + env: + # Force panic strategy to be same as lib and test targets, + # to avoid duplicate dependency checking. + CARGO_PROFILE_DEV_PANIC: unwind steps: - uses: actions/checkout@v7 with: @@ -48,8 +52,6 @@ jobs: run: cargo fmt --all -- --check - name: Run clippy run: scripts/clippy.sh - - name: Check with all features - run: cargo check --workspace --all-targets --all-features - name: Check with only default features run: cargo check --all-targets @@ -139,12 +141,12 @@ jobs: - name: Tests env: RUST_BACKTRACE: 1 - run: cargo nextest run --workspace --locked + run: cargo nextest run --workspace --exclude deltachat-jsonrpc-bindings --locked - name: Doc-Tests env: RUST_BACKTRACE: 1 - run: cargo test --workspace --locked --doc + run: cargo test --workspace --exclude deltachat-jsonrpc-bindings --locked --doc - name: Test cargo vendor run: cargo vendor diff --git a/scripts/clippy.sh b/scripts/clippy.sh index cb8db6ca3..44b60845c 100755 --- a/scripts/clippy.sh +++ b/scripts/clippy.sh @@ -6,4 +6,4 @@ # # To automatically fix warnings, run # scripts/clippy.sh --fix --allow-dirty -cargo clippy --locked --workspace --all-targets --all-features "$@" -- -D warnings +cargo clippy --locked --workspace --exclude deltachat-jsonrpc-bindings --all-targets --all-features "$@" -- -D warnings