From 536a5850893ff9a29f45a8697b6dd6b534533c2a Mon Sep 17 00:00:00 2001 From: Benedek Thaler Date: Thu, 22 Feb 2024 08:31:47 +0100 Subject: [PATCH] ci: Use clang with C++17 on Ubuntu Due to bug[0], on ubuntu, clang cannot #include with -std=c++20. Switch it to c++17, compile with c++20 on macOS. Alternative solution: install latest clang on ubuntu, but that takes much more time to run. [0]: https://github.com/actions/runner-images/issues/8659 --- .github/workflows/on_pull_request.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on_pull_request.yml b/.github/workflows/on_pull_request.yml index c733161..27a0130 100644 --- a/.github/workflows/on_pull_request.yml +++ b/.github/workflows/on_pull_request.yml @@ -99,8 +99,8 @@ jobs: cd ThreadSanitized ctest -VV - build_linux_clang_cpp20: - name: Build on Linux with Clang, C++20 + build_linux_clang_cpp17: + name: Build on Linux with Clang, C++17 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -114,7 +114,7 @@ jobs: cd Clang export CC=$(which clang) export CXX=$(which clang++) - cmake -DCMAKE_CXX_STANDARD=20 .. + cmake -DCMAKE_CXX_STANDARD=17 .. - name: Build run: | cd Clang @@ -181,7 +181,7 @@ jobs: run: | mkdir Release cd Release - cmake -DCMAKE_CXX_STANDARD=17 .. + cmake -DCMAKE_CXX_STANDARD=20 .. make -j2 VERBOSE=1 - name: Test run: |