Skip to content

Commit bcde102

Browse files
committed
set ubuntu-24.04 and clang version to 16
1 parent cec686e commit bcde102

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/cmake.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ jobs:
3131
#
3232
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
3333
matrix:
34-
os: [ubuntu-latest, windows-latest, macOS-latest]
34+
os: [ubuntu-24.04, windows-latest, macOS-latest]
3535
build_type: ${{ fromJSON(format('[{0}]', inputs.build_type || '"Debug","Release"')) }}
3636
c_compiler: [gcc, clang, cl]
3737
include:
3838
- os: windows-latest
3939
c_compiler: cl
4040
cpp_compiler: cl
41-
- os: ubuntu-latest
41+
- os: ubuntu-24.04
4242
c_compiler: gcc
4343
cpp_compiler: g++
44-
- os: ubuntu-latest
44+
- os: ubuntu-24.04
4545
c_compiler: clang
4646
cpp_compiler: clang++
4747
- os: macOS-latest
@@ -52,7 +52,7 @@ jobs:
5252
c_compiler: gcc
5353
- os: windows-latest
5454
c_compiler: clang
55-
- os: ubuntu-latest
55+
- os: ubuntu-24.04
5656
c_compiler: cl
5757
- os: macOS-latest
5858
c_compiler: cl
@@ -71,6 +71,12 @@ jobs:
7171
run: |
7272
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
7373
74+
- name: Set Clang 16 as default
75+
if: matrix.os == 'ubuntu-24.04' && matrix.c_compiler == 'clang'
76+
run: |
77+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
78+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
79+
7480
- name: Configure CMake
7581
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
7682
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type

0 commit comments

Comments
 (0)