Skip to content

Commit

Permalink
ci: fix libabigail cache in GHA
Browse files Browse the repository at this point in the history
[ upstream commit 870623ad9ed33f21102a5ddc18e15d726e65204d ]

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: 4432670 ("ci: enable v21 ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
  • Loading branch information
david-marchand authored and kevintraynor committed Jul 12, 2023
1 parent 8849791 commit ad9d440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
- name: Retrieve ccache cache
uses: actions/cache@v3
Expand Down

0 comments on commit ad9d440

Please sign in to comment.