From 324e929390eba1537eb9fe9227ae54a884787508 Mon Sep 17 00:00:00 2001 From: Samson <16504129+sagudev@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:36:33 +0100 Subject: [PATCH] Set CCACHE only for github hosted runner (#34670) I believe this should fix https://github.com/servo/servo/issues/34603#issuecomment-2544621524 Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> --- .github/workflows/windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a9c0805c80c..00385ae8876 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -45,7 +45,6 @@ on: env: RUST_BACKTRACE: 1 SHELL: /bin/bash - CCACHE: "ccache" CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target # clang_sys will search msys path before Program Files\LLVM # so we need to override this behaviour until we update clang-sys @@ -102,6 +101,9 @@ jobs: # FIXME: “Error: Restoring cache failed: Error: Unable to locate executable file: sh.” if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }} uses: hendrikmuhs/ccache-action@v1.2 + - if: ${{ ! fromJSON(needs.runner-select.outputs.is-self-hosted) }} + run: | + echo CCACHE=ccache >> $GITHUB_ENV # Install missing tools in a GitHub-hosted runner. # Workaround for https://github.com/actions/runner-images/issues/10001: