-
Notifications
You must be signed in to change notification settings - Fork 44
55 lines (53 loc) · 1.56 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
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@v3
- 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 CMAKE_CXX_FLAGS="--coverage -fno-inline" CMAKE_EXE_LINKER_FLAGS="-lgcov --coverage" LLVM_VERSION=15 make test
- name: Run coverage
run: |
lcov -c -d debug -o coverage.info
lcov -e coverage.info "$PWD/src/*" -o coverage-src.info
lcov -l coverage-src.info
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: coverage-src.info
name: clang-uml
fail_ci_if_error: true