-
Notifications
You must be signed in to change notification settings - Fork 110
227 lines (217 loc) · 9.32 KB
/
Copy pathci.yml
File metadata and controls
227 lines (217 loc) · 9.32 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
name: CI
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "LICENSE"
- ".github/CODEOWNERS"
- ".github/ISSUE_TEMPLATE/**"
- ".github/pull_request_template.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
env:
UV_FROZEN: "1"
jobs:
ruff-lint:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
timeout-minutes: 5
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
- name: Install dependencies(only dev group)
run: uv sync --only-group dev
- name: Check
run: uv run --no-sync ruff check --output-format=github .
ruff-format:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
timeout-minutes: 5
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
- name: Install dependencies(only dev group)
run: uv sync --only-group dev
- name: Check
run: uv run --no-sync ruff format --check .
mypy:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
timeout-minutes: 10
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
- name: Install dependencies
run: |
uv sync \
--no-install-package torch \
--no-install-package nvidia-cublas-cu12 \
--no-install-package nvidia-cuda-cupti-cu12 \
--no-install-package nvidia-cuda-nvrtc-cu12 \
--no-install-package nvidia-cuda-runtime-cu12 \
--no-install-package nvidia-cudnn-cu12 \
--no-install-package nvidia-cufft-cu12 \
--no-install-package nvidia-cufile-cu12 \
--no-install-package nvidia-curand-cu12 \
--no-install-package nvidia-cusolver-cu12 \
--no-install-package nvidia-cusparse-cu12 \
--no-install-package nvidia-cusparselt-cu12 \
--no-install-package nvidia-nccl-cu12 \
--no-install-package nvidia-nvjitlink-cu12 \
--no-install-package nvidia-nvtx-cu12 \
--no-install-package triton
uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu
- name: Check
run: uv run --no-sync mypy src/unilab
pyright:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
timeout-minutes: 10
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
- name: Install dependencies
run: |
uv sync \
--no-install-package torch \
--no-install-package nvidia-cublas-cu12 \
--no-install-package nvidia-cuda-cupti-cu12 \
--no-install-package nvidia-cuda-nvrtc-cu12 \
--no-install-package nvidia-cuda-runtime-cu12 \
--no-install-package nvidia-cudnn-cu12 \
--no-install-package nvidia-cufft-cu12 \
--no-install-package nvidia-cufile-cu12 \
--no-install-package nvidia-curand-cu12 \
--no-install-package nvidia-cusolver-cu12 \
--no-install-package nvidia-cusparse-cu12 \
--no-install-package nvidia-cusparselt-cu12 \
--no-install-package nvidia-nccl-cu12 \
--no-install-package nvidia-nvjitlink-cu12 \
--no-install-package nvidia-nvtx-cu12 \
--no-install-package triton
uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu
- name: Check
run: uv run --no-sync pyright
benchmark-smoke:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
timeout-minutes: 10
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
python-version: '3.11'
- name: Install dependencies
run: |
uv sync --extra mujoco \
--no-install-package torch \
--no-install-package nvidia-cublas-cu12 \
--no-install-package nvidia-cuda-cupti-cu12 \
--no-install-package nvidia-cuda-nvrtc-cu12 \
--no-install-package nvidia-cuda-runtime-cu12 \
--no-install-package nvidia-cudnn-cu12 \
--no-install-package nvidia-cufft-cu12 \
--no-install-package nvidia-cufile-cu12 \
--no-install-package nvidia-curand-cu12 \
--no-install-package nvidia-cusolver-cu12 \
--no-install-package nvidia-cusparse-cu12 \
--no-install-package nvidia-cusparselt-cu12 \
--no-install-package nvidia-nccl-cu12 \
--no-install-package nvidia-nvjitlink-cu12 \
--no-install-package nvidia-nvtx-cu12 \
--no-install-package triton
uv pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu
- name: Benchmark entrypoint smoke test
run: uv run --no-sync python scripts/benchmark/smoke_test.py
test:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
# The merged manager-based suite needs ~20 min on ubuntu-slim; 15 min
# cancels the step at ~60%.
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-slim]
# python-version: ['3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
# python-version: ${{ matrix.python-version }}
python-version: '3.11'
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libwayland-client0
- name: Install dependencies
run: |
uv sync --extra mujoco --extra motrix \
--no-install-package torch \
--no-install-package nvidia-cublas-cu12 \
--no-install-package nvidia-cuda-cupti-cu12 \
--no-install-package nvidia-cuda-nvrtc-cu12 \
--no-install-package nvidia-cuda-runtime-cu12 \
--no-install-package nvidia-cudnn-cu12 \
--no-install-package nvidia-cufft-cu12 \
--no-install-package nvidia-cufile-cu12 \
--no-install-package nvidia-curand-cu12 \
--no-install-package nvidia-cusolver-cu12 \
--no-install-package nvidia-cusparse-cu12 \
--no-install-package nvidia-cusparselt-cu12 \
--no-install-package nvidia-nccl-cu12 \
--no-install-package nvidia-nvjitlink-cu12 \
--no-install-package nvidia-nvtx-cu12 \
--no-install-package triton
uv pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu
- name: Cache robot assets
uses: actions/cache@v4.2.3
with:
path: src/unilab/assets/robots
key: ${{ runner.os }}-robot-assets-v1-${{ hashFiles('src/unilab/assets/hub.py') }}
- name: Keep git-tracked assets at the checked-out commit
# The robots cache persists HF-downloaded meshes across runs, but it
# also snapshots git-tracked scene XMLs and would silently roll them
# back to the cached revision. Restore tracked files from the index;
# untracked downloads stay untouched.
run: git restore --worktree -- src/unilab/assets/robots
- name: Pull robot assets
run: uv run --no-sync unilab-pull-assets --robot all
- name: Test with coverage
run: uv run --no-sync pytest -m "not slow" --cov=src/unilab --cov-report "markdown-append:${GITHUB_STEP_SUMMARY:-/dev/null}" --cov-fail-under=25