Skip to content

Commit 8f57ac8

Browse files
committed
feat: add release build output manifests
Created with Codex (GPT-5).
1 parent 6f09c69 commit 8f57ac8

5 files changed

Lines changed: 183 additions & 0 deletions

File tree

.github/workflows/conda-cpp-build.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ on:
4444
default: true
4545
required: false
4646
description: "One of [true, false], true if artifacts should be uploaded to GitHub's artifact store"
47+
release-build-output:
48+
type: boolean
49+
default: false
50+
required: false
51+
description: "Generate a release-build-output companion for each uploaded Conda bundle"
52+
release-unit:
53+
type: string
54+
default: ''
55+
required: false
56+
description: "Stable release-platform unit ID; required when release-build-output is true"
4757
matrix_filter:
4858
description: |
4959
jq expression which modifies the matrix.
@@ -226,6 +236,19 @@ jobs:
226236
if-no-files-found: 'error'
227237
name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
228238
path: ${{ steps.package-name.outputs.CONDA_OUTPUT_DIR }}
239+
240+
- name: Create Conda release build-output companion
241+
if: ${{ inputs.upload-artifacts && inputs.release-build-output }}
242+
uses: rapidsai/shared-actions/release-build-output-dispatch@agent/release-build-output-dispatch # zizmor: ignore[unpinned-uses]
243+
env:
244+
SHARED_ACTIONS_REPO: rapidsai/shared-actions
245+
SHARED_ACTIONS_REF: agent/release-build-output-dispatch
246+
with:
247+
artifact-type: conda
248+
output-directory: ${{ steps.package-name.outputs.CONDA_OUTPUT_DIR }}
249+
release-unit: ${{ inputs.release-unit }}
250+
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
251+
source-sha: ${{ inputs.sha || github.sha }}
229252
- name: Upload additional artifacts
230253
if: "!cancelled()"
231254
run: rapids-upload-artifacts-dir "cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)"

.github/workflows/conda-python-build.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ on:
4444
default: true
4545
required: false
4646
description: "One of [true, false], true if artifacts should be uploaded to GitHub's artifact store"
47+
release-build-output:
48+
type: boolean
49+
default: false
50+
required: false
51+
description: "Generate a release-build-output companion for each uploaded Conda bundle"
52+
release-unit:
53+
type: string
54+
default: ''
55+
required: false
56+
description: "Stable release-platform unit ID; required when release-build-output is true"
4757
matrix_filter:
4858
description: |
4959
jq expression which modifies the matrix.
@@ -231,6 +241,19 @@ jobs:
231241
if-no-files-found: 'error'
232242
name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
233243
path: ${{ steps.package-name.outputs.CONDA_OUTPUT_DIR }}
244+
245+
- name: Create Conda release build-output companion
246+
if: ${{ inputs.upload-artifacts && inputs.release-build-output }}
247+
uses: rapidsai/shared-actions/release-build-output-dispatch@agent/release-build-output-dispatch # zizmor: ignore[unpinned-uses]
248+
env:
249+
SHARED_ACTIONS_REPO: rapidsai/shared-actions
250+
SHARED_ACTIONS_REF: agent/release-build-output-dispatch
251+
with:
252+
artifact-type: conda
253+
output-directory: ${{ steps.package-name.outputs.CONDA_OUTPUT_DIR }}
254+
release-unit: ${{ inputs.release-unit }}
255+
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
256+
source-sha: ${{ inputs.sha || github.sha }}
234257
- name: Upload additional artifacts
235258
if: "!cancelled()"
236259
run: rapids-upload-artifacts-dir "cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.}"

.github/workflows/custom-job.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,36 @@ on:
105105
default: false
106106
type: boolean
107107
required: false
108+
release-build-output:
109+
description: "Generate a release-build-output companion for the uploaded artifact bundle"
110+
default: false
111+
type: boolean
112+
required: false
113+
release-unit:
114+
description: "Stable release-platform unit ID; required when release-build-output is true"
115+
default: ''
116+
type: string
117+
required: false
118+
release-package:
119+
description: "JSON package identity shared by the bundle; mutually exclusive with release-package-file"
120+
default: ''
121+
type: string
122+
required: false
123+
release-package-file:
124+
description: "Producer-created package JSON relative to release-output-directory"
125+
default: ''
126+
type: string
127+
required: false
128+
release-artifacts:
129+
description: "JSON primary-artifact and evidence descriptors relative to release-output-directory"
130+
default: ''
131+
type: string
132+
required: false
133+
release-output-directory:
134+
description: "Directory containing the primary artifact paths described by release-artifacts"
135+
default: '.'
136+
type: string
137+
required: false
108138

109139
defaults:
110140
run:
@@ -228,6 +258,21 @@ jobs:
228258
name: ${{ inputs.artifact-name }}
229259
path: ${{ inputs.file_to_upload }}
230260
if-no-files-found: ignore
261+
- name: Create release build-output companion
262+
if: ${{ inputs.release-build-output }}
263+
uses: rapidsai/shared-actions/release-build-output-dispatch@agent/release-build-output-dispatch # zizmor: ignore[unpinned-uses]
264+
env:
265+
SHARED_ACTIONS_REPO: rapidsai/shared-actions
266+
SHARED_ACTIONS_REF: agent/release-build-output-dispatch
267+
with:
268+
artifact-type: custom
269+
output-directory: ${{ inputs.release-output-directory }}
270+
release-artifacts: ${{ inputs.release-artifacts }}
271+
release-package: ${{ inputs.release-package }}
272+
release-package-file: ${{ inputs.release-package-file }}
273+
release-unit: ${{ inputs.release-unit }}
274+
source-artifact-name: ${{ inputs.artifact-name }}
275+
source-sha: ${{ inputs.sha || github.sha }}
231276
- name: Upload additional artifacts
232277
if: "!cancelled()"
233278
run: rapids-upload-artifacts-dir "custom-job-$(arch)"

