Add add ons to set configurations (#308) #1379
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) 2025, The Isaac Lab Arena Project Developers (https://github.com/isaac-sim/IsaacLab-Arena/blob/main/CONTRIBUTORS.md). | |
| # All rights reserved. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: IsaacLab Arena CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ "main" ] | |
| # Concurrency control to prevent parallel runs on the same PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| issues: read | |
| env: | |
| NGC_API_KEY: ${{ secrets.ARENA_NGC_API_KEY }} | |
| OMNI_PASS: ${{ secrets.OMNI_PASS }} | |
| OMNI_USER: ${{ secrets.OMNI_USER }} | |
| jobs: | |
| pre_commit: | |
| name: Pre-commit | |
| runs-on: [self-hosted, gpu] | |
| timeout-minutes: 30 | |
| container: | |
| image: python:3.11-slim | |
| env: | |
| # We're getting issues with the markers on the checked out files. | |
| SKIP: check-executables-have-shebangs | |
| steps: | |
| - &install_git_step | |
| name: Install git (and tools needed by hooks) | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends git git-lfs clang-format ca-certificates make | |
| git --version | |
| git lfs version | |
| # Clean up residual stuff due to symlinks in the submodules directory | |
| # We do this prior to checkout because the symlink causes issues if it's there from a previous run. | |
| - &cleanup_step | |
| name: Clean up symlinks in submodules directory | |
| run: | | |
| rm -f .git/modules/submodules/IsaacLab/index.lock || true | |
| rm -rf submodules/* || true | |
| # Fix "detected dubious ownership in repository" inside containers | |
| - &mark_repo_safe_step | |
| name: Mark repo as safe for git | |
| run: git config --global --add safe.directory "$PWD" | |
| # Checkout Code | |
| - &checkout_step | |
| name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| # LFS checkout here somehow causes issues when LFS stuff changes over time. | |
| # So I do LFS manually in a step after. | |
| # lfs: true | |
| # Pull LFS files explicitly (in case checkout didn't get them all) | |
| - &git_lfs_step | |
| name: Git LFS | |
| run: | | |
| git lfs update --force | |
| git lfs install --local | |
| git lfs pull | |
| - name: git status | |
| run: | | |
| git status | |
| - name: Run pre-commit | |
| uses: pre-commit/[email protected] | |
| with: | |
| extra_args: --all-files --verbose | |
| test: | |
| name: Run tests | |
| runs-on: [self-hosted, gpu] | |
| timeout-minutes: 60 | |
| needs: [pre_commit] | |
| container: | |
| image: nvcr.io/nvstaging/isaac-amr/isaaclab_arena:latest | |
| credentials: | |
| username: $oauthtoken | |
| password: ${{ env.NGC_API_KEY }} | |
| steps: | |
| # nvidia-smi | |
| - &nvidia_smi | |
| name: nvidia-smi | |
| run: nvidia-smi | |
| # Setup | |
| - *install_git_step | |
| - *cleanup_step | |
| - *mark_repo_safe_step | |
| - *checkout_step | |
| - *git_lfs_step | |
| - &install_project_step | |
| name: Install project and link isaac-sim | |
| run: | | |
| pip install --no-cache-dir -e . | |
| [ -e ./submodules/IsaacLab/_isaac_sim ] || ln -s /isaac-sim ./submodules/IsaacLab/_isaac_sim | |
| # Run the tests (excluding the gr00t related tests) | |
| - name: Run pytest excluding policy-related tests. First we run all tests without cameras. | |
| run: /isaac-sim/python.sh -m pytest -sv -m "not with_cameras" isaaclab_arena/tests/ --ignore=isaaclab_arena/tests/policy/ | |
| - name: Run pytest excluding policy-related tests. Now we run all tests with cameras. | |
| run: /isaac-sim/python.sh -m pytest -sv -m with_cameras isaaclab_arena/tests/ --ignore=isaaclab_arena/tests/policy/ | |
| test_policy: | |
| name: Run policy-related tests with GR00T & cuda12_8 deps | |
| runs-on: [self-hosted, gpu] | |
| timeout-minutes: 60 | |
| needs: [pre_commit] | |
| container: | |
| image: nvcr.io/nvstaging/isaac-amr/isaaclab_arena:cuda_gr00t | |
| credentials: | |
| username: $oauthtoken | |
| password: ${{ env.NGC_API_KEY }} | |
| steps: | |
| # nvidia-smi | |
| - *nvidia_smi | |
| # Setup. | |
| - *install_git_step | |
| - *cleanup_step | |
| - *mark_repo_safe_step | |
| - *checkout_step | |
| - *git_lfs_step | |
| - *install_project_step | |
| # Run the policy (GR00T) related tests. | |
| - name: Run policy-related pytest | |
| run: /isaac-sim/python.sh -m pytest -sv isaaclab_arena/tests/policy/ | |
| build_docs_pre_merge: | |
| name: Build the docs (pre-merge) | |
| runs-on: [self-hosted, gpu] | |
| timeout-minutes: 30 | |
| needs: [pre_commit] | |
| container: | |
| image: python:3.11-slim | |
| steps: | |
| # Setup. | |
| - *install_git_step | |
| - *mark_repo_safe_step | |
| - *cleanup_step | |
| # Checkout all branches, and tags, such that sphinx-multiversion can build the docs for all versions. | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| # Build docs | |
| - name: Build docs | |
| working-directory: ./docs | |
| run: | | |
| pip3 install -r requirements.txt | |
| make SPHINXOPTS=-W multi-docs | |
| touch ./_build/.nojekyll | |
| build_and_push_image_post_merge: | |
| name: Build & push NGC image (post-merge) | |
| runs-on: [self-hosted, gpu] | |
| timeout-minutes: 90 | |
| needs: [test, test_policy] # only push if tests passed | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| container: | |
| image: ubuntu:latest | |
| env: | |
| # already defined at top, but keep here for clarity/local override if needed | |
| NGC_API_KEY: ${{ secrets.ARENA_NGC_API_KEY }} | |
| steps: | |
| # Setup. | |
| - *install_git_step | |
| - *mark_repo_safe_step | |
| - *cleanup_step | |
| - *checkout_step | |
| - name: Install docker | |
| run: | | |
| apt-get update | |
| apt-get install -y ca-certificates curl gnupg && \ | |
| install -m 0755 -d /etc/apt/keyrings && \ | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ | |
| chmod a+r /etc/apt/keyrings/docker.gpg && \ | |
| echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
| "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && | |
| apt-get update && apt-get install -y docker.io docker-buildx-plugin | |
| docker --version | |
| - name: Docker login to NGC | |
| # $oauthtoken is the literal NGC username; pipe the NGC API key via stdin | |
| run: echo "${NGC_API_KEY}" | docker login nvcr.io -u '$oauthtoken' --password-stdin | |
| - name: Build & push image to NGC | |
| run: | | |
| chmod +x ./docker/push_to_ngc* || true | |
| ./docker/push_to_ngc.sh -p | |
| - name: Build & push image to NGC (GR00T Image) | |
| run: | | |
| chmod +x ./docker/push_to_ngc* || true | |
| ./docker/push_to_ngc.sh -p -g -t cuda_gr00t |