From d9bab0a84bc40627eb163109f6857cfb61d0e130 Mon Sep 17 00:00:00 2001 From: "J. Sebastian Paez" Date: Thu, 16 Apr 2026 18:03:49 -0700 Subject: [PATCH 1/2] ci: speed up release build with sccache and single cargo invocation - Combine 4 per-bin cargo invocations into one --bin x --bin y call to avoid redundant workspace resolution and linking. - Add mozilla-actions/sccache-action with GHA backend for cross-branch rustc output caching. - Set CARGO_INCREMENTAL=0 for smaller, more reusable release caches. - Print sccache stats post-build to monitor hit rate. --- .github/workflows/release.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cba493..9dbacb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,10 @@ on: env: CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 RELEASE_BINARIES: timsseek timsquery_cli timsquery_viewer speclib_build + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" jobs: build-and-release: @@ -50,6 +53,9 @@ jobs: target: ${{ matrix.target }} cache: true + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.6 + - name: Install musl-tools if: matrix.target == 'x86_64-unknown-linux-musl' run: sudo apt-get update && sudo apt-get install -y musl-tools @@ -57,9 +63,15 @@ jobs: - name: Build Binaries shell: bash run: | + bins=() for binary in $RELEASE_BINARIES; do - cargo build --release --bin $binary --target ${{ matrix.target }} + bins+=(--bin "$binary") done + cargo build --release --target ${{ matrix.target }} "${bins[@]}" + + - name: sccache stats + shell: bash + run: sccache --show-stats - name: Package Artifacts shell: bash From 6969a1564684e3d512f42b1483080f558fdfa39a Mon Sep 17 00:00:00 2001 From: "J. Sebastian Paez" Date: Thu, 16 Apr 2026 18:13:31 -0700 Subject: [PATCH 2/2] ci: bump sccache-action to v0.0.9 for GHA cache v2 support --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9dbacb8..7eb7ad8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,7 @@ jobs: cache: true - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.9 - name: Install musl-tools if: matrix.target == 'x86_64-unknown-linux-musl'