]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ci: use the correct compiler version
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 29 Jan 2021 18:00:56 +0000 (19:00 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 1 Feb 2021 10:54:31 +0000 (11:54 +0100)
.github/workflows/cibuild.sh

index 8256be96501651b8557e457b15e94a471d5f0fce..80583c513605e59acbe82035042ed717e2fa3569 100755 (executable)
@@ -2,14 +2,14 @@
  
 PHASES=(${@:-CONFIGURE MAKE INSTALL CHECK DISTCHECK})
 COMPILER="${COMPILER:?}"
-COMPILER_VERSION="${COMPILER_VERSION:?}"
+COMPILER_VERSION="${COMPILER_VERSION}"
 
 if [[ "$COMPILER" == clang ]]; then
-    CC="clang"
-    CXX="clang++"
+    CC="clang${COMPILER_VERSION:+-$COMPILER_VERSION}"
+    CXX="clang++${COMPILER_VERSION:+-$COMPILER_VERSION}"
 elif [[ "$COMPILER" == gcc ]]; then
-    CC="gcc"
-    CXX="g++"
+    CC="gcc${COMPILER_VERSION:+-$COMPILER_VERSION}"
+    CXX="g++${COMPILER_VERSION:+-$COMPILER_VERSION}"
 fi
 
 set -ex
@@ -28,7 +28,7 @@ for phase in "${PHASES[@]}"; do
                        --without-python \
                        --enable-werror"
 
-               if [[ "$COMPILER" == clang ]]; then
+               if [[ "$COMPILER" == clang* ]]; then
                        opts="$opts --enable-fuzzing-engine"
                fi