Skip to content

Commit

Permalink
ci: Use clang with C++17 on Ubuntu
Browse files Browse the repository at this point in the history
Due to bug[0], on ubuntu, clang cannot #include <chrono>
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]: actions/runner-images#8659
  • Loading branch information
erenon committed Feb 22, 2024
1 parent 3e91749 commit 536a585
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 536a585

Please sign in to comment.