diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2022-01-07 19:27:20 +0100 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-01-10 09:55:45 +0330 |
commit | d21c38a72df2f69b48bcd500978c701045c29e6b (patch) | |
tree | bb45b91132e11dd1e2699d1828d7c6118ead3e6e | |
parent | 43008267b29f29d98a9539b46cdafe7fa50824b0 (diff) | |
download | serenity-d21c38a72df2f69b48bcd500978c701045c29e6b.zip |
CI: Hash only relevant files for the key of the compiler cache
In the last few commits, a second patch was added to the LLVM toolchain,
and it no longer uses our binutils patch. This commit changes the CI
cache keys accordingly, in order to prevent unnecessary rebuilds of both
toolchains when only one is changed.
The Clang toolchain's cache now only takes into account patches that
begin with `llvm`, and the GNU toolchain excludes those from the hash
calculation. We now also hash the two CMake cache files that we use for
building LLVM and its runtime libraries.
-rw-r--r-- | .github/workflows/cmake.yml | 4 | ||||
-rw-r--r-- | Meta/Azure/Caches.yml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 84f0c10882..de7a3588ca 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -73,8 +73,8 @@ jobs: # *and* as actual output variable, in this order. message(" set-output name=time::${current_date}") message("::set-output name=time::${current_date}") - message(" set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/*[!llvm].patch', 'Toolchain/BuildIt.sh') }}") - message("::set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/*[!llvm].patch', 'Toolchain/BuildIt.sh') }}") + message(" set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/[!llvm]*.patch', 'Toolchain/BuildIt.sh') }}") + message("::set-output name=libc_headers::${{ hashFiles('Userland/Libraries/LibC/**/*.h', 'Userland/Libraries/LibPthread/**/*.h', 'Toolchain/Patches/[!llvm]*.patch', 'Toolchain/BuildIt.sh') }}") - name: Toolchain cache # TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged. diff --git a/Meta/Azure/Caches.yml b/Meta/Azure/Caches.yml index ca2d748048..de0ec54ea3 100644 --- a/Meta/Azure/Caches.yml +++ b/Meta/Azure/Caches.yml @@ -18,13 +18,13 @@ steps: - ${{ if eq(parameters.toolchain, 'clang') }}: - task: Cache@2 inputs: - key: '"toolchain" | "x86_64" | Toolchain/BuildClang.sh | Toolchain/Patches/*[!gcc].patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' + key: '"toolchain" | "x86_64" | Toolchain/BuildClang.sh | Toolchain/Patches/llvm*.patch | Toolchain/CMake/*.cmake | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' path: $(Build.SourcesDirectory)/Toolchain/Cache displayName: 'Toolchain Prebuilt Cache' - ${{ if eq(parameters.toolchain, 'gcc') }}: - task: Cache@2 inputs: - key: '"toolchain" | "${{ parameters.arch }}" | Toolchain/BuildIt.sh | Toolchain/Patches/*[!llvm].patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' + key: '"toolchain" | "${{ parameters.arch }}" | Toolchain/BuildIt.sh | Toolchain/Patches/[!llvm]*.patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' path: $(Build.SourcesDirectory)/Toolchain/Cache displayName: 'Toolchain Prebuilt Cache' |