-
Notifications
You must be signed in to change notification settings - Fork 297
254 lines (221 loc) · 7.63 KB
/
ci_ubuntu.yml
File metadata and controls
254 lines (221 loc) · 7.63 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
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
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: CI Linux
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
schedule:
- cron: "0 2 * * 0,3"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' && github.ref != 'refs/heads/main' }}
jobs:
changes:
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- '**'
- '!.github/workflows/cache_*.yml'
- '!docker/dev/**'
- '!docs/**'
- '!.readthedocs.yml'
- '!tutorials/**'
- '!**/*.md'
- '!**/*.rst'
- '!**/*.po'
- '!**/*.pot'
coverage:
needs: changes
# Skip for workflow_dispatch; bypass changes gate for schedule (no file-change payload)
if: github.event_name != 'workflow_dispatch' && (github.event_name == 'schedule' || needs.changes.outputs.code == 'true')
name: Coverage (Debug)
runs-on: ubuntu-latest
env:
DART_PARALLEL_JOBS: 8
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pixi (CI)
uses: ./.github/actions/setup-pixi-ci
with:
pixi-bin-path: ${{ runner.temp }}/pixi/bin/pixi
- name: Install system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libgl1-mesa-dev libglu1-mesa-dev
version: 2
- name: Configure environment for compiler cache
uses: ./.github/actions/configure-compiler-cache
- name: Build and generate coverage report
run: |
DART_VERBOSE=ON \
BUILD_TYPE=Debug \
pixi run coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
build-release:
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.code == 'true'
name: Release Tests
runs-on: ubuntu-latest
env:
DART_PARALLEL_JOBS: 8
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pixi (CI)
uses: ./.github/actions/setup-pixi-ci
with:
pixi-bin-path: ${{ runner.temp }}/pixi/bin/pixi
- name: Install system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libgl1-mesa-dev libglu1-mesa-dev
version: 2
- name: Configure environment for compiler cache
uses: ./.github/actions/configure-compiler-cache
- name: Test DART and dartpy
run: |
DART_VERBOSE=ON \
BUILD_TYPE=Release \
DART_BUILD_SIMULATION_EXPERIMENTAL_OVERRIDE=OFF \
pixi run test-all
- name: Test with AddressSanitizer
run: |
DART_VERBOSE=ON \
pixi run test-asan
- name: Install
run: |
DART_VERBOSE=ON \
BUILD_TYPE=Release \
pixi run install
build-debug:
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.code == 'true'
name: Debug Tests
runs-on: ubuntu-latest
env:
DART_PARALLEL_JOBS: 8
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pixi (CI)
uses: ./.github/actions/setup-pixi-ci
with:
pixi-bin-path: ${{ runner.temp }}/pixi/bin/pixi
- name: Install system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libgl1-mesa-dev libglu1-mesa-dev
version: 2
- name: Configure environment for compiler cache
uses: ./.github/actions/configure-compiler-cache
- name: Test DART and dartpy
run: |
DART_VERBOSE=ON \
BUILD_TYPE=Debug \
DART_BUILD_SIMULATION_EXPERIMENTAL_OVERRIDE=OFF \
pixi run test-all
build-asserts:
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.code == 'true'
name: Asserts enabled (no -DNDEBUG)
runs-on: ubuntu-latest
env:
DART_PARALLEL_JOBS: 8
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pixi (CI)
uses: ./.github/actions/setup-pixi-ci
with:
pixi-bin-path: ${{ runner.temp }}/pixi/bin/pixi
- name: Install system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libgl1-mesa-dev libglu1-mesa-dev
version: 2
- name: Configure environment for compiler cache
uses: ./.github/actions/configure-compiler-cache
- name: Build with assertions (no -DNDEBUG)
run: |
# NOTE: pixi tasks set BUILD_TYPE internally, so configure this
# variant explicitly to ensure NDEBUG is not defined.
pixi run -- bash -lc '
set -euo pipefail
BUILD_TYPE=None
DART_VERBOSE=ON
cmake \
-G Ninja \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DDART_BUILD_DARTPY=ON \
-DDART_BUILD_COLLISION_BULLET=ON \
-DDART_BUILD_PROFILE=ON \
-DDART_USE_SYSTEM_GOOGLEBENCHMARK=ON \
-DDART_USE_SYSTEM_GOOGLETEST=ON \
-DDART_USE_SYSTEM_IMGUI=ON \
-DDART_USE_SYSTEM_TRACY=ON \
-DDART_VERBOSE=$DART_VERBOSE
cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE -j
'
headless-rendering:
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.code == 'true'
name: Headless Rendering Tests
runs-on: ubuntu-latest
env:
DART_PARALLEL_JOBS: 8
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pixi (CI)
uses: ./.github/actions/setup-pixi-ci
with:
pixi-bin-path: ${{ runner.temp }}/pixi/bin/pixi
- name: Install system dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libgl1-mesa-dev libglu1-mesa-dev xvfb mesa-utils
version: 3
- name: Configure environment for compiler cache
uses: ./.github/actions/configure-compiler-cache
- name: Build examples
run: |
DART_VERBOSE=ON \
BUILD_TYPE=Release \
pixi run build-examples
- name: Run headless rendering test (rigid_cubes)
run: |
mkdir -p /tmp/headless_output
xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
./build/default/cpp/Release/bin/rigid_cubes \
--headless --frames 10 --out /tmp/headless_output
echo "Captured frames:"
ls -la /tmp/headless_output/
test -f /tmp/headless_output/frame_000000.png
test -f /tmp/headless_output/frame_000008.png
file /tmp/headless_output/frame_000000.png | grep -q "PNG image data"
echo "Headless rendering test passed!"