summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2025-11-22 11:30:33 -0600
committerGitHub <noreply@github.com>2025-11-22 11:30:33 -0600
commita42551063d2723764e3b595f679bb83852101002 (patch)
tree2038233fd5102049071de4255e0cc38cbfad7463 /.github/workflows
parent126a42e3007daa53ff1cb978d74fbf752b059018 (diff)
Tweaks to github actions cache (#1359)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml33
1 files changed, 15 insertions, 18 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7b67de5a2..0d198d3f5 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -18,9 +18,9 @@ jobs:
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.ref_name == github.event.repository.default_branch }}
- key: ${{ runner.os }}-otr-ccache-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-otr-ccache-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-otr-ccache-${{ github.ref }}
+ ${{ runner.os }}-otr-ccache-${{ github.event.repository.default_branch }}
${{ runner.os }}-otr-ccache
- name: Install dependencies
run: |
@@ -29,9 +29,9 @@ jobs:
- name: Restore Cached deps folder
uses: actions/cache/restore@v4
with:
- key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-deps-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-deps-${{ github.ref }}-
+ ${{ runner.os }}-deps-${{ github.event.repository.default_branch }}
${{ runner.os }}-deps-
path: deps
- name: Create deps folder
@@ -87,9 +87,9 @@ jobs:
with:
create-symlink: true
save: ${{ github.ref_name == github.event.repository.default_branch }}
- key: ${{ runner.os }}-14-ccache-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-14-ccache-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-14-ccache-${{ github.ref }}
+ ${{ runner.os }}-14-ccache-${{ github.event.repository.default_branch }}
${{ runner.os }}-14-ccache
# Needed to apply sudo for macports cache restore
- name: Install gtar wrapper
@@ -101,10 +101,7 @@ jobs:
id: restore-cache-macports
uses: actions/cache/restore@v4
with:
- key: ${{ runner.os }}-14-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-14-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}-
- ${{ runner.os }}-14-macports-
+ key: ${{ runner.os }}-14-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}
path: /opt/local/
# Updated PATH applies to the next step and onwards
- name: Install MacPorts (if necessary)
@@ -166,17 +163,17 @@ jobs:
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.ref_name == github.event.repository.default_branch }}
- key: ${{ runner.os }}-ccache-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-ccache-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-ccache-${{ github.ref }}
+ ${{ runner.os }}-ccache-${{ github.event.repository.default_branch }}
${{ runner.os }}-ccache
- name: Restore Cached deps folder
id: restore-cache-deps
uses: actions/cache/restore@v4
with:
- key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-deps-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-deps-${{ github.ref }}-
+ ${{ runner.os }}-deps-${{ github.event.repository.default_branch }}
${{ runner.os }}-deps-
path: deps
- name: Create deps folder
@@ -271,17 +268,17 @@ jobs:
max-size: "2G"
evict-old-files: job
save: ${{ github.ref_name == github.event.repository.default_branch }}
- key: ${{ runner.os }}-ccache-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-ccache-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-ccache-${{ github.ref }}
+ ${{ runner.os }}-ccache-${{ github.event.repository.default_branch }}
${{ runner.os }}-ccache
- name: Restore Cached VCPKG folder
id: restore-cache-vcpkg
uses: actions/cache/restore@v4
with:
- key: ${{ runner.os }}-vcpkg-${{ github.ref }}-${{ github.sha }}
+ key: ${{ runner.os }}-vcpkg-${{ github.ref_name }}
restore-keys: |
- ${{ runner.os }}-vcpkg-${{ github.ref }}-
+ ${{ runner.os }}-vcpkg-${{ github.event.repository.default_branch }}
${{ runner.os }}-vcpkg-
path: vcpkg
- name: Configure Developer Command Prompt