Repository navigation
799 lines (723 loc) · 38.9 KB
/
Copy pathbuild-wheel.yml
File metadata and controls
799 lines (723 loc) · 38.9 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
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
on:
workflow_call:
inputs:
host-platform:
required: true
type: string
workplan:
description: JSON workplan.
required: true
type: string
single-cuda-major:
description: "Build wheels for only the current CUDA major; skip the prior-major build and wheel merge"
required: false
type: boolean
default: false
defaults:
run:
shell: bash --noprofile --norc -xeuo pipefail {0}
permissions:
actions: read
contents: read # This is required for actions/checkout
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(inputs.workplan).jobs.wheel_python_versions[inputs.host-platform] }}
name: py${{ matrix.python-version }}
runs-on: ${{ (inputs.host-platform == 'linux-64' && 'linux-amd64-cpu8') ||
(inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') ||
(inputs.host-platform == 'win-64' && 'windows-2022') ||
(inputs.host-platform == 'win-arm64' && 'windows-11-arm') }}
steps:
- name: Harden OS certificate trust (eMudhra/emSign CA stopgap)
uses: $/.github/actions/upgrade-ca-certificates
- name: Enable Git symlinks (Windows, must precede checkout)
if: ${{ startsWith(inputs.host-platform, 'win') }}
run: git config --global core.symlinks true
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Treeless clone: setuptools-scm needs the commit graph (`git describe`)
# but not historical blobs.
fetch-depth: 0
filter: blob:none
# Fetch CCCL separately: checkout's filter does not apply to submodules.
submodules: false
- name: Checkout CCCL submodule
run: |
git submodule sync --recursive
git submodule update --init --force --depth=1 --filter=blob:none --recursive
- name: Register problem matchers
# Compiler and Cython errors from the wheel builds become annotations
# on the job page. Linux builds run inside a container, so their
# paths do not map onto the checkout and those annotations stay at
# the job level instead of linking into the diff.
run: echo "::add-matcher::.github/matchers/compiler.json"
- name: Setup proxy cache
uses: nv-gha-runners/setup-proxy-cache@main
continue-on-error: true
# Skip cache on GitHub-hosted Windows runners.
if: ${{ !startsWith(inputs.host-platform, 'win') }}
with:
enable-apt: true
- name: Set up Python
id: host-python
uses: ./.github/actions/setup-hardened-python
with:
# Also installs cibuildwheel (via python-path below), so the action
# does not fall back on its own unchecked setup-python interpreter.
python-version: "3.12"
- name: Install CI tool dependencies
run: python -m pip install -e ./ci
- name: Set environment variables
env:
WORKPLAN: ${{ inputs.workplan }}
HOST_PLATFORM: ${{ inputs.host-platform }}
PY_VER: ${{ matrix.python-version }}
SHA: ${{ github.sha }}
run: python ci/tools/ci_env.py build
- name: Install rapidsai/sccache
if: ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') }}
uses: ./.github/actions/install-sccache
# The runner only exposes these values to actions, not to `run:` steps or
# the cibuildwheel container, so re-export them for sccache's GHA backend.
# xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
- name: Adding addtional GHA cache-related env vars
if: ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' }}
uses: actions/[email protected]
with:
script: |
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
- name: Set up MSVC
if: ${{ startsWith(inputs.host-platform, 'win') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true') }}
uses: step-security/msvc-dev-cmd@22c98154b708dbd743e6f27a933cf6ceba3305c4 # v1.13.1
with:
arch: ${{ (inputs.host-platform == 'win-arm64' && 'arm64') || 'x64' }}
- name: Dump environment
run: |
env
- name: Install twine
run: |
pip install twine
# To keep the build workflow simple, all matrix jobs will build a wheel for later use within this workflow.
- name: Build and check cuda.pathfinder wheel
if: ${{ env.BUILD_PATHFINDER == 'true' }}
run: |
pushd cuda_pathfinder
pip wheel -v --no-deps .
popd
- name: Download reusable cuda.pathfinder wheel
if: ${{ env.BUILD_PATHFINDER != 'true' && env.BASELINE_RUN_ID != '' }}
uses: $/.github/actions/download-artifact-retry
with:
name: cuda-pathfinder-wheel
path: cuda_pathfinder
github-token: ${{ github.token }}
run-id: ${{ env.BASELINE_RUN_ID }}
- name: List the cuda.pathfinder artifacts directory
if: ${{ env.BUILD_PATHFINDER == 'true' || env.BASELINE_RUN_ID != '' }}
run: |
if [[ "${{ inputs.host-platform }}" == win* ]]; then
export CHOWN=chown
else
export CHOWN="sudo chown"
fi
$CHOWN -R $(whoami) cuda_pathfinder/*.whl
ls -lahR cuda_pathfinder
# We only need/want a single pure python wheel, pick linux-64 index 0.
# This is what we will use for testing & releasing.
- name: Check cuda.pathfinder wheel
if: ${{ env.BUILD_PATHFINDER == 'true' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
run: |
twine check --strict cuda_pathfinder/*.whl
- name: Constrain builds to the local cuda.pathfinder wheel
if: ${{ env.BUILD_BINDINGS == 'true' }}
run: |
pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
mkdir -p wheel-constraints
if [[ "$PATHFINDER_SOURCE" == "artifact" ]]; then
if [[ "${#pathfinder_wheels[@]}" -ne 1 || ! -f "${pathfinder_wheels[0]}" ]]; then
echo "Expected exactly one cuda.pathfinder wheel" >&2
exit 1
fi
if [[ "${{ inputs.host-platform }}" == win* ]]; then
pathfinder_uri="file:///$(cygpath -am "${pathfinder_wheels[0]}")"
else
pathfinder_uri="file:///host$(realpath "${pathfinder_wheels[0]}")"
fi
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}" > wheel-constraints/cuda-bindings.txt
elif [[ "$PATHFINDER_SOURCE" == "published" ]]; then
: > wheel-constraints/cuda-bindings.txt
else
echo "Unknown cuda.pathfinder source: $PATHFINDER_SOURCE" >&2
exit 1
fi
cat wheel-constraints/cuda-bindings.txt
- name: Upload cuda.pathfinder build artifacts
if: ${{ (env.BUILD_PATHFINDER == 'true' || env.BASELINE_RUN_ID != '') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: cuda-pathfinder-wheel
path: cuda_pathfinder/*.whl
if-no-files-found: error
- name: Set up current mini CTK
if: ${{ env.BUILD_BINDINGS_CURRENT == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS_CURRENT == 'true' || env.TEST_CORE_CURRENT == 'true' }}
uses: ./.github/actions/fetch_ctk
continue-on-error: false
with:
host-platform: ${{ inputs.host-platform }}
cuda-version: ${{ env.CURRENT_CUDA_VERSION }}
- name: Build cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} wheel
if: ${{ env.BUILD_BINDINGS_CURRENT == 'true' }}
uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
with:
package-dir: ./${{ env.CURRENT_BINDINGS_ROOT }}/
output-dir: ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}
extras: uv
python-path: ${{ steps.host-python.outputs.python-path }}
env: &bindings-wheel-env
CIBW_BUILD: ${{ env.CIBW_BUILD }}
# build[uv]: same PEP 517 orchestration, with uv instead of pip.
# extras: uv puts uv on PATH (required on Windows).
CIBW_BUILD_FRONTEND: "build[uv]"
# CIBW mounts the host filesystem under /host
# Skip startup cache probes and back off on repeated cache errors (#3273).
CIBW_ENVIRONMENT_LINUX: >
CUDA_PATH=/host/${{ env.CUDA_PATH }}
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
UV_BUILD_CONSTRAINT=/host/${{ github.workspace }}/wheel-constraints/cuda-bindings.txt
UV_CONSTRAINT=/host/${{ github.workspace }}/wheel-constraints/cuda-bindings.txt
CC="/host/${{ env.SCCACHE_PATH }} cc"
CXX="/host/${{ env.SCCACHE_PATH }} c++"
SCCACHE_GHA_ENABLED=true
SCCACHE_PREPROCESSOR_CACHE_GHA_ENABLED=true
SCCACHE_SKIP_CACHE_CHECK=true
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT=5
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS=5
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
CIBW_ENVIRONMENT_WINDOWS: >
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
UV_BUILD_CONSTRAINT="$(cygpath -w ./wheel-constraints/cuda-bindings.txt)"
UV_CONSTRAINT="$(cygpath -w ./wheel-constraints/cuda-bindings.txt)"
# Dump sccache stats during repair; no dummy test stage.
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
"/host/${{ env.SCCACHE_PATH }}" --show-adv-stats &&
"/host/${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_bindings.json &&
auditwheel repair -w {dest_dir} {wheel}
- name: Report sccache stats (cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }})
if: ${{ env.BUILD_BINDINGS_CURRENT == 'true' && !startsWith(inputs.host-platform, 'win') }}
uses: ./.github/actions/sccache-summary
with:
json-file: sccache_bindings.json
label: "cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }}"
build-step: "Build cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} wheel"
- name: Download reusable cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} wheel
if: ${{ env.BUILD_BINDINGS_CURRENT != 'true' && env.BASELINE_RUN_ID != '' }}
uses: $/.github/actions/download-artifact-retry
with:
name: ${{ env.CURRENT_BINDINGS_ARTIFACT_BASENAME }}-${{ env.BASELINE_SHA }}
path: ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}
github-token: ${{ github.token }}
run-id: ${{ env.BASELINE_RUN_ID }}
- name: List the cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} artifacts directory
if: ${{ env.BUILD_BINDINGS_CURRENT == 'true' || env.BASELINE_RUN_ID != '' }}
run: |
if [[ "${{ inputs.host-platform }}" == win* ]]; then
export CHOWN=chown
else
export CHOWN="sudo chown"
fi
$CHOWN -R $(whoami) ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}
ls -lahR ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}
- name: Check cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} wheel
if: ${{ env.BUILD_BINDINGS_CURRENT == 'true' }}
run: |
twine check --strict ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}/*.whl
- name: Constrain cuda.core to the local cuda.bindings wheel
if: ${{ env.BUILD_CORE == 'true' }}
run: |
pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
bindings_wheels=("${CURRENT_BINDINGS_ARTIFACTS_DIR}"/cuda_bindings-"${CURRENT_CUDA_MAJOR}".*.whl)
test "${#pathfinder_wheels[@]}" -eq 1
test "${#bindings_wheels[@]}" -eq 1
test -f "${pathfinder_wheels[0]}"
test -f "${bindings_wheels[0]}"
mkdir -p wheel-constraints
if [[ "${{ inputs.host-platform }}" == win* ]]; then
pathfinder_uri="file:///$(cygpath -am "${pathfinder_wheels[0]}")"
bindings_uri="file:///$(cygpath -am "${bindings_wheels[0]}")"
else
pathfinder_uri="file:///host$(realpath "${pathfinder_wheels[0]}")"
bindings_uri="file:///host$(realpath "${bindings_wheels[0]}")"
fi
{
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}"
printf 'cuda-bindings @ %s\n' "${bindings_uri}"
} | tee wheel-constraints/cuda-core.txt
- name: Upload cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} build artifacts
if: ${{ env.BUILD_BINDINGS_CURRENT == 'true' || env.BASELINE_RUN_ID != '' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CURRENT_BINDINGS_ARTIFACT_NAME }}
path: ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}/*.whl
if-no-files-found: error
- name: Build cuda.core ${{ env.CURRENT_CUDA_VARIANT }} wheel
if: ${{ env.BUILD_CORE == 'true' }}
uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
with:
package-dir: ./cuda_core/
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
extras: uv
python-path: ${{ steps.host-python.outputs.python-path }}
env:
CIBW_BUILD: ${{ env.CIBW_BUILD }}
# See the cuda.bindings step above for UV_* vs PIP_*.
CIBW_BUILD_FRONTEND: "build[uv]"
# CIBW mounts the host filesystem under /host
# Skip startup cache probes and back off on repeated cache errors (#3273).
CIBW_ENVIRONMENT_LINUX: >
CUDA_PATH=/host/${{ env.CUDA_PATH }}
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
CUDA_CORE_BUILD_MAJOR=${{ env.CURRENT_CUDA_MAJOR }}
CUDA_PYTHON_WERROR=1
UV_BUILD_CONSTRAINT=/host/${{ github.workspace }}/wheel-constraints/cuda-core.txt
UV_CONSTRAINT=/host/${{ github.workspace }}/wheel-constraints/cuda-core.txt
CC="/host/${{ env.SCCACHE_PATH }} cc"
CXX="/host/${{ env.SCCACHE_PATH }} c++"
SCCACHE_GHA_ENABLED=true
SCCACHE_PREPROCESSOR_CACHE_GHA_ENABLED=true
SCCACHE_SKIP_CACHE_CHECK=true
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT=5
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS=5
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
CIBW_ENVIRONMENT_WINDOWS: >
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
CUDA_CORE_BUILD_MAJOR=${{ env.CURRENT_CUDA_MAJOR }}
CUDA_PYTHON_WERROR=1
UV_BUILD_CONSTRAINT="$(cygpath -w ./wheel-constraints/cuda-core.txt)"
UV_CONSTRAINT="$(cygpath -w ./wheel-constraints/cuda-core.txt)"
# Dump sccache stats during repair; no dummy test stage.
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
"/host/${{ env.SCCACHE_PATH }}" --show-adv-stats &&
"/host/${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_core.json &&
auditwheel repair -w {dest_dir} {wheel}
- name: Report sccache stats (cuda.core)
if: ${{ env.BUILD_CORE == 'true' && !startsWith(inputs.host-platform, 'win') }}
uses: ./.github/actions/sccache-summary
with:
json-file: sccache_core.json
label: "cuda.core"
build-step: "Build cuda.core ${{ env.CURRENT_CUDA_VARIANT }} wheel"
- name: List the cuda.core artifacts directory and rename
if: ${{ env.BUILD_CORE == 'true' }}
run: |
if [[ "${{ inputs.host-platform }}" == win* ]]; then
export CHOWN=chown
else
export CHOWN="sudo chown"
fi
$CHOWN -R $(whoami) ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
# Rename wheel to include CUDA version suffix
mkdir -p "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${CURRENT_CUDA_MAJOR}"
for wheel in ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl; do
if [[ -f "${wheel}" ]]; then
base_name=$(basename "${wheel}" .whl)
new_name="${base_name}.cu${CURRENT_CUDA_MAJOR}.whl"
mv "${wheel}" "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${CURRENT_CUDA_MAJOR}/${new_name}"
echo "Renamed wheel to: ${new_name}"
fi
done
ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
- name: Download reusable cuda.core wheel
if: ${{ env.BUILD_CORE != 'true' && env.BASELINE_RUN_ID != '' }}
uses: $/.github/actions/download-artifact-retry
with:
name: ${{ env.CUDA_CORE_ARTIFACT_BASENAME }}-${{ env.BASELINE_SHA }}
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
github-token: ${{ github.token }}
run-id: ${{ env.BASELINE_RUN_ID }}
# We only need/want one copy of each pure Python wheel, so use linux-64 index 0.
- name: Build and check cuda-python ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_CUDA_PYTHON_MAINTENANCE == 'true' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
run: |
mkdir -p "cuda_python/dist/${MAINTENANCE_CUDA_VARIANT}"
pushd cuda_python
CUDA_PYTHON_BUILD_MAJOR="${MAINTENANCE_CUDA_MAJOR}" \
pip wheel -v --no-deps --wheel-dir "dist/${MAINTENANCE_CUDA_VARIANT}" .
twine check --strict "dist/${MAINTENANCE_CUDA_VARIANT}"/*.whl
popd
- name: Download reusable cuda-python ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_CUDA_PYTHON_MAINTENANCE != 'true' && env.BASELINE_RUN_ID != '' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
uses: $/.github/actions/download-artifact-retry
with:
name: ${{ env.MAINTENANCE_PYTHON_ARTIFACT_NAME }}
path: cuda_python/dist/${{ env.MAINTENANCE_CUDA_VARIANT }}
github-token: ${{ github.token }}
run-id: ${{ env.BASELINE_RUN_ID }}
- name: Upload cuda-python ${{ env.MAINTENANCE_CUDA_MAJOR }} build artifacts
if: ${{ !inputs.single-cuda-major && (env.BUILD_CUDA_PYTHON_MAINTENANCE == 'true' || env.BASELINE_RUN_ID != '') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.MAINTENANCE_PYTHON_ARTIFACT_NAME }}
path: cuda_python/dist/${{ env.MAINTENANCE_CUDA_VARIANT }}/*.whl
if-no-files-found: error
- name: Build and check cuda-python ${{ env.CURRENT_CUDA_MAJOR }} wheel
if: ${{ env.BUILD_CUDA_PYTHON_CURRENT == 'true' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
run: |
mkdir -p "cuda_python/dist/${CURRENT_CUDA_VARIANT}"
pushd cuda_python
CUDA_PYTHON_BUILD_MAJOR="${CURRENT_CUDA_MAJOR}" \
pip wheel -v --no-deps --wheel-dir "dist/${CURRENT_CUDA_VARIANT}" .
twine check --strict "dist/${CURRENT_CUDA_VARIANT}"/*.whl
popd
- name: Download reusable cuda-python ${{ env.CURRENT_CUDA_MAJOR }} wheel
if: ${{ env.BUILD_CUDA_PYTHON_CURRENT != 'true' && env.BASELINE_RUN_ID != '' && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
uses: $/.github/actions/download-artifact-retry
with:
name: ${{ env.CURRENT_PYTHON_ARTIFACT_NAME }}
path: cuda_python/dist/${{ env.CURRENT_CUDA_VARIANT }}
github-token: ${{ github.token }}
run-id: ${{ env.BASELINE_RUN_ID }}
- name: Upload cuda-python ${{ env.CURRENT_CUDA_MAJOR }} build artifacts
if: ${{ (env.BUILD_CUDA_PYTHON_CURRENT == 'true' || env.BASELINE_RUN_ID != '') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CURRENT_PYTHON_ARTIFACT_NAME }}
path: cuda_python/dist/${{ env.CURRENT_CUDA_VARIANT }}/*.whl
if-no-files-found: error
- name: List the cuda-python artifacts directories
if: ${{ (env.BUILD_CUDA_PYTHON == 'true' || env.BASELINE_RUN_ID != '') && strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
run: |
ls -lahR cuda_python/dist
- name: Set up Python
if: ${{ env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' }}
uses: ./.github/actions/setup-hardened-python
with:
python-version: ${{ matrix.python-version }}
- name: verify free-threaded build
if: ${{ (env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true') && endsWith(matrix.python-version, 't') }}
run: python -c 'import sys; assert not sys._is_gil_enabled()'
- name: Set up Python include paths
if: ${{ env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' }}
run: |
include="$(python -c "import sysconfig; print(sysconfig.get_paths()['include'])")"
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
echo "CPLUS_INCLUDE_PATH=${include}" >> $GITHUB_ENV
elif [[ "${{ inputs.host-platform }}" == win* ]]; then
echo "CL=/I\"${include}\"" >> $GITHUB_ENV
fi
# For caching
echo "PY_EXT_SUFFIX=$(python -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))")" >> $GITHUB_ENV
- name: Install cuda.pathfinder (required for next step)
if: ${{ env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true' }}
run: |
pathfinder_wheels=(cuda_pathfinder/*.whl)
if [[ "$PATHFINDER_SOURCE" == "artifact" ]]; then
if [[ "${#pathfinder_wheels[@]}" -ne 1 || ! -f "${pathfinder_wheels[0]}" ]]; then
echo "Expected exactly one cuda.pathfinder wheel" >&2
exit 1
fi
pip install "${pathfinder_wheels[0]}"
elif [[ "$PATHFINDER_SOURCE" == "published" ]]; then
pip install cuda-pathfinder
else
echo "Unknown cuda.pathfinder source: $PATHFINDER_SOURCE" >&2
exit 1
fi
- name: Hide GNU link.exe so Meson finds MSVC link.exe
if: ${{ startsWith(inputs.host-platform, 'win') && (env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true') }}
run: |
if [ -f "/c/Program Files/Git/usr/bin/link.exe" ]; then
mv "/c/Program Files/Git/usr/bin/link.exe" "/c/Program Files/Git/usr/bin/link.exe.bak"
fi
- name: Build cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} Cython tests
if: ${{ env.TEST_BINDINGS_CURRENT == 'true' }}
run: |
bindings_wheels=(${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}/*.whl)
test "${#bindings_wheels[@]}" -eq 1
test -f "${bindings_wheels[0]}"
python -m pip install "${bindings_wheels[0]}" --group "${CURRENT_BINDINGS_ROOT}/pyproject.toml:test"
pushd ${{ env.CURRENT_BINDINGS_CYTHON_TESTS_DIR }}
bash build_tests.sh
popd
- name: Upload cuda.bindings ${{ env.CURRENT_CUDA_MAJOR }} Cython tests
if: ${{ env.TEST_BINDINGS_CURRENT == 'true' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CURRENT_BINDINGS_ARTIFACT_NAME }}-tests
path: ${{ env.CURRENT_BINDINGS_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
if-no-files-found: error
- name: Build cuda.core ${{ env.CURRENT_CUDA_VARIANT }} Cython tests
if: ${{ env.TEST_CORE_CURRENT == 'true' }}
run: |
pip install ${{ env.CURRENT_BINDINGS_ARTIFACTS_DIR }}/*.whl
if ${{ env.BUILD_CORE == 'true' }}; then
core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${CURRENT_CUDA_MAJOR}" -maxdepth 1 -type f -name '*.whl' -print -quit)
else
core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" -maxdepth 1 -type f -name '*.whl' -print -quit)
fi
if [[ -z "${core_wheel}" ]]; then
echo "No cuda.core wheel found" >&2
exit 1
fi
pip install "${core_wheel}" --group ./cuda_core/pyproject.toml:test
pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
bash build_tests.sh
popd
- name: Upload current cuda.core Cython tests
if: ${{ env.TEST_CORE_CURRENT == 'true' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-${{ env.CURRENT_CUDA_VARIANT }}-tests
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
if-no-files-found: error
# Note: This overwrites CUDA_PATH etc.
- name: Set up maintenance mini CTK
if: ${{ !inputs.single-cuda-major && (env.BUILD_BINDINGS_MAINTENANCE == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS_MAINTENANCE == 'true' || env.TEST_CORE_MAINTENANCE == 'true') }}
uses: ./.github/actions/fetch_ctk
continue-on-error: false
with:
host-platform: ${{ inputs.host-platform }}
cuda-version: ${{ env.MAINTENANCE_CUDA_VERSION }}
cuda-path: "./cuda_toolkit_prev"
- name: Build cuda.core test binaries
if: ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }}
run: |
nvcc --version
python "${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/build_test_binaries.py"
- name: Upload cuda.core test binaries
if: ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
path: |
${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.o
${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.a
${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.lib
if-no-files-found: error
- name: Build cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_BINDINGS_MAINTENANCE == 'true' }}
uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
with:
package-dir: ./${{ env.MAINTENANCE_BINDINGS_ROOT }}/
output-dir: ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}
extras: uv
python-path: ${{ steps.host-python.outputs.python-path }}
env: *bindings-wheel-env
- name: Report sccache stats (cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }})
if: ${{ !inputs.single-cuda-major && env.BUILD_BINDINGS_MAINTENANCE == 'true' && !startsWith(inputs.host-platform, 'win') }}
uses: ./.github/actions/sccache-summary
with:
json-file: sccache_bindings.json
label: "cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }}"
build-step: "Build cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel"
- name: Download reusable cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_BINDINGS_MAINTENANCE != 'true' && env.BASELINE_RUN_ID != '' }}
uses: $/.github/actions/download-artifact-retry
with:
name: ${{ env.MAINTENANCE_BINDINGS_ARTIFACT_BASENAME }}-${{ env.BASELINE_SHA }}
path: ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}
github-token: ${{ github.token }}
run-id: ${{ env.BASELINE_RUN_ID }}
- name: List the cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} artifacts directory
if: ${{ !inputs.single-cuda-major && (env.BUILD_BINDINGS_MAINTENANCE == 'true' || env.BASELINE_RUN_ID != '') }}
run: |
if [[ "${{ inputs.host-platform }}" == win* ]]; then
export CHOWN=chown
else
export CHOWN="sudo chown"
fi
$CHOWN -R $(whoami) ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}
ls -lahR ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}
- name: Check cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_BINDINGS_MAINTENANCE == 'true' }}
run: twine check --strict ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl
- name: Upload cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} build artifacts
if: ${{ !inputs.single-cuda-major && (env.BUILD_BINDINGS_MAINTENANCE == 'true' || env.BASELINE_RUN_ID != '') }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.MAINTENANCE_BINDINGS_ARTIFACT_NAME }}
path: ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl
if-no-files-found: error
- name: Build cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} Cython tests
if: ${{ !inputs.single-cuda-major && env.TEST_BINDINGS_MAINTENANCE == 'true' }}
run: |
pip uninstall -y cuda-bindings
bindings_wheels=(${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl)
test "${#bindings_wheels[@]}" -eq 1
test -f "${bindings_wheels[0]}"
python -m pip install "${bindings_wheels[0]}" --group "${MAINTENANCE_BINDINGS_ROOT}/pyproject.toml:test"
pushd ${{ env.MAINTENANCE_BINDINGS_CYTHON_TESTS_DIR }}
bash build_tests.sh
popd
- name: Upload cuda.bindings ${{ env.MAINTENANCE_CUDA_MAJOR }} Cython tests
if: ${{ !inputs.single-cuda-major && env.TEST_BINDINGS_MAINTENANCE == 'true' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.MAINTENANCE_BINDINGS_ARTIFACT_NAME }}-tests
path: ${{ env.MAINTENANCE_BINDINGS_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
if-no-files-found: error
- name: Constrain maintenance cuda.core to the local cuda.bindings wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
run: |
pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl)
bindings_wheels=("${MAINTENANCE_BINDINGS_ARTIFACTS_DIR}"/cuda_bindings-"${MAINTENANCE_CUDA_MAJOR}".*.whl)
test "${#pathfinder_wheels[@]}" -eq 1
test "${#bindings_wheels[@]}" -eq 1
test -f "${pathfinder_wheels[0]}"
test -f "${bindings_wheels[0]}"
mkdir -p wheel-constraints
if [[ "${{ inputs.host-platform }}" == win* ]]; then
pathfinder_uri="file:///$(cygpath -am "${pathfinder_wheels[0]}")"
bindings_uri="file:///$(cygpath -am "${bindings_wheels[0]}")"
else
pathfinder_uri="file:///host$(realpath "${pathfinder_wheels[0]}")"
bindings_uri="file:///host$(realpath "${bindings_wheels[0]}")"
fi
{
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}"
printf 'cuda-bindings @ %s\n' "${bindings_uri}"
} | tee wheel-constraints/cuda-core-maintenance.txt
- name: Build cuda.core ${{ env.MAINTENANCE_CUDA_VARIANT }} wheel
if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
with:
package-dir: ./cuda_core/
output-dir: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
extras: uv
python-path: ${{ steps.host-python.outputs.python-path }}
env:
CIBW_BUILD: ${{ env.CIBW_BUILD }}
# See the cuda.bindings step above for UV_* vs PIP_*.
CIBW_BUILD_FRONTEND: "build[uv]"
# CIBW mounts the host filesystem under /host
# Skip startup cache probes and back off on repeated cache errors (#3273).
CIBW_ENVIRONMENT_LINUX: >
CUDA_PATH=/host/${{ env.CUDA_PATH }}
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
CUDA_CORE_BUILD_MAJOR=${{ env.MAINTENANCE_CUDA_MAJOR }}
CUDA_PYTHON_WERROR=1
UV_BUILD_CONSTRAINT=/host/${{ github.workspace }}/wheel-constraints/cuda-core-maintenance.txt
UV_CONSTRAINT=/host/${{ github.workspace }}/wheel-constraints/cuda-core-maintenance.txt
CC="/host/${{ env.SCCACHE_PATH }} cc"
CXX="/host/${{ env.SCCACHE_PATH }} c++"
SCCACHE_GHA_ENABLED=true
SCCACHE_PREPROCESSOR_CACHE_GHA_ENABLED=true
SCCACHE_SKIP_CACHE_CHECK=true
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_COUNT=5
SCCACHE_CACHE_RATE_LIMIT_ON_ERROR_WINDOW_SIZE_SECS=5
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
CIBW_ENVIRONMENT_WINDOWS: >
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
CUDA_CORE_BUILD_MAJOR=${{ env.MAINTENANCE_CUDA_MAJOR }}
CUDA_PYTHON_WERROR=1
UV_BUILD_CONSTRAINT="$(cygpath -w ./wheel-constraints/cuda-core-maintenance.txt)"
UV_CONSTRAINT="$(cygpath -w ./wheel-constraints/cuda-core-maintenance.txt)"
# Dump sccache stats during repair; no dummy test stage.
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
"/host/${{ env.SCCACHE_PATH }}" --show-adv-stats &&
"/host/${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_core_maintenance.json &&
auditwheel repair -w {dest_dir} {wheel}
- name: Report sccache stats (maintenance cuda.core)
if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' && !startsWith(inputs.host-platform, 'win') }}
uses: ./.github/actions/sccache-summary
with:
json-file: sccache_core_maintenance.json
label: "cuda.core (maintenance CTK)"
build-step: "Build cuda.core ${{ env.MAINTENANCE_CUDA_VARIANT }} wheel"
- name: List the cuda.core artifacts directory and rename
if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
run: |
if [[ "${{ inputs.host-platform }}" == win* ]]; then
export CHOWN=chown
else
export CHOWN="sudo chown"
fi
$CHOWN -R $(whoami) ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
# Rename wheel to include CUDA version suffix
mkdir -p "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${MAINTENANCE_CUDA_MAJOR}"
for wheel in ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl; do
if [[ -f "${wheel}" ]]; then
base_name=$(basename "${wheel}" .whl)
new_name="${base_name}.cu${MAINTENANCE_CUDA_MAJOR}.whl"
mv "${wheel}" "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${MAINTENANCE_CUDA_MAJOR}/${new_name}"
echo "Renamed wheel to: ${new_name}"
fi
done
ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
- name: Build cuda.core ${{ env.MAINTENANCE_CUDA_VARIANT }} Cython tests
if: ${{ !inputs.single-cuda-major && env.TEST_CORE_MAINTENANCE == 'true' }}
run: |
# The current package's test extensions were built in this same source tree.
# Remove generated outputs so Cython and the compiler cannot reuse them.
find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}" -maxdepth 1 -type f \
\( -name 'test_*.cpp' -o -name 'test_*.so' -o -name 'test_*.pyd' \) -delete
if [[ -d "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" ]]; then
find "${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/build" -type f -delete
fi
pip uninstall -y cuda-bindings cuda-core
pip install ${{ env.MAINTENANCE_BINDINGS_ARTIFACTS_DIR }}/*.whl
if ${{ env.BUILD_CORE == 'true' }}; then
core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/cu${MAINTENANCE_CUDA_MAJOR}" -maxdepth 1 -type f -name '*.whl' -print -quit)
else
core_wheel=$(find "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" -maxdepth 1 -type f -name '*.whl' -print -quit)
fi
if [[ -z "${core_wheel}" ]]; then
echo "No cuda.core wheel found" >&2
exit 1
fi
pip install "${core_wheel}" --group ./cuda_core/pyproject.toml:test
pushd ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}
bash build_tests.sh
popd
- name: Upload maintenance cuda.core Cython tests
if: ${{ !inputs.single-cuda-major && env.TEST_CORE_MAINTENANCE == 'true' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-${{ env.MAINTENANCE_CUDA_VARIANT }}-tests
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
if-no-files-found: error
- name: Merge cuda.core wheels
if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
run: |
pip install wheel
python ci/tools/merge_cuda_core_wheels.py \
"${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${CURRENT_CUDA_MAJOR}"/cuda_core*.whl \
"${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${MAINTENANCE_CUDA_MAJOR}"/cuda_core*.whl \
--output-dir "${{ env.CUDA_CORE_ARTIFACTS_DIR }}"
- name: Finalize single-major cuda.core wheel
if: ${{ inputs.single-cuda-major && env.BUILD_CORE == 'true' }}
run: |
for wheel in "${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${CURRENT_CUDA_MAJOR}"/*.cu"${CURRENT_CUDA_MAJOR}".whl; do
base_name=$(basename "${wheel}" ".cu${CURRENT_CUDA_MAJOR}.whl")
mv "${wheel}" "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/${base_name}.whl"
done
ls -lahR "${{ env.CUDA_CORE_ARTIFACTS_DIR }}"
- name: Check cuda.core wheel
if: ${{ env.BUILD_CORE == 'true' }}
run: |
twine check --strict ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
- name: Upload cuda.core build artifacts
if: ${{ env.BUILD_CORE == 'true' || env.BASELINE_RUN_ID != '' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}
path: ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
if-no-files-found: error