-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with the fact that GitHub won't do automatic cache replacement
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,10 +80,10 @@ jobs: | |
|
||
- name: Setup sccache | ||
uses: compnerd/[email protected] | ||
id: sccache | ||
with: | ||
max-size: 100M | ||
key: ${{ matrix.os }}-build_tools | ||
restore-keys: ${{ matrix.os }}-build_tools | ||
variant: sccache | ||
append-timestamp: false | ||
|
||
|
@@ -120,6 +120,16 @@ jobs: | |
name: build-tools-${{ matrix.os }} | ||
path: ${{ github.workspace }}/BinaryCache/0/tools.tar | ||
|
||
- name: Clear old sccache | ||
if: ${{ steps.sccache.outputs.test-cache-hit }} | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete ${{ matrix.os }}-build_tools --confirm -R ${{ github.repository }} | ||
continue-on-error: true | ||
|
||
distribution: | ||
needs: [build_tools, create_tag] | ||
|
||
|
@@ -279,11 +289,11 @@ jobs: | |
version: 1.11.1 | ||
|
||
- name: Setup sccache | ||
id: sccache | ||
uses: compnerd/[email protected] | ||
with: | ||
max-size: ${{ matrix.compile_cache_max_size }} | ||
key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-package | ||
restore-keys: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-package | ||
variant: sccache | ||
append-timestamp: false | ||
|
||
|
@@ -394,3 +404,13 @@ jobs: | |
with: | ||
files: ${{ env.PACKAGE_NAME }}${{ matrix.package_suffix }} | ||
tag_name: ${{ needs.create_tag.outputs.tag_name }} | ||
|
||
- name: Clear old sccache | ||
if: ${{ steps.sccache.outputs.test-cache-hit }} | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete ${{ matrix.os }}-build_tools --confirm -R ${{ github.repository }} | ||
continue-on-error: true |