Skip to content

build: drop CMake presets, move the wheel tree out of build/ - #916

Open
jiwenc-nv wants to merge 2 commits into
mainfrom
jiwenc/build-dir-layout
Open

build: drop CMake presets, move the wheel tree out of build/#916
jiwenc-nv wants to merge 2 commits into
mainfrom
jiwenc/build-dir-layout

Conversation

@jiwenc-nv

@jiwenc-nv jiwenc-nv commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

The presets existed to give each Python version its own build directory, since the interpreter and ABI are baked into a build tree. That isolation came at a price: cmake -B build — the form every other page and every plugin still used — became the unsupported path, and the managed trees sat underneath build/, so rm -rf build took out all of them at once.

This goes back to cmake -B build as the single documented flow and enforces the isolation directly instead. ISAAC_TELEOP_PYTHON_VERSION is stamped into the cache, and changing it on an existing tree is now a hard error naming a fresh directory to use.

That guard is the one addition beyond the mechanical sweep, and it closes a real silent bug: passing -DISAAC_TELEOP_PYTHON_VERSION=3.12 to a tree configured for 3.11 previously printed "Configuring for Python 3.12" and cached 3.12 while still compiling against the 3.11 venv. Happy to drop it if you'd rather just document "use a fresh directory".

The scikit-build-core tree moves to build-wheel/<cache-tag>, outside build/, so pip and a classic configure can't collide. Python bindings stay ON by default.

CI keeps its 3-Python matrix via -DISAAC_TELEOP_PYTHON_VERSION=; only GitHub-hosted runners build, so a plain build/ is safe.

Testing

On Ubuntu 24.04 aarch64:

  • cmake -B build → build → cmake --install: green, 0 errors, produces wheels/isaacteleop-1.5+local-cp311-cp311-linux_aarch64.whl.
  • ctest: 160/161. The one failure, cloudxr_test_launcher, is environmental (CloudXR SDK download 404, no NGC_API_KEY on this machine) and predates the change.
  • Version guard: 3.11 → 3.12 on an existing tree now errors; before, it silently built 3.11 extensions.
  • Upgrade path: trees stamped with the old boolean TRUE are adopted silently rather than erroring — verified a TRUE-stamped cache reconfigures clean and re-stamps to 3.11.
  • sphinx -W builds clean.

Summary by CodeRabbit

  • Build Improvements

    • Simplified CMake builds with direct configuration and build commands.
    • Added clearer separation between standard builds and wheel builds.
    • Build configuration now records the selected Python version and prevents accidental version changes in existing build directories.
    • Updated Windows and Ubuntu build workflows for the new layout.
  • Documentation

    • Updated build, installation, troubleshooting, and simulation plugin instructions.
    • Added guidance for clean rebuilds and Python-version-specific build directories.
  • Chores

    • Removed obsolete CMake presets.
    • Excluded wheel build artifacts from version control.

The presets existed to give each Python version its own directory, because the
interpreter and ABI are baked into a build tree. That bought isolation at the
cost of making `cmake -B build` — the form every other page and every plugin
still used — the unsupported path, and it put the managed trees underneath
build/ so `rm -rf build` took out all of them at once.

Go back to `cmake -B build` as the one documented flow, and enforce the
isolation directly instead: ISAAC_TELEOP_PYTHON_VERSION is now stamped into the
cache, and changing it on an existing tree is a hard error pointing at a fresh
directory. Previously it was silently ignored — the cache and the "Configuring
for Python X" message would say 3.12 while the extensions compiled against the
3.11 venv.

