-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (52 loc) · 1.83 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
59
name: build
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt install -y build-essential cmake libglm-dev libtclap-dev libboost-all-dev libopenvdb-dev libtbb-dev libcppunit-dev libeigen3-dev liblzma-dev zlib1g-dev libbz2-dev gcovr
- name: Configure CMake
run: mkdir build && cd build && cmake ../src -DUSE_GCOV=1
- name: Build
run: cd build && make -j
- name: Perform unit tests
run: cd build && make test
- name: Perform code coverage
run: |
cd build
gcovr -r ../ . --xml-pretty -e ".*\.h" > coverage.xml
gcovr -r ../ . --html -e ".*\.h" > report.html
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: ./build/report.html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/coverage.xml
test-shared:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt install -y build-essential cmake libglm-dev libtclap-dev libboost-all-dev libopenvdb-dev libtbb-dev libcppunit-dev libeigen3-dev liblzma-dev zlib1g-dev libbz2-dev gcovr
- name: Configure CMake
run: mkdir build && cd build && cmake ../src
- name: Build
run: cd build && make -j && sudo make install
- name: Produce compilation using shared library
run: |
cd examples && mkdir build && cd build
cmake ../shared
make -j
ldd ./den2obj-shared-example
LD_LIBRARY_PATH=/usr/local/lib ./den2obj-shared-example