Skip to content

Commit

Permalink
Fix Azure and Github Actions CI caching
Browse files Browse the repository at this point in the history
  • Loading branch information
hcorion authored and Megamouse committed Feb 24, 2025
1 parent a44bd97 commit 4794558
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/rpcs3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4794558

Please sign in to comment.