Commit 60f4c86780 for strongswan.org
commit 60f4c867809a6280c71e5b62f69cbed75839fa93
Author: Tobias Brunner <tobias@strongswan.org>
Date: Fri Apr 17 15:18:11 2026 +0200
github: Remove commit ID from cache keys
This reduces the cache storage for active branches and since caches for
different branches are separate and we abort previous builds of the same
branch, this is not necessary to ensure caches can successfully be stored.
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index a36ebb93da..1adc902365 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -45,9 +45,7 @@ jobs:
- uses: actions/cache@v5
with:
path: ~/.cache/ccache
- key: ccache-android-${{ github.sha }}
- restore-keys: |
- ccache-android-
+ key: ccache-android
# necessary for newer versions of the Gradle plugin
- uses: actions/setup-java@v5
with:
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 6343818d2a..65c9612cd0 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -54,11 +54,9 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.cache/ccache
- key: ccache-ubuntu-latest-gcc-codeql-${{ github.sha }}
+ key: ccache-ubuntu-latest-gcc-codeql
restore-keys: |
- ccache-ubuntu-latest-gcc-codeql
- ccache-ubuntu-latest-gcc-all-${{ github.sha }}
- ccache-ubuntu-latest-gcc-all-
+ ccache-ubuntu-latest-gcc-all
ccache-ubuntu-latest-gcc-
- if: matrix.language == 'cpp'
run: |
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index e2f64b46df..bfe40eb0eb 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -72,9 +72,8 @@ jobs:
# builds and, similarly, builds with leak-detective only differ in two
# files (LD itself and library.c); but different tests build different
# dependencies, so different caches are needed
- key: ccache-ubuntu-latest-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
+ key: ccache-ubuntu-latest-${{ env.CC }}-${{ matrix.test }}
restore-keys: |
- ccache-ubuntu-latest-${{ env.CC }}-${{ matrix.test }}-
ccache-ubuntu-latest-${{ env.CC }}-
- run: |
sudo apt-get install -qq ccache
@@ -130,11 +129,9 @@ jobs:
path: |
~/.cache/ccache
~/.ccache
- key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
+ key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}
restore-keys: |
- ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-
- ccache-${{ matrix.os }}-${{ env.CC }}-all-${{ github.sha }}
- ccache-${{ matrix.os }}-${{ env.CC }}-all-
+ ccache-${{ matrix.os }}-${{ env.CC }}-all
ccache-${{ matrix.os }}-${{ env.CC }}-
- run: |
sudo apt-get install -qq ccache
@@ -183,9 +180,8 @@ jobs:
path: |
~/.cache/ccache
~/.ccache
- key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
+ key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}
restore-keys: |
- ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-
ccache-${{ matrix.os }}-${{ env.CC }}-
- run: |
sudo apt-get install -qq ccache
@@ -218,9 +214,7 @@ jobs:
- uses: actions/cache@v5
with:
path: ~/.cache/ccache
- key: ccache-alpine-${{ github.sha }}
- restore-keys: |
- ccache-alpine-
+ key: ccache-alpine
- run: ccache -z
# don't use the default action as we don't want to build dependencies or install bash
- run: ./scripts/test.sh deps
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 2bd155bfc7..412c6b5d33 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -39,9 +39,7 @@ jobs:
- uses: actions/cache@v5
with:
path: ~/Library/Caches/ccache
- key: ccache-${{ runner.os }}-${{ github.sha }}
- restore-keys: |
- ccache-${{ runner.os }}-
+ key: ccache-${{ runner.os }}
# workaround for conflict between Python installed in the image and via brew
- run: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print
- run: |
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 47d9e8be2f..9aa439838c 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -37,9 +37,7 @@ jobs:
with:
path: |
~/.cache/ccache
- key: ccache-sonarcloud-${{ github.sha }}
- restore-keys: |
- ccache-sonarcloud-
+ key: ccache-sonarcloud
- run: |
sudo apt-get install -qq ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
diff --git a/.github/workflows/tkm.yml b/.github/workflows/tkm.yml
index c6be0af310..0a6dcd0326 100644
--- a/.github/workflows/tkm.yml
+++ b/.github/workflows/tkm.yml
@@ -35,9 +35,7 @@ jobs:
- uses: actions/cache@v5
with:
path: ${{ env.CCACHE_DIR }}
- key: ccache-tkm-${{ github.sha }}
- restore-keys: |
- ccache-tkm-
+ key: ccache-tkm
- name: Build Docker Image
run: docker build -t strongswan-tkm -f testing/tkm/Dockerfile testing
- name: Run Tests in Container
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 8adce49bd5..ae80bf56d8 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -42,9 +42,7 @@ jobs:
- uses: actions/cache@v5
with:
path: ~/.cache/ccache
- key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.sha }}
- restore-keys: |
- ccache-${{ runner.os }}-${{ matrix.test }}-
+ key: ccache-${{ runner.os }}-${{ matrix.test }}
- run: |
sudo apt-get install -qq ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV