summaryrefslogtreecommitdiff
path: root/Meta/Azure/Caches.yml
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-09-21 06:42:35 -0400
committerIdan Horowitz <idan.horowitz@gmail.com>2021-09-21 15:39:17 +0300
commit4a4e614387beead8c163189f0376e8bc480920ee (patch)
treef398d17f579522e63cae6766cb35a3cb982054a5 /Meta/Azure/Caches.yml
parent5a2f41fff079040852f3ba8fe7bedeb17b50e734 (diff)
downloadserenity-4a4e614387beead8c163189f0376e8bc480920ee.zip
CI: Set ccache path based on template parameter
Currently, the templated steps in Caches.yml rely on the environment variable CCACHE_DIR being set to configure the ccache location. To prepare for multiple ccache paths, do not rely on this environment variable because only one ccache can use it at a time. Instead, pass the path into the template as a parameter.
Diffstat (limited to 'Meta/Azure/Caches.yml')
-rw-r--r--Meta/Azure/Caches.yml11
1 files changed, 6 insertions, 5 deletions
diff --git a/Meta/Azure/Caches.yml b/Meta/Azure/Caches.yml
index f65fd2a739..1351a895ce 100644
--- a/Meta/Azure/Caches.yml
+++ b/Meta/Azure/Caches.yml
@@ -4,6 +4,7 @@ parameters:
toolchain: 'gcc'
build_directory: ''
ccache_version: 1 # Increment this number if CI has trouble with ccache.
+ serenity_ccache_path: $(CCACHE_DIR)
with_unicode_caches: true
steps:
@@ -30,8 +31,8 @@ steps:
key: '"ccache" | "${{ parameters.os }}" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" | "$(timestamp)"'
restoreKeys: |
"ccache" | "${{ parameters.os }}" | "${{ parameters.arch }}" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}"
- path: $(CCACHE_DIR)
- displayName: 'Compiler Cache'
+ path: ${{ parameters.serenity_ccache_path }}
+ displayName: 'Serenity Compiler Cache'
- ${{ if eq(parameters.with_unicode_caches, true) }}:
- task: Cache@2
@@ -47,6 +48,6 @@ steps:
displayName: 'UnicodeLocale Cache'
- script: |
- ccache -M 5G
- ccache -s
- displayName: 'Configure ccache'
+ CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M 5G
+ CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s
+ displayName: 'Configure Serenity ccache'