-
Notifications
You must be signed in to change notification settings - Fork 542
710 lines (634 loc) · 24.4 KB
/
Copy pathci.yml
File metadata and controls
710 lines (634 loc) · 24.4 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
workflow_dispatch:
push:
tags:
- v*
branches:
- main
- release-*
schedule: # Schedule workflow only runs on the default branch
- cron: "45 9 * * *"
env:
PYTHONFAULTHANDLER: "1" # Dump tracebacks on fatal signals (SIGSEGV, SIGABRT, etc.)
jobs:
build-warp:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- os: windows-2025
platform: windows
cuda-version: "12.9.1"
artifact-name: build-artifact-windows-cuda12
cuda-sub-packages: '["cudart", "nvcc", "nvrtc_dev", "nvjitlink"]'
cuda-non-cuda-packages: ''
- os: windows-2025
platform: windows
cuda-version: "13.0.2"
artifact-name: build-artifact-windows-cuda13
cuda-sub-packages: '["cudart", "crt", "nvcc", "nvrtc_dev", "nvjitlink", "nvvm", "nvptxcompiler"]'
cuda-non-cuda-packages: ''
- os: ubuntu-24.04
platform: ubuntu-x86_64
cuda-version: "12.9.1"
artifact-name: build-artifact-ubuntu-x86_64-cuda12
cuda-sub-packages: '["cudart-dev", "nvcc", "nvrtc-dev"]'
cuda-non-cuda-packages: '["libnvjitlink-dev"]'
- os: ubuntu-24.04
platform: ubuntu-x86_64
cuda-version: "13.0.2"
artifact-name: build-artifact-ubuntu-x86_64-cuda13
cuda-sub-packages: '["cudart-dev", "nvcc", "nvrtc-dev"]'
cuda-non-cuda-packages: '["libnvjitlink-dev"]'
- os: ubuntu-24.04-arm
platform: ubuntu-aarch64
cuda-version: "12.9.1"
artifact-name: build-artifact-ubuntu-aarch64-cuda12
cuda-sub-packages: '["cudart-dev", "nvcc", "nvrtc-dev"]'
cuda-non-cuda-packages: '["libnvjitlink-dev"]'
- os: ubuntu-24.04-arm
platform: ubuntu-aarch64
cuda-version: "13.0.2"
artifact-name: build-artifact-ubuntu-aarch64-cuda13
cuda-sub-packages: '["cudart-dev", "nvcc", "nvrtc-dev"]'
cuda-non-cuda-packages: '["libnvjitlink-dev"]'
- os: macos-latest
platform: macos
cuda-version: ''
artifact-name: build-artifact-macos
cuda-sub-packages: ''
cuda-non-cuda-packages: ''
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Cache build artifacts
if: matrix.platform != 'macos'
uses: actions/cache@v4
id: cache-build
with:
path: warp/bin/
key: build-${{ matrix.artifact-name }}-${{ matrix.cuda-version }}-${{ hashFiles('build_lib.py', 'warp/build_dll.py', 'build_llvm.py', 'warp/native/**/*.cpp', 'warp/native/**/*.cu', 'warp/native/**/*.h', 'deps/libmathdx-deps.packman.xml') }}
- name: Install CTK (with non-CUDA packages)
if: steps.cache-build.outputs.cache-hit != 'true' && matrix.cuda-sub-packages != '' && matrix.cuda-non-cuda-packages != ''
uses: Jimver/cuda-toolkit@3d45d157f327c09c04b50ee6ccdea2d9d017ec76 # v0.2.35
with:
cuda: ${{ matrix.cuda-version }}
sub-packages: ${{ matrix.cuda-sub-packages }}
non-cuda-sub-packages: ${{ matrix.cuda-non-cuda-packages }}
method: 'network'
- name: Install CTK (without non-CUDA packages)
if: steps.cache-build.outputs.cache-hit != 'true' && matrix.cuda-sub-packages != '' && matrix.cuda-non-cuda-packages == ''
uses: Jimver/cuda-toolkit@3d45d157f327c09c04b50ee6ccdea2d9d017ec76 # v0.2.35
with:
cuda: ${{ matrix.cuda-version }}
sub-packages: ${{ matrix.cuda-sub-packages }}
method: 'network'
- name: Build Warp
if: steps.cache-build.outputs.cache-hit != 'true'
run: uv run build_lib.py
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: warp/bin/
retention-days: ${{ github.repository == 'NVIDIA/warp' && 7 || 1 }}
test-warp-cpu:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ${{ matrix.os }}
needs: build-warp
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- os: windows-2025
platform: windows
artifact-name: build-artifact-windows-cuda12
- os: ubuntu-24.04
platform: ubuntu-x86_64
artifact-name: build-artifact-ubuntu-x86_64-cuda13
- os: ubuntu-24.04-arm
platform: ubuntu-aarch64
artifact-name: build-artifact-ubuntu-aarch64-cuda13
- os: macos-latest
platform: macos
artifact-name: build-artifact-macos
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: warp/bin/
- name: Run Tests
run: uv run --extra dev -m warp.tests --junit-report-xml rspec.xml -s autodetect
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "rspec.xml"
show: "fail"
if: always()
test-warp-debug:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ubuntu-24.04
needs: build-warp
permissions:
contents: read
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact-ubuntu-x86_64-cuda13
path: warp/bin/
- name: Run Debug Mode Tests (CPU)
run: uv run --extra dev -m warp.tests --junit-report-xml rspec.xml --suite debug --warp-debug --failfast
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "rspec.xml"
show: "fail"
if: always()
# Compute whether the changes on a pull-request/* branch touch files relevant
# to GPU testing or to doctest. Always runs (cheap). Downstream jobs read the
# outputs to decide whether to run on PR branches; non-PR events (schedule,
# workflow_dispatch, push to main / release-* / tag) bypass these outputs via
# the dependent jobs' own `if:` blocks.
gpu-changes:
if: github.repository == 'NVIDIA/warp'
runs-on: ubuntu-latest
# Stay green for dependents on failure; combined with the `|| 'true'` fallback
# on the outputs below, this keeps PR-style branches from silently skipping
# GPU testing or doctest when the filter has a transient error.
continue-on-error: true
permissions:
contents: read
outputs:
gpu_relevant: ${{ steps.filter-gpu.outputs.any_changed || 'true' }}
docs_relevant: ${{ steps.filter-docs.outputs.any_changed || 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch main for diff base
run: git fetch --depth=1 origin main
- name: Detect GPU-relevant changes
id: filter-gpu
uses: step-security/changed-files@2e07db73e5ccdb319b9a6c7766bd46d39d304bad # v47.0.5
with:
base_sha: origin/main
files: |
.github/workflows/ci.yml
.python-version
warp/**
pyproject.toml
tools/**
deps/*
build_lib.py
build_llvm.py
uv.lock
- name: Detect doctest-relevant changes
id: filter-docs
uses: step-security/changed-files@2e07db73e5ccdb319b9a6c7766bd46d39d304bad # v47.0.5
with:
base_sha: origin/main
files: docs/**
test-warp-gpu-linux:
runs-on: ${{ matrix.runner-label }}
needs: [build-warp, gpu-changes]
if: |
github.repository == 'NVIDIA/warp' && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
startsWith(github.ref, 'refs/tags/') ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release-') ||
needs.gpu-changes.outputs.gpu_relevant == 'true'
)
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- runner-label: linux-amd64-gpu-h100-latest-1
gpu-name: h100
artifact-name: build-artifact-ubuntu-x86_64-cuda13
torch-extra: torch-cu13
jax-extra: jax[cuda13]
- runner-label: linux-amd64-gpu-rtxpro6000-latest-1
gpu-name: rtxpro6000
artifact-name: build-artifact-ubuntu-x86_64-cuda13
torch-extra: torch-cu13
jax-extra: jax[cuda13]
- runner-label: linux-amd64-gpu-l4-earliest-1
gpu-name: l4
artifact-name: build-artifact-ubuntu-x86_64-cuda12
torch-extra: torch-cu12
jax-extra: jax[cuda12]
container:
image: ubuntu:24.04
options: -u root --security-opt seccomp=unconfined --shm-size 16g
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
timeout-minutes: 45
steps:
- name: Display GPU information
run: nvidia-smi
- name: Setup proxy cache
uses: nv-gha-runners/setup-proxy-cache@main
with:
enable-apt: true
- name: Install system dependencies
# curl and gpg are required by codecov/codecov-action@v6 to download and verify the uploader.
run: |
apt-get update
apt-get install -y git git-lfs curl gpg
git lfs install
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: warp/bin/
- name: Run Tests
run: uv run --extra dev --extra ${{ matrix.torch-extra }} --with "${{ matrix.jax-extra }}" -m warp.tests --junit-report-xml rspec.xml --coverage --coverage-xml coverage.xml -s autodetect
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "rspec.xml"
show: "fail"
if: always()
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
continue-on-error: true # codecov upload is best-effort; do not fail the job on upload errors.
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
disable_search: true
files: ./rspec.xml
report_type: test_results
flags: test-warp-gpu-linux-${{ matrix.gpu-name }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
if: ${{ !cancelled() }}
continue-on-error: true # codecov upload is best-effort; do not fail the job on upload errors.
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
disable_search: true
files: ./coverage.xml
flags: test-warp-gpu-linux-${{ matrix.gpu-name }}
token: ${{ secrets.CODECOV_TOKEN }}
test-warp-gpu-linux-mgpu-python310:
runs-on: linux-amd64-gpu-rtxpro6000-latest-2
needs: [build-warp, gpu-changes]
if: |
github.repository == 'NVIDIA/warp' && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
startsWith(github.ref, 'refs/tags/') ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release-') ||
needs.gpu-changes.outputs.gpu_relevant == 'true'
)
permissions:
contents: read
container:
image: ubuntu:24.04
options: -u root --security-opt seccomp=unconfined --shm-size 16g
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
env:
UV_PYTHON: "3.10"
timeout-minutes: 60
steps:
- name: Display GPU information
run: nvidia-smi
- name: Setup proxy cache
uses: nv-gha-runners/setup-proxy-cache@main
with:
enable-apt: true
- name: Install system dependencies
# curl and gpg are required by codecov/codecov-action@v6 to download and verify the uploader.
run: |
apt-get update
apt-get install -y git git-lfs curl gpg
git lfs install
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact-ubuntu-x86_64-cuda13
path: warp/bin/
- name: Run Tests
run: uv run --extra dev --extra torch-cu13 --with "jax[cuda13]" -m warp.tests --junit-report-xml rspec.xml --coverage --coverage-xml coverage.xml -s autodetect
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "rspec.xml"
show: "fail"
if: always()
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
continue-on-error: true # codecov upload is best-effort; do not fail the job on upload errors.
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
disable_search: true
files: ./rspec.xml
report_type: test_results
flags: test-warp-gpu-linux-mgpu-python310
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
if: ${{ !cancelled() }}
continue-on-error: true # codecov upload is best-effort; do not fail the job on upload errors.
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
disable_search: true
files: ./coverage.xml
flags: test-warp-gpu-linux-mgpu-python310
token: ${{ secrets.CODECOV_TOKEN }}
test-warp-gpu-windows:
runs-on: windows-amd64-gpu-rtxpro6000-latest-1
needs: [build-warp, gpu-changes]
if: |
github.repository == 'NVIDIA/warp' && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
startsWith(github.ref, 'refs/tags/') ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release-') ||
needs.gpu-changes.outputs.gpu_relevant == 'true'
)
permissions:
contents: read
timeout-minutes: 45
steps:
- name: Display GPU information
run: nvidia-smi
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact-windows-cuda13
path: warp/bin/
- name: Run Tests
# Pin usd-core to 25.5.1 to work around a frequent loading crash on Windows.
run: uv run --extra dev --extra torch-cu13 --with usd-core==25.5.1 -m warp.tests --junit-report-xml rspec.xml --coverage --coverage-xml coverage.xml -s autodetect
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "rspec.xml"
show: "fail"
if: always()
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
continue-on-error: true # codecov upload is best-effort; do not fail the job on upload errors.
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
disable_search: true
files: ./rspec.xml
report_type: test_results
flags: test-warp-gpu-windows-rtxpro6000
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
if: ${{ !cancelled() }}
continue-on-error: true # codecov upload is best-effort; do not fail the job on upload errors.
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
disable_search: true
files: ./coverage.xml
flags: test-warp-gpu-windows-rtxpro6000
token: ${{ secrets.CODECOV_TOKEN }}
# Validate Sphinx doctests (RST testcode blocks and autodoc-extracted docstrings)
# against a real GPU. PR-style branches gate on the same filter as the GPU test
# rows, plus a docs/** filter for RST-only doctest changes.
test-warp-doctest:
runs-on: linux-amd64-gpu-l4-latest-1
needs: [build-warp, gpu-changes]
if: |
github.repository == 'NVIDIA/warp' && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
startsWith(github.ref, 'refs/tags/') ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release-') ||
needs.gpu-changes.outputs.gpu_relevant == 'true' ||
needs.gpu-changes.outputs.docs_relevant == 'true'
)
container:
image: ubuntu:24.04
options: -u root --security-opt seccomp=unconfined --shm-size 16g
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
permissions:
contents: read
timeout-minutes: 30
steps:
- name: Display GPU information
run: nvidia-smi
- name: Setup proxy cache
uses: nv-gha-runners/setup-proxy-cache@main
with:
enable-apt: true
- name: Install system dependencies
run: |
apt-get update
apt-get install -y git git-lfs
git lfs install
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Mark workspace as a safe git directory
# actions/checkout sets safe.directory in a temporary HOME that is
# discarded after the step. Subsequent steps that invoke git (here:
# build_docs.py invoking pre-commit) need their own persistent entry
# to avoid "dubious ownership" errors when the container runs as root.
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact-ubuntu-x86_64-cuda13
path: warp/bin/
- name: Run doctest
run: uv run --extra docs build_docs.py --doctest --no-html
build-docs:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ubuntu-latest
needs: build-warp
permissions:
contents: read
outputs:
artifact-url: ${{ steps.build-docs-output.outputs.artifact-url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Download Warp binaries
uses: actions/download-artifact@v4
with:
name: build-artifact-ubuntu-x86_64-cuda13
path: warp/bin/
- name: Build Sphinx documentation
run: |
uv run --extra docs build_docs.py
- name: Upload artifacts
uses: actions/upload-artifact@v4
id: build-docs-output
with:
name: build-docs-output
path: |
warp/__init__.pyi
docs/api_reference
docs/language_reference
retention-days: ${{ github.repository == 'NVIDIA/warp' && 7 || 1 }}
check-build-docs-output:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ubuntu-latest
needs: build-docs
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build_docs.py output
uses: actions/download-artifact@v4
with:
name: build-docs-output
path: .
- name: Check API reference docs
env:
ARTIFACT_URL: ${{ needs.build-docs.outputs.artifact-url }}
run: >
git diff --exit-code docs/api_reference docs/language_reference ||
(echo "Please run build_docs.py (or download from $ARTIFACT_URL) and add docs/api_reference and docs/language_reference to your pull request." && false)
check-unnamespaced-symbols:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ubuntu-latest
needs: build-warp
permissions:
contents: read
steps:
- name: Download Warp build artifact
uses: actions/download-artifact@v4
with:
name: build-artifact-ubuntu-x86_64-cuda13
path: warp/bin/
- name: Check for un-namespaced symbols
run: |
echo "Checking for un-namespaced symbols..."
LIBRARIES_TO_CHECK="warp/bin/warp.so warp/bin/warp-clang.so"
found_symbols=""
for lib in $LIBRARIES_TO_CHECK; do
echo "--> Checking $lib"
if [ ! -f "$lib" ]; then
echo "ERROR: $lib not found"
found_symbols="true"
continue
fi
output=$(readelf -Ws "$lib" | awk '$7 ~ /^[0-9]+$/ && $8 !~ /^(_?wp_|PyInit__warp_)/ {print $8}' | grep -Ev '^(_Z|__|\.)' || true)
if [ -n "$output" ]; then
echo "ERROR: Found un-namespaced symbols in $lib:"
echo "$output"
found_symbols="true"
fi
done
if [ -n "$found_symbols" ]; then
echo "FAIL: Un-namespaced symbols detected. Please prefix them with 'wp_' or '_wp_'."
exit 1
fi
echo "SUCCESS: All symbols are correctly namespaced."
# Validate that the type stub file (warp/__init__.pyi) passes static type checking.
type-check-stubs:
if: github.event_name != 'schedule' || github.repository == 'NVIDIA/warp'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
- name: Set up Python
run: uv python install
- name: Run pyright on stub file
run: uvx pyright warp/__init__.pyi
- name: Run mypy on stub file
run: uvx mypy warp/__init__.pyi --follow-imports=silent