1212 ARTIFACT_PIKA_NAME : artifact-pika
1313
1414jobs :
15+
1516 build_on_ubuntu :
1617 # The CMake configure and build commands are platform-agnostic and should work equally well on Windows or Mac.
1718 # You can convert this to a matrix build if you need cross-platform coverage.
@@ -41,12 +42,14 @@ jobs:
4142 - name : Install Deps
4243 run : |
4344 sudo apt-get update
44- sudo apt-get install -y autoconf libprotobuf-dev protobuf-compiler clang-tidy
45+ # Use GCC 10 to avoid __has_attribute compatibility issues with newer GCC and glibc
46+ sudo apt-get install -y autoconf libprotobuf-dev protobuf-compiler clang-tidy gcc-10 g++-10 zlib1g-dev
4547
4648 - name : Configure CMake
4749 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
4850 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
49- run : cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
51+ # Use GCC 10 to avoid __has_attribute compatibility issues with GCC 11+ and glibc
52+ run : cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
5053
5154 - name : Build
5255 # Build your program with the given configuration
@@ -166,7 +169,8 @@ jobs:
166169 - name : Install deps
167170 run : |
168171 dnf update -y
169- dnf install -y bash cmake wget git autoconf gcc perl-Digest-SHA tcl which tar g++ tar epel-release gcc-c++ libstdc++-devel gcc-toolset-13 binutils
172+ # Use gcc-toolset-11 to avoid __has_attribute compatibility issues with GCC 12+ and glibc
173+ dnf install -y bash cmake wget git autoconf gcc perl-Digest-SHA tcl which tar g++ tar epel-release gcc-c++ libstdc++-devel gcc-toolset-11 binutils openssl openssl-devel zlib-devel
170174 dnf clean all
171175 rm -rf /var/cache/dnf
172176
@@ -181,8 +185,9 @@ jobs:
181185 fetch-depth : 1
182186
183187 - name : Configure CMake
188+ # Use gcc-toolset-11 to avoid __has_attribute compatibility issues with GCC 12+ and glibc
184189 run : |
185- source /opt/rh/gcc-toolset-13 /enable
190+ source /opt/rh/gcc-toolset-11 /enable
186191 cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address .
187192
188193 - uses : actions/cache@v3
@@ -196,8 +201,9 @@ jobs:
196201 key : ${{ runner.os }}-rocky-buildtrees-${{ hashFiles('**/CMakeLists.txt') }}
197202
198203 - name : Build
204+ # Use gcc-toolset-11 to avoid __has_attribute compatibility issues with GCC 12+ and glibc
199205 run : |
200- source /opt/rh/gcc-toolset-13 /enable
206+ source /opt/rh/gcc-toolset-11 /enable
201207 cmake --build build --config ${{ env.BUILD_TYPE }}
202208
203209 - name : Cleanup
@@ -292,13 +298,14 @@ jobs:
292298 - name : Install Deps
293299 run : |
294300 brew list --versions cmake && brew uninstall --ignore-dependencies --force cmake || true
295- brew install gcc@13 automake cmake make binutils
301+ brew install gcc@11 automake cmake make binutils
296302
297303 - name : Configure CMake
304+ # Use GCC 11 to avoid potential __has_attribute compatibility issues with GCC 13
298305 run : |
299- GCC_PREFIX=$(brew --prefix gcc@13 )
300- export CC=$GCC_PREFIX/bin/gcc-13
301- cmake -B build -DCMAKE_C_COMPILER=$GCC_PREFIX/bin/gcc-13 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
306+ GCC_PREFIX=$(brew --prefix gcc@11 )
307+ export CC=$GCC_PREFIX/bin/gcc-11
308+ cmake -B build -DCMAKE_C_COMPILER=$GCC_PREFIX/bin/gcc-11 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
302309
303310 - name : Build
304311 run : |
0 commit comments