diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-10-17 12:45:04 -0400 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-10-18 03:25:26 -0700 |
commit | b11a34330a1ddab811419a696056e10448e7991b (patch) | |
tree | e7e9bb4831a24a2361450e3198a19e42ab9cfb75 /Meta/Azure/Caches.yml | |
parent | 957f98805a2f668576b130325395ac41cd6936a9 (diff) | |
download | serenity-b11a34330a1ddab811419a696056e10448e7991b.zip |
CI: Build the Clang toolchain a single time for both onboard pipelines
As of the Clang 13 upgrade, we only need to build the toolchain once and
can use that toolchain for both x86_64 and i686. To do this, this breaks
the main Azure configuration into 3 "stages" (Lagom, Toolchain, and
Serenity), where the Serenity stage depends on the Toolchain stage.
This has the added benefit of uploading a new prebuilt toolchain cache
sooner than before, which should help alleviate pressure from PRs.
Diffstat (limited to 'Meta/Azure/Caches.yml')
-rw-r--r-- | Meta/Azure/Caches.yml | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/Meta/Azure/Caches.yml b/Meta/Azure/Caches.yml index 1971b2054d..a71cf85c56 100644 --- a/Meta/Azure/Caches.yml +++ b/Meta/Azure/Caches.yml @@ -4,8 +4,8 @@ parameters: toolchain: 'gcc' build_directory: '' ccache_version: 1 # Increment this number if CI has trouble with ccache. - serenity_ccache_path: $(CCACHE_DIR) - toolchain_ccache_path: $(CCACHE_DIR) + serenity_ccache_path: '' + toolchain_ccache_path: '' toolchain_ccache_size: $(CCACHE_MAXSIZE) with_unicode_caches: true @@ -18,7 +18,7 @@ steps: - ${{ if eq(parameters.toolchain, 'clang') }}: - task: Cache@2 inputs: - key: '"toolchain" | "${{ parameters.arch }}" | Toolchain/BuildClang.sh | Toolchain/Patches/*[!gcc].patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' + key: '"toolchain" | "x86_64" | Toolchain/BuildClang.sh | Toolchain/Patches/*[!gcc].patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h' path: $(Build.SourcesDirectory)/Toolchain/Cache displayName: 'Toolchain Prebuilt Cache' - ${{ if eq(parameters.toolchain, 'gcc') }}: @@ -28,26 +28,33 @@ steps: path: $(Build.SourcesDirectory)/Toolchain/Cache displayName: 'Toolchain Prebuilt Cache' + - ${{ if ne(parameters.toolchain_ccache_path, '') }}: + - task: Cache@2 + inputs: + key: '"toolchain ccache" | "x86_64" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" | "$(timestamp)"' + restoreKeys: | + "toolchain ccache" | "x86_64" | "${{ 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' + + - ${{ if ne(parameters.serenity_ccache_path, '') }}: - task: Cache@2 inputs: - key: '"toolchain ccache" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" | "$(timestamp)"' + key: '"ccache" | "${{ parameters.os }}" | "${{ 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' + "ccache" | "${{ parameters.os }}" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" + path: ${{ parameters.serenity_ccache_path }} + displayName: 'Serenity 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: - key: '"ccache" | "${{ parameters.os }}" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" | "$(timestamp)"' - restoreKeys: | - "ccache" | "${{ parameters.os }}" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" - path: ${{ parameters.serenity_ccache_path }} - displayName: 'Serenity Compiler Cache' + CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M 5G + CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s + displayName: 'Configure Serenity ccache' - ${{ if eq(parameters.with_unicode_caches, true) }}: - task: Cache@2 @@ -61,8 +68,3 @@ steps: key: '"unicode_locale" | Meta/CMake/unicode_data.cmake' path: $(Build.SourcesDirectory)/${{ parameters.build_directory }}/CLDR displayName: 'UnicodeLocale Cache' - - - script: | - CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M 5G - CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s - displayName: 'Configure Serenity ccache' |