diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-09-21 06:50:41 -0400 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-09-21 15:39:17 +0300 |
commit | 8084957e8864648269c34d3c7cf41eeb24a4309b (patch) | |
tree | 3a5eea5a6ab6b31d14aeb69a1839fce14e15496d /Meta/Azure/Caches.yml | |
parent | 4a4e614387beead8c163189f0376e8bc480920ee (diff) | |
download | serenity-8084957e8864648269c34d3c7cf41eeb24a4309b.zip |
CI: Create a secondary ccache for the Clang toolchain build
We bust the prebuilt cache when any header in e.g. LibC changes. Doing a
full toolchain rebuild probably isn't necessary, so this adds a separate
ccache to speed up toolchain builds.
Diffstat (limited to 'Meta/Azure/Caches.yml')
-rw-r--r-- | Meta/Azure/Caches.yml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Meta/Azure/Caches.yml b/Meta/Azure/Caches.yml index 1351a895ce..1971b2054d 100644 --- a/Meta/Azure/Caches.yml +++ b/Meta/Azure/Caches.yml @@ -5,6 +5,8 @@ parameters: build_directory: '' ccache_version: 1 # Increment this number if CI has trouble with ccache. serenity_ccache_path: $(CCACHE_DIR) + toolchain_ccache_path: $(CCACHE_DIR) + toolchain_ccache_size: $(CCACHE_MAXSIZE) with_unicode_caches: true steps: @@ -18,13 +20,26 @@ steps: inputs: key: '"toolchain" | "${{ parameters.arch }}" | Toolchain/BuildClang.sh | Toolchain/Patches/*[!gcc].patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' path: $(Build.SourcesDirectory)/Toolchain/Cache - displayName: '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' path: $(Build.SourcesDirectory)/Toolchain/Cache - displayName: 'Toolchain Cache' + displayName: 'Toolchain Prebuilt Cache' + + - task: Cache@2 + inputs: + key: '"toolchain ccache" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" | "$(timestamp)"' + restoreKeys: | + "toolchain ccache" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" + path: ${{ parameters.toolchain_ccache_path }} + displayName: 'Toolchain Compiler Cache' + + - script: | + CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -M ${{ parameters.toolchain_ccache_size }} + CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -s + displayName: 'Configure Toolchain ccache' - task: Cache@2 inputs: |