-
Notifications
You must be signed in to change notification settings - Fork 80
47 lines (43 loc) · 1.3 KB
/
ubuntu-codecov.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
name: Code Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-ubuntu:
strategy:
matrix:
include:
# Ubuntu 22.04 + gcc-12
- name: "Ubuntu 22.04 + gcc-12"
os: ubuntu-22.04
compiler: gcc
version: "12"
runs-on: ${{ matrix.os }}
name: 🧪 Code Coverage - Codecov
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install packages
run: sudo apt-get install -yq lcov
- name: Configure Compiler
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Configure Build
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON ..
- name: Build
run: cd build && make
- name: Run Unit Test
run: /home/runner/work/RosettaStone/RosettaStone/build/bin/UnitTests
- name: Upload Coverage Reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}