-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (25 loc) · 974 Bytes
/
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
name: clang
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
Clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install gtest manually
run: sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake CMakeLists.txt && sudo make && sudo cp lib/*.a /usr/lib && sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a && sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a
- name: Build and Test
run: |
cmake . -B ${{github.workspace}}/build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
cmake --build ${{github.workspace}}/build
ctest -VV --test-dir ${{github.workspace}}/build
- name: Generate a code coverage report
uses: threeal/gcovr-action@latest
with:
gcov-executable: llvm-cov gcov