-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.25 KB
/
clang.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Clang
on: push
jobs:
clang:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
version: [14, 16, 18]
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y cmake clang-${{ matrix.version }} pkg-config
- name: Build with Clang ${{ matrix.version }}
run: |
export CXX=clang++-${{ matrix.version }}
export CC=clang-${{ matrix.version }}
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake ../
make -j2
- name: Build statically linked with Clang ${{ matrix.version }}
run: |
export CXX=clang++-${{ matrix.version }}
export CC=clang-${{ matrix.version }}
cd $GITHUB_WORKSPACE
mkdir build-static
cd build-static
cmake -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON ../
make -j2
# Only run static build on latest version in the matrix.
if: matrix.version == 18
- name: Run tests
run: |
cd "$GITHUB_WORKSPACE/build"
ctest -V