-
Notifications
You must be signed in to change notification settings - Fork 149
145 lines (125 loc) · 5.69 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils liblief-dev
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Cleanup (we want to avoid wasting disk space)
sudo apt-get clean
- name: Setup - System Qt Build Requirements
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
sudo apt-get clean
- name: Checkout
uses: actions/checkout@v4
- name: Directory setup
run: |
cmake -E make_directory ./build_clangstatic
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- 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
cd build_clangstatic && cp ../misc/clang-static-analyzer-run.sh .
./clang-static-analyzer-run.sh
- name: Summary
if: success() || failure()
run: |
sudo apt-get install html2text
html2text build_clangstatic/scan-reports-all/*/index.html
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 - System
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Get the lcov tool and its dependencies
sudo apt-get install lcov
# Install X/OpenGL dev pkgs
sudo apt install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt install astyle re2c xsltproc libxml2-utils liblief-dev
# Install dependency dev pkgs
sudo apt install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Cleanup (we want to avoid wasting disk space)
sudo apt clean
- name: Setup - System Qt Build Requirements
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
sudo apt-get clean
- name: Checkout
uses: actions/checkout@v4
- name: Directory setup
run: |
cmake -E make_directory ./build_lcov
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake -S . -B build_lcov -DBRLCAD_ENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_ENABLE_QT=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake --build build_lcov -j1
- name: Run Coverage Test
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build_lcov
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@v4
with:
files: ./coverage_cad.info