]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Remove github.ref from cache keys
authorTobias Brunner <tobias@strongswan.org>
Fri, 20 Aug 2021 09:42:39 +0000 (11:42 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 20 Aug 2021 09:42:39 +0000 (11:42 +0200)
According to the documentation for actions/cache, the lookup is already
scoped to the current branch (with fallback to any base branch including
the default branch).

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

index f2241dd175e8e834c657d9ecb10f72b4055863f6..d1b909dc1c830b1f924867792b3529819ce2e461 100644 (file)
@@ -38,9 +38,8 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/.ccache
-          key: ccache-android-${{ github.ref }}:${{ github.sha }}
+          key: ccache-android-${{ github.sha }}
           restore-keys: |
-            ccache-android-${{ github.ref }}:
             ccache-android-
       - run: |
           sudo apt-get install -qq ccache
index 442c7e2e7bb0362a988b67b0b628bb5cd314af42..b1834a842a2af667ba9002cb0b991d990f45607f 100644 (file)
@@ -62,9 +62,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-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
+          key: ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
-            ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:
             ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-
             ccache-${{ runner.os }}-${{ env.CC }}-
       - run: |
@@ -98,13 +97,11 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/.ccache
-          key: ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
+          key: ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
-            ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:
             ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-
             ccache-${{ runner.os }}-${{ env.CC }}-
-            ccache-${{ runner.os }}-${{ env.CC }}-all-${{ github.ref }}:${{ github.sha }}
-            ccache-${{ runner.os }}-${{ env.CC }}-all-${{ github.ref }}:
+            ccache-${{ runner.os }}-${{ env.CC }}-all-${{ github.sha }}
             ccache-${{ runner.os }}-${{ env.CC }}-all-
             ccache-${{ runner.os }}-${{ env.CC }}-
       - run: |
@@ -140,9 +137,8 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/.ccache
-          key: ccache-bionic-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
+          key: ccache-bionic-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
-            ccache-bionic-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:
             ccache-bionic-${{ env.CC }}-${{ matrix.test }}-
             ccache-bionic-${{ env.CC }}-
       - run: |
@@ -181,9 +177,8 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/.ccache
-          key: ccache-xenial-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
+          key: ccache-xenial-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
-            ccache-xenial-${{ env.CC }}-${{ matrix.test }}-${{ github.ref }}:
             ccache-xenial-${{ env.CC }}-${{ matrix.test }}-
             ccache-xenial-${{ env.CC }}-
       - run: |
index c89678a558e9e69c302c7f17a0112b0f26132f96..ec140c292338f3b05edbdda43c2c26451cd76c4b 100644 (file)
@@ -31,9 +31,8 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/Library/Caches/ccache
-          key: ccache-${{ runner.os }}-${{ github.ref }}:${{ github.sha }}
+          key: ccache-${{ runner.os }}-${{ github.sha }}
           restore-keys: |
-            ccache-${{ runner.os }}-${{ github.ref }}:
             ccache-${{ runner.os }}-
       - run: |
           brew install ccache
index 0a2accff1dbb25f512ab2ebfe4250b8ef12fbee6..c647579047361881d505719713aa22474a15c2c5 100644 (file)
@@ -34,9 +34,8 @@ jobs:
           path: |
             ~/.ccache
             ~/.sonar-cache
-          key: ccache-sonarcloud-${{ github.ref }}:${{ github.sha }}
+          key: ccache-sonarcloud-${{ github.sha }}
           restore-keys: |
-            ccache-sonarcloud-${{ github.ref }}:
             ccache-sonarcloud-
       - run: |
           sudo apt-get install -qq ccache
index 31334c504afc0514043adc8f23277dc237af996c..3e0c29ab36f87f8316fee186ca4bef37d409ee8f 100644 (file)
@@ -38,9 +38,8 @@ jobs:
       - uses: actions/cache@v2
         with:
           path: ~/.ccache
-          key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
+          key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
-            ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:
             ccache-${{ runner.os }}-${{ matrix.test }}-
       - run: |
           sudo apt-get install -qq ccache