The scikit-build-core tree moves to build-wheel/<cache-tag>, out of build/, so
pip and a classic configure cannot collide. Python bindings stay on by default.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e2886ced-7647-4ade-ac6f-8ece63d40b35

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR removes CMake presets for Python 3.11, 3.12, and 3.13. CI workflows now configure and build explicit build directories. CMake records the selected Python version and rejects incompatible reuse of a build tree. Build documentation uses direct CMake commands and separate directories for classic and wheel builds. The wheel directory is now build-wheel/<cache-tag> and is ignored by Git.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the primary changes: removing CMake presets and moving the wheel build tree outside build/.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jiwenc/build-dir-layout

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/source/getting_started/build_from_source/index.rst`:
- Around line 272-277: Update the clean-build instructions in
docs/source/getting_started/build_from_source/index.rst:272-277,
docs/source/getting_started/lerobot/data_collection_sim.rst:180-181, and
docs/source/references/build.rst:150-154 so all three uses of `cmake -B build
--fresh` are compatible with the supported CMake 3.20 minimum, or consistently
raise the documented minimum to 3.24 if that support is intentionally dropped.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cbc313b2-5755-4056-9a4c-69c89957122d

📥 Commits

Reviewing files that changed from the base of the PR and between 1a324ab and 6666bdc.

📒 Files selected for processing (10)
  • .github/workflows/build-ubuntu.yml
  • .github/workflows/build-windows.yml
  • .gitignore
  • CMakePresets.json
  • CMakePresets.json.license
  • cmake/SetupPython.cmake
  • docs/source/getting_started/build_from_source/index.rst
  • docs/source/getting_started/lerobot/data_collection_sim.rst
  • docs/source/references/build.rst
  • pyproject.toml
💤 Files with no reviewable changes (2)
  • CMakePresets.json
  • CMakePresets.json.license

Comment on lines +272 to +277
Clean rebuild (``--fresh`` wipes the CMake cache and reconfigures):

.. code-block:: bash

cmake --preset py3.12 --fresh
cmake --build --preset py3.12
cmake -B build --fresh
cmake --build build

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

cmake --version
if ! cmake --help | grep -q -- '--fresh'; then
  echo "This CMake does not support --fresh."
  exit 1
fi

Repository: NVIDIA/IsaacTeleop

Length of output: 199


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- CMake version references ---'
rg -n -i 'cmake.{0,40}(3\.20|minimum|version)|3\.20.{0,40}cmake|cmake.{0,20}3\.24' \
  docs CMakeLists.txt .github 2>/dev/null || true

printf '%s\n' '--- Referenced documentation sections ---'
for f in \
  docs/source/getting_started/build_from_source/index.rst \
  docs/source/getting_started/lerobot/data_collection_sim.rst \
  docs/source/references/build.rst
do
  echo "### $f"
  sed -n '1,80p' "$f" | cat -n
  case "$f" in
    *build_from_source*) sed -n '250,285p' "$f" | cat -n ;;
    *data_collection_sim*) sed -n '165,190p' "$f" | cat -n ;;
    *references/build.rst) sed -n '135,165p' "$f" | cat -n ;;
  esac
done

Repository: NVIDIA/IsaacTeleop

Length of output: 17175


🌐 Web query:

CMake 3.20 cmake --fresh introduced version official documentation

💡 Result:

The --fresh command-line option was introduced in CMake 3.24, not 3.20 [1][2][3]. This option allows users to perform a fresh configuration of a build tree by removing any existing CMakeCache.txt file and associated CMakeFiles/ directory, effectively starting the configuration from scratch as if the build tree were new [2][3]. It is documented in the official CMake manual under the cmake(1) command-line options [2][4].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- CMake version references ---'
rg -n -i 'cmake.{0,40}(3\.20|minimum|version)|3\.20.{0,40}cmake|cmake.{0,20}3\.24' \
  docs CMakeLists.txt .github 2>/dev/null || true

printf '%s\n' '--- Referenced documentation sections ---'
for f in \
  docs/source/getting_started/build_from_source/index.rst \
  docs/source/getting_started/lerobot/data_collection_sim.rst \
  docs/source/references/build.rst
do
  echo "### $f"
  case "$f" in
    *build_from_source*) sed -n '250,285p' "$f" | cat -n ;;
    *data_collection_sim*) sed -n '165,190p' "$f" | cat -n ;;
    *references/build.rst) sed -n '135,165p' "$f" | cat -n ;;
  esac
done

Repository: NVIDIA/IsaacTeleop

Length of output: 5589


Support the documented CMake versions.

--fresh requires CMake 3.24, but the project supports CMake 3.20 and higher. If CMake 3.20 remains supported, replace all three cmake -B build --fresh commands with a compatible clean-build procedure. Otherwise, raise the documented minimum to CMake 3.24.

📍 Affects 3 files
  • docs/source/getting_started/build_from_source/index.rst#L272-L277 (this comment)
  • docs/source/getting_started/lerobot/data_collection_sim.rst#L180-L181
  • docs/source/references/build.rst#L150-L154
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/source/getting_started/build_from_source/index.rst` around lines 272 -
277, Update the clean-build instructions in
docs/source/getting_started/build_from_source/index.rst:272-277,
docs/source/getting_started/lerobot/data_collection_sim.rst:180-181, and
docs/source/references/build.rst:150-154 so all three uses of `cmake -B build
--fresh` are compatible with the supported CMake 3.20 minimum, or consistently
raise the documented minimum to 3.24 if that support is intentionally dropped.

Sources: Path instructions, MCP tools

The clean-rebuild instructions use `cmake --fresh`, which landed in CMake 3.24,
while the floor was 3.20. Raise the floor rather than working around it.

Ubuntu 22.04's apt cmake is 3.22 and no longer qualifies; the prerequisite list
now points at Kitware's APT repo or pip. On the pip path scikit-build-core
fetches a CMake from PyPI, so only the <4 cap still matters there.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant