]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
ci: Add GCC 8 and GCC 9 jobs
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 22 Oct 2022 11:27:56 +0000 (13:27 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 22 Oct 2022 12:38:44 +0000 (14:38 +0200)
.github/workflows/build.yaml

index bf2fdc0229d6fddb3a76359b45397e23f6b8d336..49927fc91f768e070539bb184ea2ef6110e14a68 100644 (file)
@@ -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