Add documentation to use xgrid generated asset with Compass #1696
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: Installation Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - release/** | |
| workflow_dispatch: | |
| inputs: | |
| base_image: | |
| description: 'Docker base image for the test container' | |
| required: false | |
| default: 'ubuntu:24.04' | |
| type: string | |
| test_filter: | |
| description: 'pytest -k filter expression (e.g. "uv" or "bugs")' | |
| default: '' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| changes: | |
| name: Detect Installation Test Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| run_install_tests: ${{ steps.detect.outputs.run_install_tests }} | |
| steps: | |
| - id: detect | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| # Installation tests run only when paths in the patterns table change. | |
| # Otherwise the test job skips via `if:` and reports green to branch | |
| # protection, which is why we don't use a workflow-level `paths:` | |
| # filter (a not-triggered required check would block the PR forever). | |
| patterns=( | |
| $'^apps/\tStandalone apps' | |
| $'^tools/\tBuild tooling' | |
| $'^source/\tLibrary source code' | |
| $'^\\.github/actions/run-package-tests/\tTest action' | |
| $'^\\.github/workflows/install-ci\\.yml$\tThis workflow file' | |
| $'^VERSION$\tVersion file' | |
| $'(^|/)pyproject\\.toml$\tPython project metadata' | |
| $'(^|/)environment\\.ya?ml$\tConda environment file' | |
| ) | |
| triggered_jobs="Installation Tests" | |
| render_table() { | |
| local files="$1" entry regex desc count sample | |
| echo "| Pattern | What it covers | Matched files |" | |
| echo "|---|---|---|" | |
| for entry in "${patterns[@]}"; do | |
| IFS=$'\t' read -r regex desc <<< "$entry" | |
| count=$(printf '%s\n' "$files" | grep -cE "$regex" || true) | |
| if [ "$count" -gt 0 ]; then | |
| sample=$(printf '%s\n' "$files" | grep -E "$regex" | head -3 | 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 printf '%s\n' "$files" | grep -qE "$regex"; then | |
| return 0 | |
| fi | |
| done | |
| return 1 | |
| } | |
| decide() { | |
| local decision="$1" reason="$2" files="${3:-}" | |
| echo "Decision: run_install_tests=$decision ($reason)" | |
| echo "run_install_tests=$decision" >> "$GITHUB_OUTPUT" | |
| { | |
| echo "## Installation test gating" | |
| echo "" | |
| if [ "$decision" = "true" ]; then | |
| echo "Installation tests will **run**: $reason." | |
| else | |
| echo "Installation tests will be **skipped**: $reason." | |
| fi | |
| echo "" | |
| echo "Triggered jobs: $triggered_jobs." | |
| 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 | |
| # Fail-safe: a transient API error must not block merge. Default to running. | |
| echo "::warning::Could not list changed files; defaulting to running tests" | |
| decide true "fail-safe (could not list changed files)" | |
| exit 0 | |
| fi | |
| printf '%s\n' "$changed_files" | |
| if any_match "$changed_files"; then | |
| decide true "relevant paths changed" "$changed_files" | |
| else | |
| decide false "no relevant paths changed" "$changed_files" | |
| fi | |
| install-tests: | |
| name: Installation Tests | |
| needs: [changes] | |
| if: needs.changes.outputs.run_install_tests == 'true' | |
| runs-on: [self-hosted, gpu] | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 # v6 | |
| - name: Run installation tests | |
| env: | |
| BASE_IMAGE: ${{ github.event_name == 'workflow_dispatch' && inputs.base_image || 'ubuntu:24.04' }} | |
| TEST_FILTER: ${{ github.event_name == 'workflow_dispatch' && inputs.test_filter || '' }} | |
| run: | | |
| RUNNER_ARGS="--base-image $BASE_IMAGE" | |
| RUNNER_ARGS="$RUNNER_ARGS --results-dir ${{ github.workspace }}/results" | |
| RUNNER_ARGS="$RUNNER_ARGS --gpu" | |
| PYTEST_EXTRA_ARGS=(-sv) | |
| if [ -n "$TEST_FILTER" ]; then | |
| PYTEST_EXTRA_ARGS+=(-k "$TEST_FILTER") | |
| fi | |
| tools/run_install_ci.py docker $RUNNER_ARGS -- --tb=short "${PYTEST_EXTRA_ARGS[@]}" |