-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (44 loc) · 1.38 KB
/
coverage.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
45
46
47
48
49
50
51
52
53
54
55
name: coverage
on:
push:
branches: [master]
pull_request:
branches: [master]
defaults:
run:
shell: bash
env:
BUILD_TYPE: Release
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install llvm & lcov
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install llvm lcov
# TODO: remove this step after the default Clang is updated to version 16
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "16.0"
- name: Configure CMake
working-directory: ${{github.workspace}}
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -Dfintamath_build_tests=ON -Dfintamath_enable_coverage=ON
env:
CC: clang
CXX: clang++
- name: Build
working-directory: ${{github.workspace}}
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Collect coverage report
working-directory: ${{github.workspace}}
run: cmake --build build --config ${{env.BUILD_TYPE}} --target fintamath_coverage
- name: Upload coverage report to Coveralls
uses: coverallsapp/github-action@v2
with:
path-to-lcov: ${{github.workspace}}/build/lcov.info