From a28558e322f0f44db9cbfad78568af3c76806e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Sun, 22 Nov 2026 01:37:44 +0100 Subject: [PATCH] tools: cache Rust builds in GHA workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: René PR-URL: https://github.com/nodejs/node/pull/67694 Reviewed-By: Antoine du Hamel Reviewed-By: Christian Aurich Zanettini Martins --- .github/workflows/build-tarball.yml | 1 + .github/workflows/coverage-linux-without-intl.yml | 1 + .github/workflows/coverage-linux.yml | 1 + .github/workflows/stress-test.yml | 1 + .github/workflows/test-internet.yml | 1 + .github/workflows/test-linux-perfetto.yml | 1 + .github/workflows/test-linux-quic.yml | 1 + .github/workflows/test-linux.yml | 1 + .github/workflows/test-macos.yml | 1 + 9 files changed, 9 insertions(+) diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 7b429f458a4..c1deb4acd29 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -103,6 +103,7 @@ jobs: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} steps: - name: Install Clang ${{ env.CLANG_VERSION }} uses: $/.github/actions/install-clang diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index 50d4a71c23e..e08305a71ff 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -41,6 +41,7 @@ env: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} permissions: contents: read diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 290b73c528f..b59050216ad 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -41,6 +41,7 @@ env: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} permissions: contents: read diff --git a/.github/workflows/stress-test.yml b/.github/workflows/stress-test.yml index 93d9a58a513..757ad609674 100644 --- a/.github/workflows/stress-test.yml +++ b/.github/workflows/stress-test.yml @@ -53,6 +53,7 @@ jobs: # test-linux.yml and test-macos.yml running on the main branch. SCCACHE_GHA_ENABLED: 'true' SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: sccache steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index bd8c23a4c8b..2475b2b7cf7 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -46,6 +46,7 @@ env: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} permissions: contents: read diff --git a/.github/workflows/test-linux-perfetto.yml b/.github/workflows/test-linux-perfetto.yml index 39afb86e0fe..d4c57766e7d 100644 --- a/.github/workflows/test-linux-perfetto.yml +++ b/.github/workflows/test-linux-perfetto.yml @@ -27,6 +27,7 @@ env: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} RUSTC_VERSION: '1.88' permissions: diff --git a/.github/workflows/test-linux-quic.yml b/.github/workflows/test-linux-quic.yml index e2541668ec5..cf34b28ba91 100644 --- a/.github/workflows/test-linux-quic.yml +++ b/.github/workflows/test-linux-quic.yml @@ -38,6 +38,7 @@ env: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} RUSTC_VERSION: '1.88' permissions: diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 3bc2d8f90df..6d549481c90 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -46,6 +46,7 @@ env: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} clang++-19 SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} RUSTC_VERSION: '1.88' permissions: diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 0dd0fcb209f..2dde824af97 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -84,6 +84,7 @@ jobs: CXX: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} g++ SCCACHE_GHA_ENABLED: ${{ github.base_ref == 'main' || github.ref_name == 'main' }} SCCACHE_IDLE_TIMEOUT: '0' + CARGO_BUILD_RUSTC_WRAPPER: ${{ (github.base_ref == 'main' || github.ref_name == 'main') && 'sccache' || '' }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: