forked from ROCm/rocm-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
177 lines (161 loc) · 6.51 KB
/
Copy paththerock-ci-nightly.yml
File metadata and controls
177 lines (161 loc) · 6.51 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
name: TheRock CI Nightly
on:
schedule:
- cron: "0 7 * * *" # Runs nightly at 7 AM UTC
workflow_dispatch:
inputs:
projects:
type: string
description: "Insert space-separated list of projects to test or 'all' to test all projects. ex: 'projects/rocprim projects/hipcub'"
permissions:
contents: read
jobs:
setup:
name: "Setup"
runs-on: ubuntu-24.04
outputs:
therock_ref: ${{ steps.ci-env.outputs.therock-ref }}
docker_image: ${{ steps.ci-env.outputs.docker-image }}
rocm_package_version: ${{ steps.rocm_package_version.outputs.rocm_package_version }}
linux_projects: ${{ steps.linux_projects.outputs.linux_projects }}
linux_build_runs_on: ${{ steps.linux_projects.outputs.build_runs_on }}
windows_projects: ${{ steps.windows_projects.outputs.windows_projects }}
windows_build_runs_on: ${{ steps.windows_projects.outputs.build_runs_on }}
test_type: ${{ steps.linux_projects.outputs.test_type }}
linux_package_targets: ${{ steps.configure_linux.outputs.package_targets }}
windows_package_targets: ${{ steps.configure_windows.outputs.package_targets }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: .github
sparse-checkout-cone-mode: true
fetch-depth: 2
- name: Load CI environment
id: ci-env
uses: ./.github/actions/ci-env
- name: Checkout TheRock repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: "ROCm/TheRock"
path: TheRock
ref: ${{ steps.ci-env.outputs.therock-ref }}
- name: Checkout CI config
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ROCm/therock-ci-config
ref: main
path: ci-config
continue-on-error: true
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic requests
- name: Compute package version
id: rocm_package_version
run: |
python TheRock/build_tools/compute_rocm_package_version.py --release-type=dev
- name: Determine Linux projects to run
id: linux_projects
env:
PROJECTS: ${{ inputs.projects }}
PLATFORM: "linux"
CI_CONFIG_PATH: ci-config
run: |
python .github/scripts/therock_configure_ci.py
- name: Determine Windows projects to run
id: windows_projects
env:
PROJECTS: ${{ inputs.projects }}
PLATFORM: "windows"
CI_CONFIG_PATH: ci-config
run: |
python .github/scripts/therock_configure_ci.py
- name: Fetch Linux targets for build and test
env:
THEROCK_PACKAGE_PLATFORM: "linux"
# TODO(geomin12): Allow dynamic values of AMDGPU_FAMILIES, with opt-in options
AMDGPU_FAMILIES: "gfx94X, gfx950"
# Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS'
ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }}
LOAD_TEST_RUNNERS_FROM_VAR: true
id: configure_linux
run: python ./TheRock/build_tools/github_actions/fetch_package_targets.py
- name: Fetch Windows targets for build and test
env:
THEROCK_PACKAGE_PLATFORM: "windows"
AMDGPU_FAMILIES: "gfx1151"
CI_CONFIG_PATH: ci-config
id: configure_windows
run: python ./TheRock/build_tools/github_actions/fetch_package_targets.py
therock-ci-linux:
name: Linux (${{ matrix.projects.projects_to_test }} | ${{ matrix.target_bundle.amdgpu_family }})
permissions:
contents: read
id-token: write
needs: setup
if: ${{ needs.setup.outputs.linux_projects != '[]' }}
strategy:
fail-fast: false
matrix:
projects: ${{ fromJSON(needs.setup.outputs.linux_projects) }}
target_bundle: ${{ fromJSON(needs.setup.outputs.linux_package_targets) }}
uses: ./.github/workflows/therock-ci-linux.yml
secrets: inherit
with:
therock_ref: ${{ needs.setup.outputs.therock_ref }}
docker_image: ${{ needs.setup.outputs.docker_image }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
cmake_options: ${{ matrix.projects.cmake_options }}
projects_to_test: ${{ matrix.projects.projects_to_test }}
test_type: ${{ needs.setup.outputs.test_type }}
amdgpu_families: ${{ matrix.target_bundle.amdgpu_family }}
test_runs_on: ${{ matrix.target_bundle.test_machine }}
build_runs_on: ${{ needs.setup.outputs.linux_build_runs_on }}
therock-ci-windows:
name: Windows (${{ matrix.projects.projects_to_test }} | ${{ matrix.target_bundle.amdgpu_family }})
permissions:
contents: read
id-token: write
needs: setup
if: ${{ needs.setup.outputs.windows_projects != '[]' }}
strategy:
fail-fast: false
matrix:
projects: ${{ fromJSON(needs.setup.outputs.windows_projects) }}
target_bundle: ${{ fromJSON(needs.setup.outputs.windows_package_targets) }}
uses: ./.github/workflows/therock-ci-windows.yml
secrets: inherit
with:
therock_ref: ${{ needs.setup.outputs.therock_ref }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
cmake_options: ${{ matrix.projects.cmake_options }}
projects_to_test: ${{ matrix.projects.projects_to_test }}
test_type: ${{ needs.setup.outputs.test_type }}
amdgpu_families: ${{ matrix.target_bundle.amdgpu_family }}
test_runs_on: ${{ matrix.target_bundle.test_machine }}
build_runs_on: ${{ needs.setup.outputs.windows_build_runs_on }}
therock_ci_nightly_summary:
name: TheRock CI Nightly Summary
if: always()
needs:
- setup
- therock-ci-linux
- therock-ci-windows
runs-on: ubuntu-24.04
steps:
- name: Output failed jobs
run: |
echo '${{ toJson(needs) }}'
FAILED_JOBS="$(echo '${{ toJson(needs) }}' \
| jq --raw-output \
'map_values(select(.result!="success" and .result!="skipped")) | keys | join(",")' \
)"
if [[ "${FAILED_JOBS}" != "" ]]; then
echo "The following jobs failed: ${FAILED_JOBS}"
exit 1
fi