-
Notifications
You must be signed in to change notification settings - Fork 32
231 lines (187 loc) · 6.69 KB
/
ci.yml
File metadata and controls
231 lines (187 loc) · 6.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# Copyright (c) 2025-2026, 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/action@v3.0.1
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: |
/isaac-sim/python.sh -m 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/
- 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/
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_gn16
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_gr00t/tests/
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
- name: Checkout Code
uses: actions/checkout@v4
# Build docs for the current branch (validates PR changes)
- name: Build docs
working-directory: ./docs
run: |
pip3 install -r requirements.txt
make SPHINXOPTS=-W html
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_gn16