Skip to content

Commit 3f53e2b

Browse files
committed
fix(workflow): switch the Linux CI to clang-18 presets
1 parent 598d627 commit 3f53e2b

File tree

2 files changed

+48
-26
lines changed

2 files changed

+48
-26
lines changed

.github/workflows/linux.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Linux
33
on: [push, pull_request]
44

55
jobs:
6-
gcc14:
6+
clang-18:
77
strategy:
88
fail-fast: false
99
matrix:
10-
config: [Debug, Release]
10+
config: [debug, release]
1111

1212
runs-on: ubuntu-24.04
1313

@@ -18,17 +18,15 @@ jobs:
1818

1919
- name: Install Dependencies
2020
run: |
21-
sudo apt-get update
22-
sudo apt-get upgrade
2321
sudo add-apt-repository -y universe
2422
sudo apt-get update
25-
sudo apt-get install -yq libgtest-dev libboost-program-options-dev rapidjson-dev ninja-build gcc-14 g++-14
23+
sudo apt-get install -yq libgtest-dev libboost-program-options-dev rapidjson-dev ninja-build
2624
2725
- name: Build GTest
2826
run: |
2927
cmake -E make_directory gtest
3028
cd gtest
31-
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -G Ninja /usr/src/gtest
29+
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config == 'debug' && 'Debug' || 'Release' }} -G Ninja /usr/src/gtest
3230
cmake --build . -j -v
3331
sudo cmake --install .
3432
@@ -37,19 +35,13 @@ jobs:
3735

3836
- name: Configure CMake
3937
shell: pwsh
40-
env:
41-
CC: gcc-14
42-
CXX: g++-14
43-
working-directory: build/
4438
run: |
45-
$cmakeBuildType = '${{ matrix.config }}'
46-
47-
cmake "-DCMAKE_BUILD_TYPE=$cmakeBuildType" -G Ninja ${{ github.workspace }}
39+
cmake --preset clang-18-${{ matrix.config }}
4840
4941
- name: Build
5042
working-directory: build/
51-
run: cmake --build . -j -v
43+
run: cmake --build --preset clang-18-${{ matrix.config }} -j -v
5244

5345
- name: Test
5446
working-directory: build/
55-
run: ctest --output-on-failure
47+
run: ctest --preset clang-18-${{ matrix.config }} --output-on-failure

CMakePresets.json

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"name": "release",
2020
"inherits": [ "ninja-generator" ],
2121
"cacheVariables": {
22-
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
22+
"CMAKE_BUILD_TYPE": "Release"
2323
}
2424
},
2525
{
26-
"name": "gcc-14",
26+
"name": "gcc-14-debug",
2727
"inherits": [ "debug" ],
2828
"condition": {
2929
"type": "notEquals",
@@ -36,7 +36,14 @@
3636
}
3737
},
3838
{
39-
"name": "clang-18",
39+
"name": "gcc-14-release",
40+
"inherits": [ "gcc-14-debug" ],
41+
"cacheVariables": {
42+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
43+
}
44+
},
45+
{
46+
"name": "clang-18-debug",
4047
"inherits": [ "debug" ],
4148
"condition": {
4249
"type": "notEquals",
@@ -48,6 +55,13 @@
4855
"CMAKE_CXX_COMPILER": "/usr/bin/clang++-18",
4956
"CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS": "/usr/bin/clang-scan-deps-18"
5057
}
58+
},
59+
{
60+
"name": "clang-18-release",
61+
"inherits": [ "clang-18-debug" ],
62+
"cacheVariables": {
63+
"CMAKE_BUILD_TYPE": "Release"
64+
}
5165
}
5266
],
5367
"buildPresets": [
@@ -60,12 +74,20 @@
6074
"configurePreset": "release"
6175
},
6276
{
63-
"name": "gcc-14",
64-
"configurePreset": "gcc-14"
77+
"name": "gcc-14-debug",
78+
"configurePreset": "gcc-14-debug"
79+
},
80+
{
81+
"name": "gcc-14-release",
82+
"configurePreset": "gcc-14-release"
83+
},
84+
{
85+
"name": "clang-18-debug",
86+
"configurePreset": "clang-18-debug"
6587
},
6688
{
67-
"name": "clang-18",
68-
"configurePreset": "clang-18"
89+
"name": "clang-18-release",
90+
"configurePreset": "clang-18-release"
6991
}
7092
],
7193
"testPresets": [
@@ -78,12 +100,20 @@
78100
"configurePreset": "release"
79101
},
80102
{
81-
"name": "gcc-14",
82-
"configurePreset": "gcc-14"
103+
"name": "gcc-14-debug",
104+
"configurePreset": "gcc-14-debug"
105+
},
106+
{
107+
"name": "gcc-14-release",
108+
"configurePreset": "gcc-14-release"
109+
},
110+
{
111+
"name": "clang-18-debug",
112+
"configurePreset": "clang-18-debug"
83113
},
84114
{
85-
"name": "clang-18",
86-
"configurePreset": "clang-18"
115+
"name": "clang-18-release",
116+
"configurePreset": "clang-18-release"
87117
}
88118
]
89119
}

0 commit comments

Comments
 (0)