-
Notifications
You must be signed in to change notification settings - Fork 47
58 lines (56 loc) · 1.68 KB
/
build.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
56
57
58
name: build
on:
push:
paths-ignore:
- 'docs/**'
- 'packaging/**'
- 'util/**'
- 'uml/**'
- '**.md'
branches-ignore:
- 'noactions/*'
pull_request:
paths-ignore:
- 'docs/**'
- 'packaging/**'
- 'util/**'
- 'uml/**'
- '**.md'
- '**.svg'
- '**.png'
branches-ignore:
- 'noactions/*'
jobs:
build-ubuntu:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update package database
run: sudo apt -y update
- name: Install deps
run: sudo apt -y install git make pkg-config gcc-11 g++-11 ccache cmake libyaml-cpp-dev llvm-15 clang-15 libclang-15-dev libclang-cpp15-dev clang-format-15 lcov zlib1g-dev libunwind-dev libdw-dev
- name: Select g++ version
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
- name: Check code formatting
run: |
make check-formatting
- name: Build and unit test
run: |
NUMPROC=2 CODE_COVERAGE=ON LLVM_VERSION=15 make test
- name: Run coverage
run: |
lcov -c -d debug -o coverage.info
lcov -r coverage.info -o coverage-src.info "$PWD/src/main.cc" "$PWD/src/common/generators/generators.cc"
lcov -e coverage-src.info -o coverage-src.info "$PWD/src/*"
lcov -l coverage-src.info
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: coverage-src.info
disable_search: true
name: clang-uml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false