From 89aef7f678402a4b095d5d22f71ceccb939df263 Mon Sep 17 00:00:00 2001 From: Zion Nimchuk Date: Sun, 23 Feb 2025 22:53:55 -0800 Subject: [PATCH] Fix Azure and Github Actions CI caching --- .github/workflows/rpcs3.yml | 11 ++++++++--- azure-pipelines.yml | 16 ++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rpcs3.yml b/.github/workflows/rpcs3.yml index c1e3f7276af4..d9e32694aae4 100644 --- a/.github/workflows/rpcs3.yml +++ b/.github/workflows/rpcs3.yml @@ -60,7 +60,9 @@ jobs: uses: actions/cache@main with: path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-ccache-${{ matrix.compiler }} + key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}-${{github.run_id}} + restore-keys: | + ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}- - name: Docker setup and build run: | @@ -118,8 +120,11 @@ jobs: uses: actions/cache@main with: path: ${{ env.CACHE_DIR }} - key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ hashFiles('llvm.lock') }}-${{ hashFiles('glslang.lock') }}" - restore-keys: ${{ runner.os }}-${{ env.COMPILER }} + key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ hashFiles('llvm.lock') }}-${{ hashFiles('glslang.lock') }}-${{github.run_id}}" + restore-keys: | + "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-" + "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-" + "${{ runner.os }}-${{ env.COMPILER }}-" - name: Download and unpack dependencies shell: bash diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1c5b0e24dda7..5308ce67b9c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,7 +33,9 @@ jobs: steps: - task: Cache@2 inputs: - key: ccache | $(Agent.OS) | $(COMPILER) + key: ccache | $(Agent.OS) | $(COMPILER) | $(Build.SourceVersion) + restoreKeys: | + ccache | $(Agent.OS) | $(COMPILER) path: $(CCACHE_DIR) displayName: ccache @@ -89,9 +91,11 @@ jobs: - task: Cache@2 inputs: - key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | llvm.lock | glslang.lock + key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | llvm.lock | glslang.lock | $(Build.SourceVersion) path: $(CACHE_DIR) restoreKeys: | + $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) + $(Agent.OS) | $(COMPILER) | "$(QT_VER)" $(Agent.OS) | $(COMPILER) displayName: Cache @@ -142,10 +146,10 @@ jobs: steps: - task: Cache@2 inputs: - key: ccache | "$(Agent.OS)" + key: ccache | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(Build.SourceVersion)" path: $(CCACHE_DIR) restoreKeys: | - ccache | "$(Agent.OS)" + ccache | "$(Agent.OS)" | "$(Agent.OSArchitecture)" displayName: Ccache cache - task: Cache@2 @@ -203,10 +207,10 @@ jobs: steps: - task: Cache@2 inputs: - key: ccache | "$(Agent.OS)" + key: ccache | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(Build.SourceVersion)" path: $(CCACHE_DIR) restoreKeys: | - ccache | "$(Agent.OS)" + ccache | "$(Agent.OS)" | "$(Agent.OSArchitecture)" displayName: Ccache cache - task: Cache@2