-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.58 KB
/
Copy pathcpp-coverage.yml
File metadata and controls
63 lines (53 loc) · 1.58 KB
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
56
57
58
59
60
61
62
63
---
name: C/C++ CI Coverage
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
workflow_dispatch:
jobs:
coverage:
name: C/C++ CMake CI Coverage
runs-on: ubuntu-26.04
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Install/Adjust VCPKG
shell: bash
run: |
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV
- name: Install Tools
run: |
sudo apt-get update
sudo apt-get install lcov
- name: Check Tools
run: |
echo "-----------"
g++ --version
echo "-----------"
make --version
echo "-----------"
cmake --version
echo "-----------"
vcpkg --version
echo "-----------"
lcov --version
- name: Install dependencies
run: |
make dependencies
- name: Build
run: |
make build
- name: Test / Coverage
run: make coverage
# yamllint disable rule:line-length
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
# yamllint enable rule:line-length
with:
directory: ./coverage
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)