]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Revert "github: Remove commit ID from cache keys"
authorTobias Brunner <tobias@strongswan.org>
Tue, 21 Apr 2026 09:03:09 +0000 (11:03 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 21 Apr 2026 09:05:19 +0000 (11:05 +0200)
Without commit ID, no new caches are created as the key is always the
same.

This reverts commit 60f4c867809a6280c71e5b62f69cbed75839fa93.

.github/workflows/android.yml
.github/workflows/codeql.yml
.github/workflows/linux.yml
.github/workflows/macos.yml
.github/workflows/sonarcloud.yml
.github/workflows/tkm.yml
.github/workflows/windows.yml

index 1adc9023651cebabe45f3b190ceb21da2b22081c..a36ebb93dae43ba84863ba24587d14abd12f84b0 100644 (file)
@@ -45,7 +45,9 @@ jobs:
       - uses: actions/cache@v5
         with:
           path: ~/.cache/ccache
-          key: ccache-android
+          key: ccache-android-${{ github.sha }}
+          restore-keys: |
+            ccache-android-
       # necessary for newer versions of the Gradle plugin
       - uses: actions/setup-java@v5
         with:
index 65c9612cd04f9daef42d43b405979ba459f86fd0..6343818d2a9230791dd13adce6dcdc4b4d5c1451 100644 (file)
@@ -54,9 +54,11 @@ jobs:
       uses: actions/cache@v5
       with:
         path: ~/.cache/ccache
-        key: ccache-ubuntu-latest-gcc-codeql
+        key: ccache-ubuntu-latest-gcc-codeql-${{ github.sha }}
         restore-keys: |
-          ccache-ubuntu-latest-gcc-all
+          ccache-ubuntu-latest-gcc-codeql
+          ccache-ubuntu-latest-gcc-all-${{ github.sha }}
+          ccache-ubuntu-latest-gcc-all-
           ccache-ubuntu-latest-gcc-
     - if: matrix.language == 'cpp'
       run: |
index bfe40eb0eb52ef29a11d20bb15e99a3ae5fba0a6..e2f64b46dfc97cff0dbfa2857351ffd313434933 100644 (file)
@@ -72,8 +72,9 @@ 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 }}
+          key: ccache-ubuntu-latest-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
+            ccache-ubuntu-latest-${{ env.CC }}-${{ matrix.test }}-
             ccache-ubuntu-latest-${{ env.CC }}-
       - run: |
           sudo apt-get install -qq ccache
@@ -129,9 +130,11 @@ jobs:
           path: |
             ~/.cache/ccache
             ~/.ccache
-          key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}
+          key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
-            ccache-${{ matrix.os }}-${{ env.CC }}-all
+            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 }}-
       - run: |
           sudo apt-get install -qq ccache
@@ -180,8 +183,9 @@ jobs:
           path: |
             ~/.cache/ccache
             ~/.ccache
-          key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}
+          key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
+            ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-
             ccache-${{ matrix.os }}-${{ env.CC }}-
       - run: |
           sudo apt-get install -qq ccache
@@ -214,7 +218,9 @@ jobs:
       - uses: actions/cache@v5
         with:
           path: ~/.cache/ccache
-          key: ccache-alpine
+          key: ccache-alpine-${{ github.sha }}
+          restore-keys: |
+            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
index 412c6b5d33f436c90b90bde5dd4a5d60f977b67c..2bd155bfc78ecb9e17109f419d11fef281a767e6 100644 (file)
@@ -39,7 +39,9 @@ jobs:
       - uses: actions/cache@v5
         with:
           path: ~/Library/Caches/ccache
-          key: ccache-${{ runner.os }}
+          key: ccache-${{ runner.os }}-${{ github.sha }}
+          restore-keys: |
+            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: |
index 9aa439838c371c080dc53e946d3e486f79241947..47d9e8be2fc0355164da698a72bab3395ba3ded6 100644 (file)
@@ -37,7 +37,9 @@ jobs:
         with:
           path: |
             ~/.cache/ccache
-          key: ccache-sonarcloud
+          key: ccache-sonarcloud-${{ github.sha }}
+          restore-keys: |
+            ccache-sonarcloud-
       - run: |
           sudo apt-get install -qq ccache
           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
index 0a6dcd03261acdd7619b9dd5406967e0f5f0c1c8..c6be0af310cba179626f2ad77cee22080b00a98b 100644 (file)
@@ -35,7 +35,9 @@ jobs:
       - uses: actions/cache@v5
         with:
           path: ${{ env.CCACHE_DIR }}
-          key: ccache-tkm
+          key: ccache-tkm-${{ github.sha }}
+          restore-keys: |
+            ccache-tkm-
       - name: Build Docker Image
         run: docker build -t strongswan-tkm -f testing/tkm/Dockerfile testing
       - name: Run Tests in Container
index ae80bf56d86ae38bdb6eefccae59b9045ff53f3c..8adce49bd5a220bda5559e1a2622feea2784f483 100644 (file)
@@ -42,7 +42,9 @@ jobs:
       - uses: actions/cache@v5
         with:
           path: ~/.cache/ccache
-          key: ccache-${{ runner.os }}-${{ matrix.test }}
+          key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.sha }}
+          restore-keys: |
+            ccache-${{ runner.os }}-${{ matrix.test }}-
       - run: |
           sudo apt-get install -qq ccache
           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV