Skip to content

Commit

Permalink
Use Clang 16 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chausner committed Oct 21, 2024
1 parent 157f304 commit 300ffc8
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,11 @@ jobs:
runs-on: ${{ matrix.os }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
c_compiler: [gcc, clang-16, cl]
include:
- os: windows-latest
c_compiler: cl
Expand All @@ -32,13 +24,13 @@ jobs:
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
c_compiler: clang-16
cpp_compiler: clang++-16
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
c_compiler: clang-16
- os: ubuntu-latest
c_compiler: cl

Expand All @@ -52,6 +44,13 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install Clang 16
if: matrix.cpp_compiler == 'clang++-16'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh 16
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
Expand All @@ -66,7 +65,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
${{ matrix.cpp_compiler == 'clang++' && '-DCMAKE_CXX_FLAGS="-stdlib=libstdc++"' || '' }}
${{ matrix.cpp_compiler == 'clang++-16' && '-DCMAKE_CXX_FLAGS="-stdlib=libstdc++"' || '' }}
-S ${{ github.workspace }}
- name: Build
Expand Down

0 comments on commit 300ffc8

Please sign in to comment.