mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
CI: Bust the toolchain ccache when the toolchain's major version changes
The build will be entirely clean anyways, so no need to preserve the previous version's ccache.
This commit is contained in:
parent
4cc8266727
commit
891c4ac68e
Notes:
sideshowbarker
2024-07-17 02:59:43 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/891c4ac68e Pull-request: https://github.com/SerenityOS/serenity/pull/24102
1 changed files with 13 additions and 2 deletions
|
@ -21,6 +21,12 @@ steps:
|
|||
key: '"toolchain" | "x86_64" | Toolchain/BuildClang.sh | Toolchain/Patches/llvm/*.patch | Toolchain/CMake/*.cmake | Userland/Libraries/LibC/**/*.h'
|
||||
path: $(Build.SourcesDirectory)/Toolchain/Cache
|
||||
displayName: 'Toolchain Prebuilt Cache'
|
||||
|
||||
- script: |
|
||||
source $(Build.SourcesDirectory)/Ports/llvm/package.sh
|
||||
echo "##vso[task.setvariable variable=toolchain_version]$(echo ${version} | cut -d'.' -f1)"
|
||||
displayName: 'Toolchain Version'
|
||||
|
||||
- ${{ if eq(parameters.toolchain, 'gcc') }}:
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
|
@ -28,12 +34,17 @@ steps:
|
|||
path: $(Build.SourcesDirectory)/Toolchain/Cache
|
||||
displayName: 'Toolchain Prebuilt Cache'
|
||||
|
||||
- script: |
|
||||
source $(Build.SourcesDirectory)/Ports/gcc/package.sh
|
||||
echo "##vso[task.setvariable variable=toolchain_version]$(echo ${version} | cut -d'.' -f1)"
|
||||
displayName: 'Toolchain Version'
|
||||
|
||||
- ${{ if ne(parameters.toolchain_ccache_path, '') }}:
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"toolchain ccache" | "x86_64" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}" | "$(timestamp)"'
|
||||
key: '"toolchain ccache" | "x86_64" | "${{ parameters.toolchain }}" | "$(toolchain_version)" | "${{ parameters.ccache_version }}" | "$(timestamp)"'
|
||||
restoreKeys: |
|
||||
"toolchain ccache" | "x86_64" | "${{ parameters.toolchain }}" | "${{ parameters.ccache_version }}"
|
||||
"toolchain ccache" | "x86_64" | "${{ parameters.toolchain }}" | "$(toolchain_version)" | "${{ parameters.ccache_version }}"
|
||||
path: ${{ parameters.toolchain_ccache_path }}
|
||||
displayName: 'Toolchain Compiler Cache'
|
||||
|
||||
|
|
Loading…
Reference in a new issue