-
Notifications
You must be signed in to change notification settings - Fork 222
550 lines (541 loc) · 21.3 KB
/
Copy pathbuild.yaml
File metadata and controls
550 lines (541 loc) · 21.3 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
# SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: build
on:
push:
branches:
- "main"
- "release/*"
tags:
- v[0-9][0-9].[0-9][0-9].[0-9][0-9]
workflow_dispatch:
inputs:
branch:
description: |
branch: git branch the workflow run targets.
Required even when 'sha' is provided because it is also used for organizing artifacts.
required: true
type: string
date:
description: "date: Date (YYYY-MM-DD) this run is for. Used to organize artifacts produced by nightly builds"
required: true
type: string
sha:
description: "sha: full git commit SHA to check out"
required: true
type: string
build_type:
description: "build_type: one of [branch, nightly, pull-request]"
type: string
default: nightly
# Triggering 'test.yaml' from inside 'build.yaml' allows the use of the 'needs:' mechanism
# to ensure tests only start runniing once the builds they need are complete.
trigger-tests:
description: |
If 'true', trigger the test workflow after all builds complete.
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.build_type || 'branch' }}
cancel-in-progress: true
permissions: {}
jobs:
build-details:
uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main
cpp-build:
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
needs: [build-details]
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/build_cpp.sh
python-build:
needs: [build-details, cpp-build]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/build_python.sh
# Build a conda package for each CUDA x ARCH x minimum supported Python version
matrix_filter: group_by({CUDA_VER, ARCH}) | map(min_by(.PY_VER | split(".") | map(tonumber)))
upload-conda:
needs: [cpp-build, python-build]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@main
secrets:
CONDA_RAPIDSAI_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_NIGHTLY_TOKEN }}
CONDA_RAPIDSAI_TOKEN: ${{ secrets.CONDA_RAPIDSAI_TOKEN }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-build-libcuopt:
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
needs: [build-details]
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel_libcuopt.sh
package-name: libcuopt
package-type: cpp
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
wheel-publish-libcuopt:
needs: wheel-build-libcuopt
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
secrets:
CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: libcuopt
package-type: cpp
publish-wheel-search-key: cuopt_wheel_cpp_libcuopt
wheel-build-cuopt:
needs: [build-details, wheel-build-libcuopt]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel_cuopt.sh
package-name: cuopt
package-type: python
# Build a wheel for each CUDA x ARCH x minimum supported Python version
matrix_filter: group_by({CUDA_VER, ARCH}) | map(min_by(.PY_VER | split(".") | map(tonumber)))
wheel-publish-cuopt:
needs: wheel-build-cuopt
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
secrets:
CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cuopt
package-type: python
publish-wheel-search-key: cuopt_wheel_python_cuopt_
wheel-build-cuopt-server:
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
needs: [build-details]
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel_cuopt_server.sh
package-name: cuopt_server
package-type: python
pure-wheel: true
# Only need 1 package per CUDA major version. This selects "ARCH=amd64 + the latest supported Python, 1 job per major CUDA version".
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
wheel-publish-cuopt-server:
needs: wheel-build-cuopt-server
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
secrets:
CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cuopt_server
package-type: python
publish-wheel-search-key: cuopt_wheel_python_cuopt-server
docs-build:
needs: [python-build]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
node_type: "gpu-l4-latest-1"
sha: ${{ inputs.sha }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
arch: "amd64"
file_to_upload: "docs/cuopt/build/html/"
artifact-name: "cuopt_docs"
container_image: "rapidsai/ci-conda:26.10-latest"
script: "ci/build_docs.sh"
wheel-build-cuopt-sh-client:
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
needs: [build-details]
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel_cuopt_sh_client.sh
package-name: cuopt_sh_client
package-type: python
append-cuda-suffix: false
pure-wheel: true
# only need 1 build (noarch package): this selects amd64, oldest-supported Python, latest-supported CUDA
matrix_filter: '[map(select(.ARCH == "amd64")) | min_by((.PY_VER | split(".") | map(tonumber)), (.CUDA_VER | split(".") | map(-tonumber)))]'
wheel-publish-cuopt-sh-client:
needs: wheel-build-cuopt-sh-client
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
secrets:
CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cuopt_sh_client
package-type: python
publish-wheel-search-key: cuopt_wheel_python_cuopt-sh-client
release-github:
# Attaches the built wheels to a GitHub Release on the version tag, so Kitmaker
# can pull them from a public Release URL (Kitmaker itself never reaches inside NVIDIA).
if: startsWith(github.ref, 'refs/tags/v')
needs:
- wheel-publish-libcuopt
- wheel-publish-cuopt
- wheel-publish-cuopt-server
- wheel-publish-cuopt-sh-client
permissions:
contents: write
runs-on: linux-amd64-cpu4
outputs:
release-tag: ${{ steps.release.outputs.tag }}
steps:
- name: Download built wheels
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: "cuopt_wheel_*"
path: dist
merge-multiple: true
- name: Create GitHub Release and upload wheels
id: release
env:
GH_TOKEN: ${{ github.token }}
run: |
tag="${GITHUB_REF#refs/tags/}"
mapfile -t wheels < <(find dist -name '*.whl')
if [[ ${#wheels[@]} -eq 0 ]]; then
echo "::error::No wheel files found in dist/ -- refusing to create an asset-free release"
exit 1
fi
gh release create "$tag" \
--repo "${{ github.repository }}" \
--title "$tag" \
--generate-notes \
"${wheels[@]}"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
# Each job below calls the Kitmaker Portal release API (via Charon Ferry) to publish
# one package's wheels from the GitHub Release above to pypi.org / pypi.nvidia.com.
# Kitmaker projects are 1:1 with wheel/component name x CUDA major version (except
# cuopt-sh-client, a pure package with no CUDA suffix), mirroring wheel-publish-* above.
kitmaker-portal-release-libcuopt-cu12:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: libcuopt-cu12
project_id: ${{ vars.KITMAKER_PROJECT_ID_LIBCUOPT_CU12 }}
wheel_asset_pattern: "^libcuopt_cu12-"
upload: false # Staged rollout: flip to true once the team signs off on going live
kitmaker-portal-release-libcuopt-cu13:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: libcuopt-cu13
project_id: ${{ vars.KITMAKER_PROJECT_ID_LIBCUOPT_CU13 }}
wheel_asset_pattern: "^libcuopt_cu13-"
upload: false # Staged rollout: flip to true once the team signs off on going live
kitmaker-portal-release-cuopt-cu12:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: cuopt-cu12
project_id: ${{ vars.KITMAKER_PROJECT_ID_CUOPT_CU12 }}
wheel_asset_pattern: "^cuopt_cu12-"
upload: false # Staged rollout: flip to true once the team signs off on going live
kitmaker-portal-release-cuopt-cu13:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: cuopt-cu13
project_id: ${{ vars.KITMAKER_PROJECT_ID_CUOPT_CU13 }}
wheel_asset_pattern: "^cuopt_cu13-"
upload: false # Staged rollout: flip to true once the team signs off on going live
kitmaker-portal-release-cuopt-server-cu12:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: cuopt-server-cu12
project_id: ${{ vars.KITMAKER_PROJECT_ID_CUOPT_SERVER_CU12 }}
wheel_asset_pattern: "^cuopt_server_cu12-"
upload: false # Staged rollout: flip to true once the team signs off on going live
kitmaker-portal-release-cuopt-server-cu13:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: cuopt-server-cu13
project_id: ${{ vars.KITMAKER_PROJECT_ID_CUOPT_SERVER_CU13 }}
wheel_asset_pattern: "^cuopt_server_cu13-"
upload: false # Staged rollout: flip to true once the team signs off on going live
kitmaker-portal-release-cuopt-sh-client:
if: startsWith(github.ref, 'refs/tags/v')
needs: release-github
permissions:
id-token: write
contents: read
secrets:
KITMAKER_PORTAL_AUTHORIZATION: ${{ secrets.KITMAKER_PORTAL_AUTHORIZATION }}
KITMAKER_PORTAL_ACC_OWNER_EMAIL: ${{ secrets.KITMAKER_PORTAL_ACC_OWNER_EMAIL }}
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
uses: ./.github/workflows/kitmaker_portal.yaml
with:
release_tag: ${{ needs.release-github.outputs.release-tag }}
project_name: cuopt-sh-client
project_id: ${{ vars.KITMAKER_PROJECT_ID_CUOPT_SH_CLIENT }}
wheel_asset_pattern: "^cuopt_sh_client-"
upload: false # Staged rollout: flip to true once the team signs off on going live
tests:
# Docker image build / tests aren't necessary for the 'test.yaml' workflow,
# so 'test.yaml' can be triggered without waiting for those.
needs:
- upload-conda
- wheel-publish-cuopt
- wheel-publish-cuopt-server
- wheel-publish-cuopt-sh-client
- wheel-publish-libcuopt
if: inputs.trigger-tests
permissions:
actions: write
contents: read
runs-on: ubuntu-latest
# ref: https://docs.github.com/en/actions/reference/security/secure-use#use-an-intermediate-environment-variable
env:
GH_TOKEN: ${{ github.token }}
INPUT_BRANCH: "${{ inputs.branch }}"
INPUT_BUILD_TYPE: "${{ inputs.build_type }}"
INPUT_DATE: "${{ inputs.date }}"
INPUT_SHA: "${{ inputs.sha }}"
steps:
- name: trigger-test-workflow
run: |
# NOTE: '--ref' is the branch to pull the workflow file from, 'branch' input is the branch
# to pull the actual cuOpt source code from
gh workflow run \
--repo NVIDIA/cuopt \
--ref "$GITHUB_REF" \
'test.yaml' \
-f branch="${INPUT_BRANCH}" \
-f build_type="${INPUT_BUILD_TYPE}" \
-f date="${INPUT_DATE}" \
-f sha="${INPUT_SHA}"
build-summary:
if: ${{ always() && (inputs.build_type == 'nightly') }}
needs:
- tests
- build-images
- docs-build
permissions:
contents: read
runs-on: linux-amd64-cpu4
container:
image: python:3.14-slim
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.sha }}
persist-credentials: false
- name: Install dependencies
run: apt-get update && apt-get install -y --no-install-recommends curl
- name: Send build summary
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_TOKEN: ${{ github.token }}
RAPIDS_BRANCH: ${{ inputs.branch }}
SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
run: bash ci/build_summary.sh
build-images:
needs:
- build-details
- wheel-publish-cuopt
- wheel-publish-cuopt-server
- wheel-publish-cuopt-sh-client
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: ./.github/workflows/build_test_publish_images.yaml
secrets: inherit # zizmor: ignore[secrets-inherit]
with:
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}