-
Notifications
You must be signed in to change notification settings - Fork 149
95 lines (80 loc) · 3.12 KB
/
analysis.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: BRL-CAD Analysis
on:
push:
branches: [ main ]
jobs:
linux_static:
name: Clang Static Analyser
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Setup hint from https://github.com/darktable-org/rawspeed/blob/develop/.github/workflows/ci-static-analysis.yml
- name: Clang Static Analyzer Setup
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install clang-tools-14
# We want as many deps pre-installed as we can for this - the analyzer setup slows their compilation
sudo apt-get install libproj-dev libgdal-dev tcl-dev tk-dev itcl3-dev itk3-dev libpng-dev zlib1g-dev libxml2-dev libxslt1-dev xsltproc libxml2-utils astyle xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev
sudo apt-get clean
- name: Checkout
uses: actions/checkout@v3
- name: Run Analyzer
run: |
pwd
export PATH=$ENV{GITHUB_WORKSPACE}:/usr/share/clang/scan-build-14/bin:/usr/share/clang/scan-build-14/libexec:$PATH
mkdir build && cd build && cp ../misc/clang-static-analyzer-run.sh .
./clang-static-analyzer-run.sh
linux_cov:
# See https://app.codecov.io/gh/BRL-CAD/brlcad for analysis results
name: LCOV Coverage testing
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Get the lcov tool and its dependencies
sudo apt-get install lcov
# We want as many deps pre-installed as we can for this - the analyzer setup slows their compilation
sudo apt-get install libproj-dev libgdal-dev tcl-dev tk-dev itcl3-dev itk3-dev libpng-dev zlib1g-dev libxml2-dev libxslt1-dev xsltproc libxml2-utils astyle xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev
sudo apt-get clean
# - name: Setup - Qt
# uses: jurplel/install-qt-action@v3
# with:
# cache: 'true'
- name: Checkout
uses: actions/checkout@v3
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake -S . -B build -DBRLCAD_ENABLE_COVERAGE=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build && make && cd ..
- name: Run Coverage Test
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build
find . -name '*.gcda' -exec rm {} \;
make check
lcov --capture --directory . --output-file coverage.info
lcov -r coverage.info \*\/other\/\* > coverage-2.info
lcov -r coverage-2.info \/usr\/\* > coverage_cad.info
rm coverage-*.info
#genhtml coverage_cad.info --output-directory lcov-output
mv coverage_cad.info ..
- name: Upload
uses: codecov/codecov-action@v3
with:
files: ./coverage_cad.info