Repository navigation
Remove the Kit visualizer's lidar drawing #21427
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | |
| # All rights reserved. | |
| # | |
| # SPDX-License-Identifier: BSD-3-Clause | |
| name: Build PIP Wheel | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - 'release/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| actions: read | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| build-wheel: | |
| name: Build Wheel | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Detect wheel-relevant changes | |
| id: changes | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| # Keep this workflow unconditionally triggered on PRs so required | |
| # branch-protection checks are always reported. The build steps below | |
| # run only when inputs that can affect the wheel have changed. | |
| patterns=( | |
| $'^apps/\tStandalone apps packaged in the wheel' | |
| $'^examples/\tDemos and examples packaged in the wheel' | |
| $'^scripts/\tScripts packaged in the wheel' | |
| $'^pyproject\.toml$\tWheel dependency metadata and resolver overrides' | |
| $'^uv\.lock$\tWorkspace lock consistency' | |
| $'^VERSION$\tPackage version' | |
| $'^source/\tPython packages' | |
| $'^tools/wheel_builder/\tWheel build tooling' | |
| $'^tools/template/\tTemplate packaged in the wheel' | |
| $'^\.github/workflows/wheel\.yml$\tThis workflow file' | |
| ) | |
| render_table() { | |
| local files="$1" entry regex desc matched count sample | |
| echo "| Pattern | What it covers | Matched files |" | |
| echo "|---|---|---|" | |
| for entry in "${patterns[@]}"; do | |
| IFS=$'\t' read -r regex desc <<< "$entry" | |
| # Feed grep/head from a here-string rather than `printf ... |` so that | |
| # an early-closing reader (head) cannot SIGPIPE an upstream printf and | |
| # trip `set -o pipefail` when the file list is large. | |
| matched=$(grep -E "$regex" <<< "$files" || true) | |
| if [ -n "$matched" ]; then | |
| count=$(wc -l <<< "$matched") | |
| sample=$(head -3 <<< "$matched" | paste -sd ', ' -) | |
| [ "$count" -gt 3 ] && sample="$sample (and $((count - 3)) more)" | |
| echo "| \`$regex\` | $desc | $sample |" | |
| else | |
| echo "| \`$regex\` | $desc | - |" | |
| fi | |
| done | |
| } | |
| any_match() { | |
| local files="$1" entry regex | |
| for entry in "${patterns[@]}"; do | |
| IFS=$'\t' read -r regex _ <<< "$entry" | |
| if grep -qE "$regex" <<< "$files"; then | |
| return 0 | |
| fi | |
| done | |
| return 1 | |
| } | |
| decide() { | |
| local decision="$1" reason="$2" files="${3:-}" | |
| echo "run_build=$decision" >> "$GITHUB_OUTPUT" | |
| { | |
| echo "## Wheel build gating" | |
| echo "" | |
| if [ "$decision" = "true" ]; then | |
| echo "The wheel build will **run**: $reason." | |
| else | |
| echo "The wheel build will be **skipped**: $reason." | |
| fi | |
| if [ -n "$files" ]; then | |
| echo "" | |
| render_table "$files" | |
| fi | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| } | |
| if [ "$EVENT_NAME" != "pull_request" ]; then | |
| decide true "non-PR event ($EVENT_NAME)" | |
| exit 0 | |
| fi | |
| if ! changed_files="$(gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/files" --jq '.[].filename')"; then | |
| echo "::warning::Could not list changed files; defaulting to building the wheel" | |
| decide true "fail-safe (could not list changed files)" | |
| exit 0 | |
| fi | |
| if any_match "$changed_files"; then | |
| decide true "wheel-relevant paths changed" "$changed_files" | |
| else | |
| decide false "no wheel-relevant paths changed" "$changed_files" | |
| fi | |
| - name: Skip wheel build | |
| if: steps.changes.outputs.run_build == 'false' | |
| run: echo "Skipping wheel build because this PR does not change wheel inputs." | |
| - name: Checkout code | |
| if: steps.changes.outputs.run_build == 'true' | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 1 | |
| lfs: true | |
| - name: Setup Python | |
| if: steps.changes.outputs.run_build == 'true' | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.12" | |
| architecture: x64 | |
| # Wheel building, resolution, and installation share uv's cache. | |
| - name: Set up uv | |
| if: steps.changes.outputs.run_build == 'true' | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| with: | |
| enable-cache: true | |
| # Neither this job nor kitless-docker pins python-version, so both land | |
| # on the same `-unknown-` cache key and only one can save. This job | |
| # caches the wheel's full extras resolution; keep it separate. | |
| cache-suffix: wheel-extras | |
| - name: Check workspace lock consistency | |
| if: steps.changes.outputs.run_build == 'true' | |
| run: uv lock --check | |
| - name: Test workspace dependency resolution | |
| if: steps.changes.outputs.run_build == 'true' | |
| run: >- | |
| uv run --no-project --python 3.12 --with pytest python -m pytest -v | |
| source/isaaclab/test/install_ci/test_resolution.py | |
| # Compose Docker-image-style metadata for the artifact. The artifact | |
| # name is what QA sees in `gh run download`, so we make it scannable: | |
| # isaaclab-<VERSION>-build<RUN_NUMBER>-<SHA7>. The wheel inside follows | |
| # PEP 440 (VERSION+buildN.SHA7) since pip requires that format. | |
| - name: Compute wheel metadata | |
| if: steps.changes.outputs.run_build == 'true' | |
| id: meta | |
| run: | | |
| set -euo pipefail | |
| version=$(cat VERSION) | |
| sha_slug="${GITHUB_SHA:0:7}" | |
| echo "artifact_name=isaaclab-${version}-build${{ github.run_number }}-${sha_slug}" >> "$GITHUB_OUTPUT" | |
| - name: Build wheel | |
| if: steps.changes.outputs.run_build == 'true' | |
| env: | |
| WHEEL_BUILD_NUMBER: ${{ github.run_number }} | |
| WHEEL_SHA: ${{ github.sha }} | |
| run: bash tools/wheel_builder/build.sh | |
| # The development branch may temporarily use Git-pinned dependencies. Release | |
| # branches must remain publishable to PyPI and therefore reject direct URLs. | |
| - name: Validate PyPI metadata | |
| if: >- | |
| steps.changes.outputs.run_build == 'true' && | |
| (startsWith(github.ref, 'refs/heads/release/') || | |
| startsWith(github.base_ref, 'release/')) | |
| run: >- | |
| uv run --no-project --with packaging python tools/wheel_builder/validate_pypi_metadata.py | |
| tools/wheel_builder/build/dist/isaaclab-*.whl | |
| - name: Upload wheel artifact | |
| if: steps.changes.outputs.run_build == 'true' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ steps.meta.outputs.artifact_name }} | |
| path: tools/wheel_builder/build/dist/isaaclab-*.whl | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Download wheel artifact for install test | |
| if: steps.changes.outputs.run_build == 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| WHEEL_ARTIFACT: ${{ steps.meta.outputs.artifact_name }} | |
| run: | | |
| set -euo pipefail | |
| # Newly finalized artifacts can be listed before their download is available. | |
| for attempt in {1..6}; do | |
| if gh run download "$GITHUB_RUN_ID" --repo "$GITHUB_REPOSITORY" \ | |
| --name "$WHEEL_ARTIFACT" --dir /tmp/isaaclab-wheel-artifact; then | |
| exit 0 | |
| fi | |
| if [ "$attempt" -lt 6 ]; then | |
| sleep 10 | |
| fi | |
| done | |
| echo "Unable to download the wheel artifact after six attempts" >&2 | |
| exit 1 | |
| - name: Test wheel extras resolution | |
| if: steps.changes.outputs.run_build == 'true' | |
| run: | | |
| set -euo pipefail | |
| overrides="$GITHUB_WORKSPACE/tools/wheel_builder/uv-overrides.txt" | |
| cd /tmp | |
| uv venv --python 3.12 /tmp/isaaclab-wheel-install | |
| source /tmp/isaaclab-wheel-install/bin/activate | |
| bash "$GITHUB_WORKSPACE/.github/actions/_lib/with-python-package-retries.sh" uv pip install --upgrade pip | |
| wheel="$(find /tmp/isaaclab-wheel-artifact -name 'isaaclab-*.whl' -print -quit)" | |
| if [ -z "$wheel" ]; then | |
| echo "No isaaclab wheel found in downloaded artifact" >&2 | |
| exit 1 | |
| fi | |
| bash "$GITHUB_WORKSPACE/.github/actions/_lib/with-python-package-retries.sh" uv pip install \ | |
| --dry-run \ | |
| --torch-backend cu130 \ | |
| "${wheel}[all]" | |
| bash "$GITHUB_WORKSPACE/.github/actions/_lib/with-python-package-retries.sh" uv pip install \ | |
| --dry-run \ | |
| --python-platform windows \ | |
| --target /tmp/isaaclab-wheel-windows \ | |
| --torch-backend cu130 \ | |
| --overrides "$overrides" \ | |
| --extra-index-url https://pypi.nvidia.com \ | |
| --index-strategy unsafe-best-match \ | |
| "${wheel}[isaacsim]" | |
| # Ubuntu 22.04's glibc 2.35 also supports warp-lang's aarch64 wheels (>= 2.34). | |
| bash "$GITHUB_WORKSPACE/.github/actions/_lib/with-python-package-retries.sh" uv pip install \ | |
| --dry-run \ | |
| --python-platform aarch64-manylinux_2_35 \ | |
| --target /tmp/isaaclab-wheel-aarch64 \ | |
| --overrides "$overrides" \ | |
| --extra-index-url https://pypi.nvidia.com \ | |
| --torch-backend cu130 \ | |
| --index-strategy unsafe-best-match \ | |
| "${wheel}[isaacsim]" | |
| bash "$GITHUB_WORKSPACE/.github/actions/_lib/with-python-package-retries.sh" uv pip install \ | |
| --dry-run \ | |
| --overrides "$overrides" \ | |
| --torch-backend cu130 \ | |
| "${wheel}[importers]" | |
| bash "$GITHUB_WORKSPACE/.github/actions/_lib/with-python-package-retries.sh" uv pip install \ | |
| --dry-run \ | |
| --overrides "$overrides" \ | |
| --extra-index-url https://pypi.nvidia.com \ | |
| --torch-backend cu130 \ | |
| --index-strategy unsafe-best-match \ | |
| "${wheel}[isaacsim]" | |
| - name: Test installed base wheel | |
| if: steps.changes.outputs.run_build == 'true' | |
| run: | | |
| set -euo pipefail | |
| wheels=(/tmp/isaaclab-wheel-artifact/isaaclab-*.whl) | |
| if [ "${#wheels[@]}" -ne 1 ] || [ ! -f "${wheels[0]}" ]; then | |
| echo "Expected exactly one downloaded wheel" >&2 | |
| exit 1 | |
| fi | |
| export ISAACLAB_WHEEL="${wheels[0]}" | |
| uv run --no-project --python 3.12 --with pytest python -m pytest -v \ | |
| 'source/isaaclab/test/install_ci/test_wheel.py::test_installed_wheel[base]' |