-
Notifications
You must be signed in to change notification settings - Fork 306
183 lines (173 loc) · 7.07 KB
/
Copy pathmulti_arch_ci.yml
File metadata and controls
183 lines (173 loc) · 7.07 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
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT
# Multi-Arch CI
#
# This is a staging workflow for the sharded multi-arch build pipeline.
# It mirrors ci.yml but uses multi_arch_build_portable_linux.yml instead of
# ci_linux.yml. Once validated, ci.yml will be updated to use the multi-arch
# sub-workflows directly.
name: Multi-Arch CI
on:
push:
branches:
- main
- multi_arch/**
- release/therock-*
workflow_dispatch:
inputs:
linux_amdgpu_families:
type: string
description: "Insert comma-separated list of Linux GPU families to build and test. ex: gfx94X, gfx120X (empty = skip linux)"
default: ""
linux_test_labels:
type: string
description: "Comma-separated test options. Use test:* to filter tests (e.g. test:rocprim). Use test_filter:* to set test type (e.g. test_filter:quick)."
default: ""
windows_amdgpu_families:
type: string
description: "Insert comma-separated list of Windows GPU families to build and test. ex: gfx94X, gfx120X (empty = skip windows)"
default: ""
windows_test_labels:
type: string
description: "Comma-separated test options. Use test:* to filter tests (e.g. test:rocprim). Use test_filter:* to set test type (e.g. test_filter:quick)."
default: ""
prebuilt_stages:
type: string
default: ""
description: "Comma-separated build stages to skip (or 'all' for all stages); artifacts are copied from baseline_run_id instead"
baseline_run_id:
type: string
default: ""
description: "Workflow run ID to copy prebuilt stage artifacts from; required when prebuilt_stages is set"
stage_reuse_mode:
type: choice
default: "dry-run"
options:
- "dry-run"
- "reuse-stage"
# This drives the AUTOMATIC stage-reuse detection layer, which is
# separate from the manual `prebuilt_stages` input above. dry-run only
# reports which unaffected stages could be reused; reuse-stage actually
# reuses them (skips the build and copies artifacts from a baseline run).
description: "dry-run (report only) | reuse-stage (auto-reuse unaffected stages)"
stage_reuse_max_age_hours:
type: string
default: "72"
description: "Automatic stage reuse: reject baseline runs older than this many hours"
stage_reuse_commit_history:
type: string
default: "50"
description: "Automatic stage reuse: number of recent branch commits to fetch for ancestry"
changed_projects:
type: string
default: ""
description: "Comma-separated list of changed projects to filter tests (empty = run all tests)"
build_pytorch:
type: boolean
default: true
description: "Build PyTorch wheels"
build_jax:
type: boolean
default: true
description: "Build JAX wheels"
pull_request:
types:
- labeled
- opened
- synchronize
permissions:
contents: read
actions: read # Required for stage reuse feature to query workflow runs
concurrency:
# See https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency
#
# Only allow one run at a time for 'pull_request' events.
# Allow multiple runs for 'push' and 'workflow_dispatch'.
#
# `github.workflow`: each workflow gets its own concurrency group
# `github.head_ref`: the branch name (only defined for pull_request events)
# `github.run_id` : fallback, unique for each run
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
setup:
uses: ./.github/workflows/setup_multi_arch.yml
with:
build_variant: "release"
linux_amdgpu_families: ${{ inputs.linux_amdgpu_families || '' }}
windows_amdgpu_families: ${{ inputs.windows_amdgpu_families || '' }}
linux_test_labels: ${{ inputs.linux_test_labels || '' }}
windows_test_labels: ${{ inputs.windows_test_labels || '' }}
prebuilt_stages: ${{ inputs.prebuilt_stages || '' }}
baseline_run_id: ${{ inputs.baseline_run_id || '' }}
stage_reuse_mode: ${{ inputs.stage_reuse_mode || 'dry-run' }}
stage_reuse_max_age_hours: ${{ inputs.stage_reuse_max_age_hours || '72' }}
stage_reuse_commit_history: ${{ inputs.stage_reuse_commit_history || '50' }}
build_pytorch: ${{ github.event_name != 'workflow_dispatch' || inputs.build_pytorch }}
build_jax: ${{ github.event_name != 'workflow_dispatch' || inputs.build_jax }}
linux_build_and_test:
name: Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }}
needs: setup
if: >-
${{
needs.setup.outputs.linux_build_config != '' &&
needs.setup.outputs.enable_build_jobs == 'true'
}}
uses: ./.github/workflows/multi_arch_ci_linux.yml
secrets: inherit
with:
build_config: ${{ needs.setup.outputs.linux_build_config }}
test_labels: ${{ needs.setup.outputs.linux_test_labels }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
rocm_deb_package_version: ${{ needs.setup.outputs.rocm_deb_package_version }}
rocm_rpm_package_version: ${{ needs.setup.outputs.rocm_rpm_package_version }}
test_type: ${{ needs.setup.outputs.test_type }}
changed_projects: ${{ inputs.changed_projects || '' }}
permissions:
contents: read
id-token: write
windows_build_and_test:
name: Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }}
needs: setup
if: >-
${{
needs.setup.outputs.windows_build_config != '' &&
needs.setup.outputs.enable_build_jobs == 'true'
}}
uses: ./.github/workflows/multi_arch_ci_windows.yml
secrets: inherit
with:
build_config: ${{ needs.setup.outputs.windows_build_config }}
test_labels: ${{ needs.setup.outputs.windows_test_labels }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
test_type: ${{ needs.setup.outputs.test_type }}
changed_projects: ${{ inputs.changed_projects || '' }}
permissions:
contents: read
id-token: write
manifest_diff:
name: Manifest Diff
# Refs are auto-derived from push / pull_request events only.
# For manual runs, dispatch manifest-diff.yml directly with explicit refs.
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
uses: ./.github/workflows/manifest-diff.yml
permissions:
contents: read
id-token: write
ci_summary:
name: CI Summary
if: always()
needs:
- setup
- linux_build_and_test
- windows_build_and_test
- manifest_diff
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Evaluate workflow results
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
python build_tools/github_actions/workflow_summary.py \
--needs-json '${{ toJSON(needs) }}'