From: Joel Rosdahl Date: Sat, 22 Oct 2022 11:27:56 +0000 (+0200) Subject: ci: Add GCC 8 and GCC 9 jobs X-Git-Tag: v4.7.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d7094e710b7db589b37615eb5809e0e746d9782;p=thirdparty%2Fccache.git ci: Add GCC 8 and GCC 9 jobs --- diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bf2fdc022..49927fc91 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,6 +25,14 @@ jobs: fail-fast: false matrix: config: + - os: ubuntu-20.04 + compiler: gcc + version: "8" + + - os: ubuntu-20.04 + compiler: gcc + version: "9" + - os: ubuntu-20.04 compiler: gcc version: "10" @@ -68,7 +76,7 @@ jobs: packages="elfutils libhiredis-dev libzstd-dev ninja-build pkg-config python3 redis-server redis-tools" # Install ld.gold (binutils) and ld.lld (lld) on different runs. - if [ "${{ matrix.config.os }}" = "ubuntu-20.04" ]; then + if [ "${{ matrix.config.os }}" = "ubuntu-22.04" ]; then sudo apt-get install -y $packages binutils else sudo apt-get install -y $packages lld @@ -79,6 +87,13 @@ jobs: echo "CXX=g++-${{ matrix.config.version }}" >> $GITHUB_ENV sudo apt install -y g++-${{ matrix.config.version }} g++-${{ matrix.config.version }}-multilib + if [ "${{ matrix.config.version }}" = 8 ]; then + # The compilation test in StdFilesystem.cmake doesn't work when + # GCC 9 is installed as well, so need to force linking with + # libstdc++fs for GCC 8. Note: This requires using -fuse-ld=lld to + # work. + echo "LDFLAGS=-lstdc++fs" >> $GITHUB_ENV + fi else echo "CC=clang-${{ matrix.config.version }}" >> $GITHUB_ENV echo "CXX=clang++-${{ matrix.config.version }}" >> $GITHUB_ENV