.github/workflows/wheels-build.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ on:
7575
default: true
7676
required: false
7777
description: "One of [true, false], true if artifacts should be uploaded to GitHub's artifact store"
78+
release-build-output:
79+
type: boolean
80+
default: false
81+
required: false
82+
description: "Generate a release-build-output companion for each uploaded wheel bundle"
83+
release-unit:
84+
type: string
85+
default: ''
86+
required: false
87+
description: "Stable release-platform unit ID; required when release-build-output is true"
7888
extra-repo:
7989
required: false
8090
type: string
@@ -298,6 +308,19 @@ jobs:
298308
name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
299309
path: ${{ steps.package-name.outputs.WHEEL_OUTPUT_DIR }}
300310

311+
- name: Create wheel release build-output companion
312+
if: ${{ inputs.upload-artifacts && inputs.release-build-output }}
313+
uses: rapidsai/shared-actions/release-build-output-dispatch@agent/release-build-output-dispatch # zizmor: ignore[unpinned-uses]
314+
env:
315+
SHARED_ACTIONS_REPO: rapidsai/shared-actions
316+
SHARED_ACTIONS_REF: agent/release-build-output-dispatch
317+
with:
318+
artifact-type: wheel
319+
output-directory: ${{ steps.package-name.outputs.WHEEL_OUTPUT_DIR }}
320+
release-unit: ${{ inputs.release-unit }}
321+
source-artifact-name: ${{ steps.package-name.outputs.RAPIDS_PACKAGE_NAME }}
322+
source-sha: ${{ inputs.sha || github.sha }}
323+
301324
- name: Upload additional artifacts
302325
if: "!cancelled()"
303326
run: rapids-upload-artifacts-dir "cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.}"

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,75 @@ Reusable workflows must be placed in the `.github/workflows` directory as mentio
2020

2121
## Usage
2222

23+
### release-build-output
24+
25+
Release build-output companions are created inside the producer job by the
26+
[`release-build-output-dispatch`](https://github.com/rapidsai/shared-actions/tree/main/release-build-output-dispatch)
27+
shared action. Running beside the build keeps the producer's matrix,
28+
source-artifact name, and original files authoritative and avoids a second
29+
runner and artifact download.
30+
31+
The standard wheel and Conda builders expose opt-in `release-build-output` and
32+
`release-unit` inputs. The shared action reads exact package metadata from the
33+
built files and uploads `release-build-output-<artifact-name>`:
34+
35+
```yaml
36+
wheel-build-nx-cugraph:
37+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@codex/release-build-output-manifests
38+
with:
39+
# existing build inputs omitted
40+
release-build-output: true
41+
release-unit: wheel:nx-cugraph
42+
```
43+
44+
`custom-job.yaml` exposes the same opt-in plus `release-output-directory`,
45+
`release-artifacts`, and either `release-package` or
46+
`release-package-file`. Descriptors may name producer-supplied SBOM,
47+
provenance, and signature sidecars relative to the output directory. Each path
48+
or glob must resolve to exactly one file; the action never guesses a release
49+
artifact.
50+
51+
```yaml
52+
cuvs-java-build:
53+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@codex/release-build-output-manifests
54+
with:
55+
# existing build inputs omitted
56+
artifact-name: cuvs-java-cuda12.9.1
57+
file_to_upload: java/cuvs-java/target/
58+
release-build-output: true
59+
release-output-directory: java/cuvs-java/target
60+
release-unit: maven:cuvs-java
61+
release-package-file: cuvs-java.release-package.json
62+
release-artifacts: '[{"path":"cuvs-java-*-x86_64-cuda*.jar"}]'
63+
```
64+
65+
The release coordinator downloads both artifacts into the same directory, for
66+
example `release-build-outputs/cuvs-java/cuda12.9.1/`. The resulting tree has
67+
one `release-build-output.json` per producer job and is consumed directly by
68+
`rapids-release shadow file`. It does not require Artifactory.
69+
70+
The companion artifact also carries `release-build-metadata.json`. It records
71+
the artifact identity, manifest filename, GitHub build identity, and one
72+
`metadata.artifacts` entry per primary artifact. Each entry explicitly sets
73+
`sbom_kind` to `producer-dependency` or `generated-identity`. SBOM and
74+
provenance paths remain authoritative in `release-build-output.json`; supplied
75+
sidecars are copied under `release-evidence/` so the companion is independently
76+
self-contained.
77+
78+
When no SBOM is selected, the action generates an SPDX artifact-identity
79+
envelope containing package identity and the primary artifact SHA-256. It is
80+
classified as `generated-identity`, contains no dependency inventory, and must
81+
not be reported as a producer-supplied dependency SBOM. A descriptor-selected
82+
producer SBOM is instead classified as `producer-dependency`.
83+
84+
The in-development branch ref above is intentional for rollout canaries. It
85+
allows downstream validation before this contract is merged to
86+
`shared-workflows/main`.
87+
88+
The cross-repository enrollment inventory, blockers, and proposed PR sequence
89+
are maintained in
90+
[`rapidsai/build-infra#381`](https://github.com/rapidsai/build-infra/issues/381).
91+
2392
### matrix_filter
2493

2594
Several of the workflows in this project have matrices (combinations of workflow inputs) expressed in inline YAML/JSON.

0 commit comments

Comments
 (0)