Skip to content

Commit

Permalink
Build for both Release and Debug modes
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Nov 10, 2024
1 parent f08ea83 commit 50e9a66
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest]
build_mode: ["Release", "Debug"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -42,8 +43,12 @@ jobs:

- name: Test DART and dartpy
run: |
VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_mode }} \
pixi run test-all
- name: Install
run: |
VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_mode }} \
pixi run install
8 changes: 8 additions & 0 deletions .github/workflows/ci_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ jobs:
build:
name: ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_mode: ["Release", "Debug"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -94,8 +98,12 @@ jobs:

- name: Test DART and dartpy
run: |
VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_mode }} \
pixi run test-all
- name: Install
run: |
VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_mode }} \
pixi run install
8 changes: 8 additions & 0 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
build:
name: win
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
build_mode: ["Release", "Debug"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -38,8 +42,12 @@ jobs:

- name: Test DART and dartpy
run: |
VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_mode }} \
pixi run test-all
- name: Install
run: |
VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_mode }} \
pixi run install
66 changes: 33 additions & 33 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ config = { cmd = """
-S . \
-B build \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DDART_VERBOSE=$DART_VERBOSE \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DDART_VERBOSE=$VERBOSE \
-DDART_USE_SYSTEM_IMGUI=ON \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DCMAKE_INSTALL_RPATH=$CONDA_PREFIX/lib \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
""", env = { DART_VERBOSE = "ON" } }
""", env = { VERBOSE = "OFF", BUILD_TYPE = "Release" } }

lint-cpp = { cmd = "cmake --build build --target format", depends_on = [
"config",
Expand Down Expand Up @@ -196,11 +196,11 @@ config = { cmd = """
-B build \
-G 'Visual Studio 17 2022' \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DDART_VERBOSE=ON \
-DDART_VERBOSE=$DART_VERBOSE \
-DDART_MSVC_DEFAULT_OPTIONS=ON \
-DBUILD_SHARED_LIBS=OFF \
-DDART_USE_SYSTEM_IMGUI=ON
""" }
""", env = { DART_VERBOSE = "OFF" } }
lint-py = { cmd = "black . --exclude '\\..*' && isort . --skip-glob '.*'", depends_on = [
"config",
] }
Expand All @@ -210,51 +210,51 @@ check-lint-py = { cmd = "black . --check --exclude '\\..*' && isort . --check --
] }
check-lint = { depends_on = ["check-lint-py"] }

build = { cmd = "cmake --build build --config Release -j", depends_on = [
build = { cmd = "cmake --build build --config $BUILD_TYPE -j", depends_on = [
"config",
] }
build-tests = { cmd = "cmake --build build --config Release -j --target tests", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
build-tests = { cmd = "cmake --build build --config $BUILD_TYPE -j --target tests", depends_on = [
"config",
] }
], env = { BUILD_TYPE = "OFF" } }
build-dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [
"config",
] }

test = { cmd = "ctest --test-dir build --build-config Release --output-on-failure", depends_on = [
test = { cmd = "ctest --test-dir build --build-config $BUILD_TYPE --output-on-failure", depends_on = [
"build-tests",
] }
test-dartpy = { cmd = "cmake --build build --config Release -j --target pytest", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
test-dartpy = { cmd = "cmake --build build --config $BUILD_TYPE -j --target pytest", depends_on = [
"config",
] }
test-all = { cmd = "cmake --build build --config Release -j --target ALL", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
test-all = { cmd = "cmake --build build --config $BUILD_TYPE -j --target ALL", depends_on = [
"config",
] }
], env = { BUILD_TYPE = "OFF" } }

tu-biped = { cmd = "cmake --build build --config Release --target tutorial_biped --parallel && build/Release/tutorial_biped.exe", depends_on = [
tu-biped = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_biped --parallel && build/$BUILD_TYPE/tutorial_biped.exe", depends_on = [
"config",
] }
tu-biped-fi = { cmd = "cmake --build build --config Release --target tutorial_biped_finished --parallel && build/Release/tutorial_biped_finished.exe", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
tu-biped-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_biped_finished --parallel && build/$BUILD_TYPE/tutorial_biped_finished.exe", depends_on = [
"config",
] }
tu-collisions = { cmd = "cmake --build build --config Release --target tutorial_collisions --parallel && build/Release/tutorial_collisions.exe", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
tu-collisions = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_collisions --parallel && build/$BUILD_TYPE/tutorial_collisions.exe", depends_on = [
"config",
] }
tu-collisions-fi = { cmd = "cmake --build build --config Release --target tutorial_collisions_finished --parallel && build/Release/tutorial_collisions_finished.exe", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
tu-collisions-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_collisions_finished --parallel && build/$BUILD_TYPE/tutorial_collisions_finished.exe", depends_on = [
"config",
] }
tu-dominoes = { cmd = "cmake --build build --config Release --target tutorial_dominoes --parallel && build/Release/tutorial_dominoes.exe", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
tu-dominoes = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_dominoes --parallel && build/$BUILD_TYPE/tutorial_dominoes.exe", depends_on = [
"config",
] }
tu-dominoes-fi = { cmd = "cmake --build build --config Release --target tutorial_dominoes_finished --parallel && build/Release/tutorial_dominoes_finished.exe", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
tu-dominoes-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_dominoes_finished --parallel && build/$BUILD_TYPE/tutorial_dominoes_finished.exe", depends_on = [
"config",
] }
tu-multi-pendulum = { cmd = "cmake --build build --config Release --target tutorial_multi_pendulum --parallel && build/Release/tutorial_multi_pendulum.exe", depends_on = [
], env = { BUILD_TYPE = "OFF" } }
tu-multi-pendulum = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_multi_pendulum --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum.exe", depends_on = [
"config",
] }
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 = [
], env = { BUILD_TYPE = "OFF" } }
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 = [
"config",
] }
], env = { BUILD_TYPE = "OFF" } }

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

0 comments on commit 50e9a66

Please sign in to comment.