Skip to content

Commit 50e9a66

Browse files
committed
Build for both Release and Debug modes
1 parent f08ea83 commit 50e9a66

File tree

4 files changed

+54
-33
lines changed

4 files changed

+54
-33
lines changed

.github/workflows/ci_macos.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
os: [macos-latest]
31+
build_mode: ["Release", "Debug"]
3132
steps:
3233
- name: Checkout
3334
uses: actions/checkout@v4
@@ -42,8 +43,12 @@ jobs:
4243

4344
- name: Test DART and dartpy
4445
run: |
46+
VERBOSE=ON \
47+
BUILD_TYPE=${{ matrix.build_mode }} \
4548
pixi run test-all
4649
4750
- name: Install
4851
run: |
52+
VERBOSE=ON \
53+
BUILD_TYPE=${{ matrix.build_mode }} \
4954
pixi run install

.github/workflows/ci_ubuntu.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ jobs:
7575
build:
7676
name: ubuntu
7777
runs-on: ubuntu-latest
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
build_mode: ["Release", "Debug"]
7882
steps:
7983
- name: Checkout
8084
uses: actions/checkout@v4
@@ -94,8 +98,12 @@ jobs:
9498

9599
- name: Test DART and dartpy
96100
run: |
101+
VERBOSE=ON \
102+
BUILD_TYPE=${{ matrix.build_mode }} \
97103
pixi run test-all
98104
99105
- name: Install
100106
run: |
107+
VERBOSE=ON \
108+
BUILD_TYPE=${{ matrix.build_mode }} \
101109
pixi run install

.github/workflows/ci_windows.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
build:
2525
name: win
2626
runs-on: windows-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
build_mode: ["Release", "Debug"]
2731
steps:
2832
- name: Checkout
2933
uses: actions/checkout@v4
@@ -38,8 +42,12 @@ jobs:
3842

3943
- name: Test DART and dartpy
4044
run: |
45+
VERBOSE=ON \
46+
BUILD_TYPE=${{ matrix.build_mode }} \
4147
pixi run test-all
4248
4349
- name: Install
4450
run: |
51+
VERBOSE=ON \
52+
BUILD_TYPE=${{ matrix.build_mode }} \
4553
pixi run install

pixi.toml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ config = { cmd = """
5353
-S . \
5454
-B build \
5555
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
56-
-DCMAKE_BUILD_TYPE=Release \
57-
-DDART_VERBOSE=$DART_VERBOSE \
56+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
57+
-DDART_VERBOSE=$VERBOSE \
5858
-DDART_USE_SYSTEM_IMGUI=ON \
5959
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
6060
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
6161
-DCMAKE_INSTALL_RPATH=$CONDA_PREFIX/lib \
6262
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
63-
""", env = { DART_VERBOSE = "ON" } }
63+
""", env = { VERBOSE = "OFF", BUILD_TYPE = "Release" } }
6464

6565
lint-cpp = { cmd = "cmake --build build --target format", depends_on = [
6666
"config",
@@ -196,11 +196,11 @@ config = { cmd = """
196196
-B build \
197197
-G 'Visual Studio 17 2022' \
198198
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
199-
-DDART_VERBOSE=ON \
199+
-DDART_VERBOSE=$DART_VERBOSE \
200200
-DDART_MSVC_DEFAULT_OPTIONS=ON \
201201
-DBUILD_SHARED_LIBS=OFF \
202202
-DDART_USE_SYSTEM_IMGUI=ON
203-
""" }
203+
""", env = { DART_VERBOSE = "OFF" } }
204204
lint-py = { cmd = "black . --exclude '\\..*' && isort . --skip-glob '.*'", depends_on = [
205205
"config",
206206
] }
@@ -210,51 +210,51 @@ check-lint-py = { cmd = "black . --check --exclude '\\..*' && isort . --check --
210210
] }
211211
check-lint = { depends_on = ["check-lint-py"] }
212212

213-
build = { cmd = "cmake --build build --config Release -j", depends_on = [
213+
build = { cmd = "cmake --build build --config $BUILD_TYPE -j", depends_on = [
214214
"config",
215-
] }
216-
build-tests = { cmd = "cmake --build build --config Release -j --target tests", depends_on = [
215+
], env = { BUILD_TYPE = "OFF" } }
216+
build-tests = { cmd = "cmake --build build --config $BUILD_TYPE -j --target tests", depends_on = [
217217
"config",
218-
] }
218+
], env = { BUILD_TYPE = "OFF" } }
219219
build-dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [
220220
"config",
221221
] }
222222

