From: Tobias Brunner Date: Fri, 20 Aug 2021 09:42:39 +0000 (+0200) Subject: github: Remove github.ref from cache keys X-Git-Tag: 5.9.4dr2~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b4a34ff5ea8268792fa97cc3518f34744d3dc6ca;p=thirdparty%2Fstrongswan.git github: Remove github.ref from cache keys 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). --- diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f2241dd175..d1b909dc1c 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 442c7e2e7b..b1834a842a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c89678a558..ec140c2923 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 0a2accff1d..c647579047 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 31334c504a..3e0c29ab36 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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