-
Notifications
You must be signed in to change notification settings - Fork 144
42 lines (40 loc) · 1.2 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
name: Coverage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y g++-14
wget https://github.com/linux-test-project/lcov/releases/download/v2.3/lcov-2.3.tar.gz
tar -xvf lcov-2.3.tar.gz
cd lcov-2.3
sudo make install
sudo cpan App::cpanminus
sudo cpanm --notest Capture::Tiny DateTime
- name: Configure
run: cmake --preset=ci-coverage
- name: Build
run: cmake --build build/ci-coverage -j8
- name: Run tests
run: ctest --test-dir build/ci-coverage --output-on-failure --no-tests=error -j8
- name: Process coverage info
run: cmake --build build/ci-coverage -t coverage
- name: Submit to codecov.io
uses: codecov/codecov-action@v5
with:
files: build/ci-coverage/coverage.info
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true