From 057cd35a6d97ef08e041120357c4d7647f191ac3 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Thu, 3 Jun 2021 15:42:40 +0300 Subject: [PATCH] CI: Skip saving the toolchain and ccache caches in PR workflows This speeds up CI by removing some cache thrashing caused by PRs that change cache-related files (but that were not merged yet). --- .github/workflows/cmake.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8eea0379fa..9b77370ebb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -68,7 +68,10 @@ jobs: message(" set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/*.patch', 'Toolchain/BuildIt.sh') }}") message("::set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/*.patch', 'Toolchain/BuildIt.sh') }}") - name: Toolchain cache - uses: actions/cache@v2 + # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. + uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b + env: + CACHE_SKIP_SAVE: ${{ github.event_name == 'pull_request' }} with: path: ${{ github.workspace }}/Toolchain/Cache/ # This assumes that *ALL* LibC and LibPthread headers have an impact on the Toolchain. @@ -79,7 +82,10 @@ jobs: run: TRY_USE_LOCAL_TOOLCHAIN=y ${{ github.workspace }}/Toolchain/BuildIt.sh - name: ccache(1) cache # Pull the ccache *after* building the toolchain, in case building the Toolchain somehow interferes. - uses: actions/cache@v2 + # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. + uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b + env: + CACHE_SKIP_SAVE: ${{ github.event_name == 'pull_request' }} with: path: /home/runner/.ccache # If you're here because ccache broke (it never should), increment matrix.ccache-mark.