forked from gnss-sdr/gnss-sdr
-
Notifications
You must be signed in to change notification settings - Fork 0
296 lines (281 loc) · 11.2 KB
/
main.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2020-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>
name: Simple CI
on:
pull_request:
paths-ignore:
- "**/CITATION.cff"
push:
paths-ignore:
- "**/CITATION.cff"
workflow_dispatch:
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update -y
sudo apt install -y libunwind-dev
sudo apt-get install -y --no-install-recommends ninja-build cmake \
libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev \
libboost-thread-dev libboost-chrono-dev libboost-serialization-dev \
liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev \
liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
python3-mako liborc-0.4-dev
- name: configure
run: cmake -S . -B build -GNinja
- name: build
run: cmake --build build
- name: check
run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
- name: default position_test
run: |
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
brew update
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/2to3-3.1* || true
rm /usr/local/bin/idle3.1* || true
rm /usr/local/bin/pydoc3.1* || true
rm /usr/local/bin/python3.1* || true
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew link --overwrite python@3.12
brew install ninja hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf
pip3 install mako
- name: configure
run: cmake -S . -B build -GNinja
- name: build
run: cmake --build build
- name: check
run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
- name: default position_test
run: |
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
build-macos-xcode:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
brew update
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/2to3-3.1* || true
rm /usr/local/bin/idle3.1* || true
rm /usr/local/bin/pydoc3.1* || true
rm /usr/local/bin/python3.1* || true
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew link --overwrite python@3.12
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf
pip3 install mako
- name: configure
run: cmake -S . -B build -GXcode
- name: build
run: cmake --build build --config Release
- name: check
run: |
cmake --build build --config Release --target check
./install/volk_gnsssdr_profile
./install/run_tests
- name: default position_test
run: |
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF
cmake --build build --config Release --target position_test
./install/position_test
./install/run_tests --gtest_filter=Osnma*
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: run clang-format
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: "15"
check-path: "src"
exclude-regex: '(libs\/gsl\/)|^.*\.(cu|proto)$'
clang-tidy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
brew update
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/2to3-3.1* || true
rm /usr/local/bin/idle3.1* || true
rm /usr/local/bin/pydoc3.1* || true
rm /usr/local/bin/python3.1* || true
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew link --overwrite python@3.12
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf llvm
pip3 install mako
ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
ln -s $(brew --prefix llvm)/bin/run-clang-tidy.py /usr/local/bin
- name: Prepare run
run: cmake -S . -B build && cmake --build build --target volk_gnsssdr_module gtest-1.15.2 core_monitor core_libs pvt_libs
- name: run clang-tidy
run: cd build && /opt/homebrew/opt/llvm/bin/run-clang-tidy -fix
- name: check
run: |
git diff > clang_tidy.patch
echo -e "if \n [ -s clang_tidy.patch ] \nthen \n echo "clang_tidy not applied:"; echo ""; more clang_tidy.patch; exit 1 \nfi \n" > detect
chmod +x ./detect
./detect
cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt-get install python3-pip && sudo pip3 install cpplint
- name: run checks
run: "find ./src/ ./utils ./tests -iname *.h -o -iname *.cc | xargs cpplint
--filter=-,+build/class,+build/deprecated,+build/explicit_make_pair,\
+build/forward_decl,+build/printf_format,+build/storage_class,\
+readability/constructors,+readability/namespace,+readability/newline,\
+readability/utf8,+runtime/casting,+runtime/explicit,\
+runtime/indentation_namespace,+runtime/init,+runtime/invalid_increment,\
+runtime/member_string_references,+runtime/memset,+runtime/operator,\
+runtime/printf,+runtime/printf_format,+whitespace/blank_line,\
+whitespace/comma,+whitespace/comments,+whitespace/empty_conditional_body,\
+whitespace/end-of-line,+whitespace/ending-newline,+whitespace/semicolon,\
+whitespace/tab --exclude=./src/core/interfaces/gnss_block_interface.h
--exclude=./src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cpu_features/test/hwcaps_for_testing.*
--exclude=./utils/nav-listener/build/nav_message.pb.h"
prettier-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo npm install --global prettier
- name: check markdown
run: find . -iname "*.md" | xargs prettier --parser markdown --print-width 80 --prose-wrap always --list-different
cmakelint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo python -m pip install --upgrade pip
sudo pip install cmakelint
- name: check CMake scripts
run: find . -iname "CMakeLists.txt" -o -iname "*.cmake" | xargs cmakelint --filter=-linelength,-readability/wonkycase
volk-gnsssdr-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mako
- name: configure
shell: powershell
run: cmake -S src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr -B build -G "Visual Studio 17 2022"
- name: build
run: cmake --build build --config Release
- name: test
shell: powershell
run: ctest -C Release --test-dir build
- name: install
run: cmake --install build
- name: run profile
run: cd 'C:\Program Files (x86)\volk_gnsssdr\bin'; .\volk_gnsssdr_profile.exe
volk-gnsssdr-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt install python3-mako liborc-dev
- name: configure
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
- name: build
run: cmake --build build
- name: install
run: sudo cmake --install build && sudo ldconfig
- name: test
run: volk_gnsssdr_profile
volk-gnsssdr-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mako
- name: configure
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
- name: build
run: cmake --build build && sudo cmake --install build
- name: test
run: ctest -C Release --test-dir build --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
volk-gnsssdr-macos-xcode:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mako
- name: configure
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build -GXcode
- name: build
run: cmake --build build --config Release
- name: install
run: sudo cmake --install build
- name: test
run: ctest -C Release --test-dir build --exclude-regex --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt install shellcheck
- name: check scripts
run: shellcheck utils/scripts/*
REUSE-compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check REUSE compliance
uses: docker://fsfe/reuse
with:
args: lint