Skip to content

Commit 9a2387a

Browse files
authored
Add ccache reset condition for every week (#797)
Every week ccache will be refreshed on PR and master builds of 'Linux Clang Build' job. So build time decrease from 9 to 3 mins. RestoreKeys are needed for partial cache match. Azure doc is : https://bit.ly/3bxSHcz Resolves: OLPEDGE-1731 Signed-off-by: Yaroslav Stefinko <ext-yaroslav.stefinko@here.com>
1 parent ec4b692 commit 9a2387a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ jobs:
6767
- bash: |
6868
sudo apt-get install libcurl4-openssl-dev clang-7 ccache -y --no-install-recommends
6969
echo "##vso[task.prependpath]/usr/lib/ccache"
70+
echo week_$(date +%W) > week_number.txt
7071
displayName: 'Install dependencies'
7172
- task: Cache@2
7273
inputs:
73-
key: 'ccache | "$(Agent.OS)"'
74+
key: 'ccache | "$(Agent.OS)" | ./week_number.txt '
7475
path: $(CCACHE_DIR)
76+
restoreKeys: |
77+
ccache | "$(Agent.OS)"
7578
displayName: ccache
7679
- bash: scripts/linux/psv/build_psv.sh
7780
displayName: 'Linux Clang Build'

0 commit comments

Comments
 (0)