diff --git a/Meta/Azure/Caches.yml b/Meta/Azure/Caches.yml index fc2b74bc2b..ad9d1d6e50 100644 --- a/Meta/Azure/Caches.yml +++ b/Meta/Azure/Caches.yml @@ -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'