Skip to content

Commit ef2535d

Browse files
ci: fix ccache for Ubuntu 22.04
By default (and if no $HOME/.ccache directory exists), Ubuntu 22.04 ccache stores its data in $HOME/.cache/ccache. As a result, since the switch to Ubuntu 22.04, ccache has not been functional. Set the ccache directory to the location cached in GHA. Note: ccache is working with the Fedora containers, as the presence of a .ccache directory made ccache use it, still, explicitly set CCACHE_DIR for consistency. Fixes: 8400093 ("ci: bump tested distributions in GHA") Cc: [email protected] Signed-off-by: David Marchand <[email protected]>
1 parent 860019b commit ef2535d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
4646
BUILD_EXAMPLES: ${{ contains(matrix.config.checks, 'examples') }}
4747
CC: ccache ${{ matrix.config.compiler }}
48+
CCACHE_DIR: $HOME/.ccache
4849
DEF_LIB: ${{ matrix.config.library }}
4950
LIBABIGAIL_VERSION: libabigail-2.6
5051
MINGW: ${{ matrix.config.cross == 'mingw' }}
@@ -307,6 +308,7 @@ jobs:
307308
mkdir -p ~/.ccache
308309
> ~/env
309310
echo CC=ccache ${{ matrix.config.compiler }} >> ~/env
311+
echo CCACHE_DIR=/root/.ccache >> ~/env
310312
echo DEF_LIB=${{ matrix.config.library }} >> ~/env
311313
echo STDATOMIC=false >> ~/env
312314
- name: Load the cached image

0 commit comments

Comments
 (0)