223-
test = { cmd = "ctest --test-dir build --build-config Release --output-on-failure", depends_on = [
223+
test = { cmd = "ctest --test-dir build --build-config $BUILD_TYPE --output-on-failure", depends_on = [
224224
"build-tests",
225-
] }
226-
test-dartpy = { cmd = "cmake --build build --config Release -j --target pytest", depends_on = [
225+
], env = { BUILD_TYPE = "OFF" } }
226+
test-dartpy = { cmd = "cmake --build build --config $BUILD_TYPE -j --target pytest", depends_on = [
227227
"config",
228-
] }
229-
test-all = { cmd = "cmake --build build --config Release -j --target ALL", depends_on = [
228+
], env = { BUILD_TYPE = "OFF" } }
229+
test-all = { cmd = "cmake --build build --config $BUILD_TYPE -j --target ALL", depends_on = [
230230
"config",
231-
] }
231+
], env = { BUILD_TYPE = "OFF" } }
232232

233-
tu-biped = { cmd = "cmake --build build --config Release --target tutorial_biped --parallel && build/Release/tutorial_biped.exe", depends_on = [
233+
tu-biped = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_biped --parallel && build/$BUILD_TYPE/tutorial_biped.exe", depends_on = [
234234
"config",
235-
] }
236-
tu-biped-fi = { cmd = "cmake --build build --config Release --target tutorial_biped_finished --parallel && build/Release/tutorial_biped_finished.exe", depends_on = [
235+
], env = { BUILD_TYPE = "OFF" } }
236+
tu-biped-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_biped_finished --parallel && build/$BUILD_TYPE/tutorial_biped_finished.exe", depends_on = [
237237
"config",
238-
] }
239-
tu-collisions = { cmd = "cmake --build build --config Release --target tutorial_collisions --parallel && build/Release/tutorial_collisions.exe", depends_on = [
238+
], env = { BUILD_TYPE = "OFF" } }
239+
tu-collisions = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_collisions --parallel && build/$BUILD_TYPE/tutorial_collisions.exe", depends_on = [
240240
"config",
241-
] }
242-
tu-collisions-fi = { cmd = "cmake --build build --config Release --target tutorial_collisions_finished --parallel && build/Release/tutorial_collisions_finished.exe", depends_on = [
241+
], env = { BUILD_TYPE = "OFF" } }
242+
tu-collisions-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_collisions_finished --parallel && build/$BUILD_TYPE/tutorial_collisions_finished.exe", depends_on = [
243243
"config",
244-
] }
245-
tu-dominoes = { cmd = "cmake --build build --config Release --target tutorial_dominoes --parallel && build/Release/tutorial_dominoes.exe", depends_on = [
244+
], env = { BUILD_TYPE = "OFF" } }
245+
tu-dominoes = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_dominoes --parallel && build/$BUILD_TYPE/tutorial_dominoes.exe", depends_on = [
246246
"config",
247-
] }
248-
tu-dominoes-fi = { cmd = "cmake --build build --config Release --target tutorial_dominoes_finished --parallel && build/Release/tutorial_dominoes_finished.exe", depends_on = [
247+
], env = { BUILD_TYPE = "OFF" } }
248+
tu-dominoes-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_dominoes_finished --parallel && build/$BUILD_TYPE/tutorial_dominoes_finished.exe", depends_on = [
249249
"config",
250-
] }
251-
tu-multi-pendulum = { cmd = "cmake --build build --config Release --target tutorial_multi_pendulum --parallel && build/Release/tutorial_multi_pendulum.exe", depends_on = [
250+
], env = { BUILD_TYPE = "OFF" } }
251+
tu-multi-pendulum = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_multi_pendulum --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum.exe", depends_on = [
252252
"config",
253-
] }
254-
tu-multi-pendulum-fi = { cmd = "cmake --build build --config Release --target tutorial_multi_pendulum_finished --parallel && build/Release/tutorial_multi_pendulum_finished.exe", depends_on = [
253+
], env = { BUILD_TYPE = "OFF" } }
254+
tu-multi-pendulum-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_multi_pendulum_finished --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum_finished.exe", depends_on = [
255255
"config",
256-
] }
256+
], env = { BUILD_TYPE = "OFF" } }
257257

258-
install = { cmd = "cmake --build build --config Release -j --target install", depends_on = [
258+
install = { cmd = "cmake --build build --config $BUILD_TYPE -j --target install", depends_on = [
259259
"build",
260-
] }
260+
], env = { BUILD_TYPE = "OFF" } }

0 commit comments

Comments
 (0)