Skip to content

Commit b6985e5

Browse files
committed
cleanup: drop unrelated build/docs tweaks
1 parent 20cf6f6 commit b6985e5

File tree

9 files changed

+123
-236
lines changed

9 files changed

+123
-236
lines changed

CMakeLists.txt

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,17 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
358358
endif()
359359
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPERCASE)
360360

361-
set(_dart_is_debug FALSE)
361+
set(DART_BUILD_MODE_DEBUG FALSE)
362+
set(DART_BUILD_MODE_RELEASE FALSE)
363+
362364
if("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "DEBUG")
363-
set(_dart_is_debug TRUE)
365+
set(DART_BUILD_MODE_DEBUG TRUE)
366+
elseif("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "RELEASE")
367+
set(DART_BUILD_MODE_RELEASE TRUE)
368+
elseif("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "RELWITHDEBINFO")
369+
set(DART_BUILD_MODE_RELEASE TRUE)
370+
elseif("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "MINSIZEREL")
371+
set(DART_BUILD_MODE_RELEASE TRUE)
364372
endif()
365373

366374
# Active log level:
@@ -372,19 +380,18 @@ endif()
372380
# - ERROR: To enable log with DART_ERROR() and below
373381
# - FATAL: To enable log with DART_FATAL()
374382
# - OFF: To turn off all the logs
375-
if(_dart_is_debug)
383+
if(DART_BUILD_MODE_DEBUG)
376384
set(DART_ACTIVE_LOG_LEVEL "DEBUG" CACHE STRING "Compile time active log level to enable")
377385
else()
378386
set(DART_ACTIVE_LOG_LEVEL "INFO" CACHE STRING "Compile time active log level to enable")
379387
endif()
380388
set_property(CACHE DART_ACTIVE_LOG_LEVEL PROPERTY STRINGS TRACE DEBUG INFO WARN ERROR FATAL OFF)
381389

382-
set(_dart_warnings_as_errors_default OFF)
383-
if(NOT _dart_is_debug)
384-
set(_dart_warnings_as_errors_default ON)
390+
if(DART_BUILD_MODE_DEBUG)
391+
option(DART_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
392+
else()
393+
option(DART_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" ON)
385394
endif()
386-
option(DART_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" ${_dart_warnings_as_errors_default})
387-
unset(_dart_warnings_as_errors_default)
388395

389396
option(DART_BUILD_WHEELS "Indicate building dartpy for wheels" OFF)
390397

@@ -607,6 +614,12 @@ add_subdirectory(dart)
607614

608615
if(DART_BUILD_DART8)
609616
add_subdirectory(dart8)
617+
618+
if(MSVC)
619+
add_subdirectory(tests_dart8)
620+
else()
621+
add_subdirectory(tests_dart8 EXCLUDE_FROM_ALL)
622+
endif()
610623
endif()
611624

612625
set(DART_IN_SOURCE_BUILD TRUE)
@@ -623,13 +636,12 @@ if(TARGET dart)
623636
endif()
624637

625638
if(DART_BUILD_DART8)
626-
if(MSVC)
627-
add_subdirectory(tests_dart8)
628-
else()
629-
add_subdirectory(tests_dart8 EXCLUDE_FROM_ALL)
639+
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests_dart8/CMakeLists.txt")
640+
if(NOT TARGET dart8_tests)
641+
add_custom_target(dart8_tests)
642+
endif()
630643
endif()
631644
endif()
632-
633645
elseif(NOT DART_BUILD_TESTS)
634646
message(STATUS "Skipping tests (DART_BUILD_TESTS == OFF)")
635647
else()

cmake/dart8_defs.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ function(dart8_add_unit_test_dir MODULE_NAME MODULE_DIR)
488488
# Create meta target for this module
489489
add_custom_target(dart8_tests_${MODULE_NAME}
490490
DEPENDS ${module_test_targets}
491-
COMMAND ${CMAKE_COMMAND} -E echo "Built DART8 ${MODULE_NAME} unit tests."
492491
COMMENT "Building DART8 ${MODULE_NAME} tests"
493492
)
494493

dart/config.hpp.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
#define DART_COMPILER_MSVC
6464
#endif
6565

66+
// Indicates the build mode used for compiling
67+
#cmakedefine01 DART_BUILD_MODE_DEBUG
68+
#cmakedefine01 DART_BUILD_MODE_RELEASE
69+
6670
#cmakedefine01 DART_HAVE_BULLET
6771
#cmakedefine01 DART_HAVE_ODE
6872
#cmakedefine01 DART_HAVE_OCTOMAP

dart/utils/mjcf/MjcfParser.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@
3434

3535
#include "dart/collision/All.hpp"
3636
#include "dart/common/All.hpp"
37-
#include "dart/common/Diagnostics.hpp"
3837
#include "dart/common/Macros.hpp"
3938
#include "dart/config.hpp"
40-
DART_SUPPRESS_DEPRECATED_BEGIN
4139
#include "dart/constraint/All.hpp"
42-
DART_SUPPRESS_DEPRECATED_END
4340
#include "dart/dynamics/All.hpp"
4441
#include "dart/utils/CompositeResourceRetriever.hpp"
4542
#include "dart/utils/DartResourceRetriever.hpp"

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Located in `onboarding/` - **Architecture guides for developers:**
1616
- [Core Architecture](onboarding/architecture.md) - Deep dive into simulation engine internals
1717
- [Aspect System](onboarding/aspect-system.md) - Aspect/State/Properties design and implementation
1818
- [Dynamics System](onboarding/dynamics.md) - Articulated body system and kinematics
19+
- [Constraint Solver](onboarding/constraints.md) - Constraint resolution and collision response
1920
- [GUI & Rendering](onboarding/gui-rendering.md) - OpenSceneGraph integration details
2021
- [Python Bindings](onboarding/python-bindings.md) - nanobind bindings architecture
2122
- [Build System](onboarding/build-system.md) - CMake internals and dependency analysis

docs/dev_tasks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Documentation for development tasks in DART.
2525

2626
**When task is completed**:
2727

28-
1. **Add brief section** to existing `docs/onboarding/` file (avoid adding new standalone files when a section fits in an existing doc)
28+
1. **Add brief section** to existing `docs/onboarding/` file (e.g., add to constraints.md, not new file)
2929
2. **Remove the entire task folder** from `docs/dev_tasks/`
3030
3. **Keep onboarding docs concise** - too many docs make them hard to use effectively
3131

docs/onboarding/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ This onboarding guide is organized into several focused documents:
4949
- **[ci-cd.md](ci-cd.md)** - CI/CD workflows, caching strategies, and performance optimization
5050
- **[architecture.md](architecture.md)** - Deep dive into DART's simulation core
5151
- **[dynamics.md](dynamics.md)** - Articulated body system and kinematics
52+
- **[constraints.md](constraints.md)** - Constraint resolution and collision response
5253
- **[gui-rendering.md](gui-rendering.md)** - OpenSceneGraph integration details
5354
- **[python-bindings.md](python-bindings.md)** - nanobind bindings architecture
5455
- **[api-documentation.md](api-documentation.md)** - Publishing strategy for RTD and GitHub Pages API docs

docs/onboarding/ci-cd.md

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@ DART uses GitHub Actions for continuous integration and deployment. The CI syste
1010
- Local build/test entry points: [building.md](building.md) and [testing.md](testing.md)
1111
- Gazebo / gz-physics workflow: [build-system.md](build-system.md#gazebo-integration-feature)
1212
- PR template checklist: [`.github/PULL_REQUEST_TEMPLATE.md`](../../.github/PULL_REQUEST_TEMPLATE.md)
13-
- Used in this task:
14-
- `git status -sb`
15-
- `gh pr list --head "$(git branch --show-current)" --json number,title,state,url,headRefName`
16-
- `gh pr status`
17-
- Suggested (Unverified):
18-
- `gh pr checks <pr_number>`
19-
- `gh pr checks <pr_number> --watch --interval 30 --fail-fast`
20-
- `gh run view <run_id> --job <job_id> --log-failed`
21-
- Gotchas (encountered in this task):
22-
- `gh pr status --json ...` can error with `Unknown JSON field: ...` if you request unsupported fields; use `gh pr status` (no JSON) or `gh pr view --json ...`. In this task, `gh pr status --json currentBranch,createdBy,needsReview,reviewRequests,statusCheckRollup` failed with `Unknown JSON field: "currentBranch"`.
23-
- `gh pr checks` may show duplicate entries when workflows run for both `push` and `pull_request` events; compare the run URLs and focus on the newest one.
24-
- zsh can produce `parse error near '}'` if a `gh ... --jq` expression containing `{ ... }` isn't fully quoted; wrap the whole jq program in single quotes.
13+
- Fast CI fail-fast loop:
14+
- Suggested (Unverified): `gh pr checks <PR_NUMBER> --watch --interval 30 --fail-fast`
15+
- Suggested (Unverified): `gh run view --job <JOB_ID> --log-failed`
16+
- Gotchas (observed in this task):
17+
- On some Linux runners (especially self-hosted), `sccache` can fail during CMake `try_compile` with `sccache: error: while hashing the input file ... No such file or directory (os error 2)`.
18+
- On macOS, `mozilla-actions/[email protected]` can fail with transient network errors like `HttpError: Connect Timeout Error`. Our `.github/workflows/ci_macos.yml` treats "Setup sccache" as best-effort (`continue-on-error: true`) so the job continues without sccache.
2519
- If `CI gz-physics` fails, reproduce locally with the Gazebo workflow in [build-system.md](build-system.md#gazebo-integration-feature).
2620

2721
## Workflow Architecture
@@ -83,16 +77,7 @@ jobs all share the same configuration**. You can disable auto-detection with
8377
disable_annotations: true
8478

8579
- name: Configure environment for compiler cache
86-
run: |
87-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
88-
echo "DART_COMPILER_CACHE=sccache" >> $GITHUB_ENV
89-
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
90-
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
91-
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
92-
echo "CCACHE_DIR=${RUNNER_TEMP}/ccache" >> $GITHUB_ENV
93-
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
94-
echo "CCACHE_MAXSIZE=5G" >> $GITHUB_ENV
95-
mkdir -p "${RUNNER_TEMP}/ccache"
80+
uses: ./.github/actions/configure-compiler-cache
9681
```
9782
9883
**Windows setup** (see `.github/workflows/ci_windows.yml`):
@@ -107,9 +92,15 @@ jobs all share the same configuration**. You can disable auto-detection with
10792
shell: powershell
10893
run: |
10994
echo "SCCACHE_GHA_ENABLED=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
95+
echo "SCCACHE_NO_DAEMON=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
11096
echo "DART_COMPILER_CACHE=sccache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
111-
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
112-
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
97+
if ($env:SCCACHE_PATH) {
98+
echo "CMAKE_C_COMPILER_LAUNCHER=$env:SCCACHE_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
99+
echo "CMAKE_CXX_COMPILER_LAUNCHER=$env:SCCACHE_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
100+
} else {
101+
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
102+
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
103+
}
113104
$ccacheDir = Join-Path $env:RUNNER_TEMP "ccache"
114105
New-Item -ItemType Directory -Force -Path $ccacheDir | Out-Null
115106
echo "CCACHE_BASEDIR=$env:GITHUB_WORKSPACE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
@@ -127,6 +118,11 @@ directly or via `pixi`. pixi still forwards `CMAKE_*_COMPILER_LAUNCHER` to any
127118
external CMake projects it drives (e.g., gz-physics) so nested builds benefit
128119
from the same cache.
129120

121+
#### CI reliability notes
122+
123+
- The `.github/actions/configure-compiler-cache` action may disable the sccache launcher on some Linux runners (e.g., self-hosted or non-Ubuntu) and fall back to `ccache` when available (otherwise `env`) to avoid flaky `try_compile` failures.
124+
- In `.github/workflows/ci_macos.yml`, the "Setup sccache" step is best-effort (`continue-on-error: true`) so transient download timeouts don't fail the job.
125+
130126
## MSVC Multi-Core Compilation
131127

132128
**Critical configuration** (`CMakeLists.txt` line 282-284):
@@ -260,15 +256,6 @@ All tests run through `pixi run test-all`, which includes:
260256

261257
## Monitoring and Maintenance
262258

263-
### Watching runs from the CLI
264-
265-
- List recent runs: `gh run list --branch <branch> --limit 10`
266-
- Watch a run: `gh run watch <run-id> --interval 30 --compact --exit-status`
267-
- View failed logs: `gh run view <run-id> --log-failed`
268-
269-
Note: `gh run watch` exits only after the entire workflow run completes; it does
270-
not stop immediately when the first job fails.
271-
272259
### Expected CI Times
273260

274261
**Without caching (first run):**
@@ -315,19 +302,26 @@ not stop immediately when the first job fails.
315302

316303
### Monitoring and Debugging from the GitHub CLI
317304

318-
#### Branch / PR Recon (used in this task)
305+
#### Branch / PR Recon
306+
307+
Suggested (Unverified):
319308

320309
```bash
321-
git rev-parse --show-toplevel
322310
git status -sb
323-
git branch -vv
324-
git remote -v
325-
git log -20 --oneline --decorate
326-
git diff --stat
327-
git stash list
311+
git fetch origin
312+
git rev-list --left-right --count HEAD...origin/main
328313
```
329314

330-
Map the current branch to a PR (used in this task):
315+
Example (used in this task):
316+
317+
```bash
318+
git rev-parse --show-toplevel
319+
git status --porcelain=v1 -b
320+
git fetch origin
321+
git rev-list --left-right --count HEAD...origin/main
322+
```
323+
324+
Map the current branch to a PR (Suggested (Unverified)):
331325

332326
```bash
333327
gh pr list --head "$(git branch --show-current)" --json number,title,state,url,headRefName
@@ -339,51 +333,40 @@ gh pr view --json number,title,url,state,baseRefName,headRefName,author,labels,b
339333
Suggested (Unverified):
340334

341335
```bash
342-
gh pr status
343-
gh pr checks <pr_number>
344-
gh pr view <pr_number> --json reviewDecision,latestReviews,reviewRequests,state,isDraft,mergeable,mergeStateStatus,statusCheckRollup
336+
gh run list --branch <BRANCH> -e pull_request -L 20
337+
gh run watch <RUN_ID> --interval 30
338+
gh run view --job <JOB_ID> --log-failed
339+
gh pr checks <PR_NUMBER>
345340
```
346341

347342
Example (used in this task):
348343

349344
```bash
350-
gh pr checks 2298
351-
gh pr view 2298 --json reviewDecision,latestReviews,reviewRequests,state,isDraft,mergeable,mergeStateStatus,statusCheckRollup
345+
gh run list --branch fix/dartpy-bindings-cleanup -e pull_request -L 20
346+
gh run watch 20345022400 --interval 30
347+
gh run view --job 58403655163 --log-failed
348+
gh api repos/dartsim/dart/actions/jobs/58403655163 --jq '{id: .id, status: .status, conclusion: .conclusion, runner_name: .runner_name, runner_group: .runner_group_name, labels: .labels, started_at: .started_at, completed_at: .completed_at}'
349+
gh pr checks 2328
352350
```
353351

354-
Inspect logs for a failing job:
355-
356-
Suggested (Unverified):
352+
If a job behaves differently than expected, confirm which runner actually executed it (Suggested (Unverified)):
357353

358354
```bash
359-
gh run view <run_id> --job <job_id> --log-failed
360-
```
361-
362-
Example (used in this task):
363-
364-
```bash
365-
gh run view 20275198109 --job 58221775555 --log-failed
366-
gh run view 20275198456 --job 58221776649 --log-failed
355+
gh api repos/<ORG>/<REPO>/actions/jobs/<JOB_ID> --jq '{id: .id, status: .status, conclusion: .conclusion, runner_name: .runner_name, runner_group: .runner_group_name, labels: .labels, started_at: .started_at, completed_at: .completed_at}'
367356
```
368357

369358
If `--log-failed` is missing context, list job step outcomes first:
370359

371360
Suggested (Unverified):
372361

373362
```bash
374-
gh run view <run_id> --json jobs --jq '.jobs[] | select(.databaseId==<job_id>) | {steps:[.steps[] | {name: .name, conclusion: .conclusion}]}'
375-
```
376-
377-
Example (used in this task):
378-
379-
```bash
380-
gh run view 20275198109 --json jobs --jq '.jobs[] | select(.databaseId==58221775555) | {steps:[.steps[] | {name: .name, conclusion: .conclusion}]}'
363+
gh run view <RUN_ID> --json jobs --jq '.jobs[] | select(.databaseId==<JOB_ID>) | {steps:[.steps[] | {name: .name, conclusion: .conclusion}]}'
381364
```
382365

383366
Suggested (Unverified):
384367

385368
```bash
386-
gh pr checks <pr_number> --watch --interval 30 --fail-fast
369+
gh pr checks <PR_NUMBER> --watch --interval 30 --fail-fast
387370
```
388371

389372
Notes:
@@ -420,6 +403,24 @@ Notes:
420403
- Add dependency tracking to cache key (e.g., hash of `pixi.lock`)
421404
- Run full clean build on schedule to catch issues
422405

406+
### sccache Failures and Flakiness
407+
408+
**Symptoms:**
409+
410+
- CMake `try_compile` fails with `sccache: error: while hashing the input file ... No such file or directory (os error 2)`
411+
- The "Setup sccache" workflow step fails with `HttpError: Connect Timeout Error` (usually transient)
412+
413+
**What to check:**
414+
415+
1. Whether the job ran on a self-hosted runner vs GitHub-hosted (see the runner metadata snippet in [CI Triage](#ci-triage))
416+
2. Whether `.github/actions/configure-compiler-cache` disabled sccache and selected `ccache` (or `env` if unavailable) (look for its stderr messages and `DART_COMPILER_CACHE` in logs)
417+
3. If this only happens on CI, treat sccache as optional and focus on correctness first; caching should not be required to pass CI
418+
419+
**Related files:**
420+
421+
- `.github/actions/configure-compiler-cache/action.yml`
422+
- `.github/workflows/ci_macos.yml`
423+
423424
### Platform-Specific Issues
424425

425426
**Debug-only failures:**

0 commit comments

Comments
 (0)