Skip to contentSkip to conversation

ci: fix libabigail cache in GHA

PATCH Applied David Marchand 3 participants 3 messages Jun 20, 2023 – Jun 22, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ci: fix libabigail cache in GHA

In repositories where multiple branches run the ABI checks using different versions of libabigail (for example, a 22.11 branch using libabigail-1.8 and a main branch using libabigail-2.1), a collision happens on the libabigail binary cache entry.
As a single cache entry is used, the content of the cache (let's say the cache was built for libabigail 2.1) won't match what the branch wants to use (in this example running the check for 22.11 branch requires libabigail 1.8).
.ci/linux-build.sh then tries to recompile libabigail but it fails as the packages used for building libabigail are missing.

Add the version to the cache entry name to avoid this collision.

Fixes 443267090edc ("ci: enable v21 ABI checks")
---
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/build.yml +1 -1
index 3b629fcdbd..7b69771a58 100644
@@ -69,7 +69,7 @@ jobs:
       id: get_ref_keys
       run: |
         echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
-        echo 'libabigail=libabigail-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
+        echo 'libabigail=libabigail-${{ env.LIBABIGAIL_VERSION }}-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
       uses: actions/cache@v3
Signature · 1 line
2.40.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · David Marchand

In repositories where multiple branches run the ABI checks using different versions of libabigail (for example, a 22.11 branch using libabigail-1.8 and a main branch using libabigail-2.1), a collision happens on the libabigail binary cache entry.
As a single cache entry is used, the content of the cache (let's say the cache was built for libabigail 2.1) won't match what the branch wants to use (in this example running the check for 22.11 branch requires libabigail 1.8).
.ci/linux-build.sh then tries to recompile libabigail but it fails as the packages used for building libabigail are missing.

Quoted 7 lines

Add the version to the cache entry name to avoid this collision.

Fixes 443267090edc ("ci: enable v21 ABI checks")

---

#2 lore raw

20/06/2023 16:21, Aaron Conole:

Quoted 13 lines
Quoted 11 lines · David Marchand

In repositories where multiple branches run the ABI checks using different versions of libabigail (for example, a 22.11 branch using libabigail-1.8 and a main branch using libabigail-2.1), a collision happens on the libabigail binary cache entry.
As a single cache entry is used, the content of the cache (let's say the cache was built for libabigail 2.1) won't match what the branch wants to use (in this example running the check for 22.11 branch requires libabigail 1.8).
.ci/linux-build.sh then tries to recompile libabigail but it fails as the packages used for building libabigail are missing.

Quoted 8 lines
Quoted 6 lines

Add the version to the cache entry name to avoid this collision.

Fixes 443267090edc ("ci: enable v21 ABI checks")

Applied, thanks.