Skip to content

Commit 29fa54e

Browse files
committed
CI: Force updates to the cache
1 parent ced1cc5 commit 29fa54e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,18 @@ jobs:
6363
if: ${{ matrix.name != 'linux-gcc-x86_64' }}
6464
uses: actions/checkout@v4
6565

66+
- name: Restore and update cache
67+
if: github.event_name != 'pull_request'
68+
uses: actions/cache@v4
69+
with:
70+
path: |
71+
~/cache
72+
~/ccache
73+
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.run_id }} # generate a new key every time to trigger an update
74+
restore-keys: ${{ runner.os }}-${{ matrix.target }}
75+
6676
- name: Restore cache
77+
if: github.event_name == 'pull_request'
6778
uses: actions/cache@v4
6879
with:
6980
path: |
@@ -86,12 +97,12 @@ jobs:
8697
- name: Craft unshelve
8798
run: |
8899
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --unshelve "${env:GITHUB_WORKSPACE}/.craft.shelf"
100+
# bootsrtap in case the shelf was empty
101+
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c craft
89102
90103
- name: Prepare
91104
run: |
92105
New-Item -ItemType Directory "${env:GITHUB_WORKSPACE}/binaries/"
93-
# bootsrtap
94-
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c craft
95106
# settings
96107
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set forceAsserts=true opencloud/opencloud-desktop
97108
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set srcDir="${env:GITHUB_WORKSPACE}" opencloud/opencloud-desktop

0 commit comments

Comments
 (0)