-
Notifications
You must be signed in to change notification settings - Fork 21
167 lines (140 loc) · 4.59 KB
/
Copy pathci.yml
File metadata and controls
167 lines (140 loc) · 4.59 KB
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
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
coverage:
name: Coverage (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libeigen3-dev cppcheck python3-pip
python3 -m pip install --user gcovr
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run coverage
run: |
make clean
make coverage
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
build/coverage/report/cppcheck.xml
build/coverage/report/gcovr-report.xml
build/coverage/report/gcovr-report.html
if-no-files-found: error
documentation:
name: Documentation (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz zip
- name: Build documentation
run: make doc
- name: Archive doxygen output
run: zip -r build/doxygen/doxygen.zip build/doxygen
- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: doxygen-zip
path: build/doxygen/doxygen.zip
if-no-files-found: error
build_test_linux:
name: Build and Test (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libeigen3-dev
- name: Build and run tests
run: bash Scripts/linuxBuildAndTest.bash
- name: Upload Linux binaries
uses: actions/upload-artifact@v4
with:
name: linux-binaries
path: |
build/bin/datagram-dump
build/bin/cidco-decoder
build/bin/datagram-list
build/bin/georeference
build/bin/bounding-box
build/bin/data-cleaning
build/bin/raytrace
build/bin/datagram-raytracer
if-no-files-found: error
- name: Upload Linux test report
uses: actions/upload-artifact@v4
with:
name: linux-junit-report
path: build/reports/*.xml
if-no-files-found: error
build_test_windows:
name: Build and Test (Windows)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Eigen3 via vcpkg
shell: pwsh
run: |
if (-not $env:VCPKG_INSTALLATION_ROOT) {
throw "VCPKG_INSTALLATION_ROOT is not defined on this runner."
}
& "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install eigen3:x64-windows
- name: Configure CMake
shell: pwsh
run: |
$toolchain = "$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake"
cmake -S . -B build -A x64 -DCMAKE_TOOLCHAIN_FILE="$toolchain" -DVCPKG_TARGET_TRIPLET=x64-windows
- name: Build
shell: pwsh
run: cmake --build build --config Release --parallel
- name: Run tests
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path build\reports | Out-Null
$candidates = @(
"build\test\tests.exe",
"build\test\Release\tests.exe",
"build\Release\test\tests.exe"
)
$testExe = $candidates | Where-Object { Test-Path $_ } | Select-Object -First 1
if (-not $testExe) {
throw "Unable to locate tests.exe in expected output folders."
}
& $testExe -r junit -o build/reports/mbes-lib-test-report.xml
- name: Upload Windows binaries
uses: actions/upload-artifact@v4
with:
name: windows-binaries
path: |
build/**/datagram-dump.exe
build/**/cidco-decoder.exe
build/**/datagram-list.exe
build/**/georeference.exe
build/**/bounding-box.exe
build/**/data-cleaning.exe
build/**/raytrace.exe
build/**/datagram-raytracer.exe
if-no-files-found: error
- name: Upload Windows test report
uses: actions/upload-artifact@v4
with:
name: windows-junit-report
path: build/reports/*.xml
if-no-files-found: error