-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
332 lines (318 loc) · 10.6 KB
/
main.yml
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
name: XGBoost CI
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
BRANCH_NAME: >-
${{ github.event.pull_request.number && 'PR-' }}${{ github.event.pull_request.number || github.ref_name }}
USE_DOCKER_CACHE: 1
jobs:
build-containers:
name: Build CI containers (${{ matrix.container_id }})
runs-on:
- runs-on
- runner=${{ matrix.runner }}
- run-id=${{ github.run_id }}
- tag=main-build-containers-${{ matrix.container_id }}
strategy:
max-parallel: 2
matrix:
container_id:
- xgb-ci.gpu_build_rockylinux8
- xgb-ci.gpu_build_r_rockylinux8
- xgb-ci.gpu
- xgb-ci.gpu_dev_ver
- xgb-ci.cpu
- xgb-ci.manylinux_2_28_x86_64
- xgb-ci.manylinux2014_x86_64
runner: [linux-amd64-cpu]
include:
- container_id: xgb-ci.manylinux2014_aarch64
runner: linux-arm64-cpu
- container_id: xgb-ci.aarch64
runner: linux-arm64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Build ${{ matrix.container_id }}
run: bash ops/docker_build.sh
env:
CONTAINER_ID: ${{ matrix.container_id }}
build-cpu:
name: Build CPU
needs: build-containers
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.cpu
- run: bash ops/pipeline/build-cpu.sh
- name: Stash CLI executable
run: bash ops/pipeline/stash-artifacts.sh ./xgboost
env:
COMMAND: upload
KEY: build-cpu
build-cpu-arm64:
name: Build CPU ARM64 + manylinux_2_28_aarch64 wheel
needs: build-containers
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-arm64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.aarch64
- run: bash ops/pipeline/build-cpu-arm64.sh
- name: Stash files
run: bash ops/pipeline/stash-artifacts.sh ./xgboost python-package/dist/*.whl
env:
COMMAND: upload
KEY: build-cpu-arm64
- name: Upload Python wheel
run: |
bash ops/pipeline/publish-artifact.sh python-package/dist/*.whl \
s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/
build-cuda:
name: Build CUDA + manylinux_2_28_x86_64 wheel
needs: build-containers
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.gpu_build_rockylinux8
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.manylinux_2_28_x86_64
- run: bash ops/pipeline/build-cuda.sh
- name: Stash files
run: |
bash ops/pipeline/stash-artifacts.sh \
build/testxgboost ./xgboost python-package/dist/*.whl
env:
COMMAND: upload
KEY: build-cuda
- name: Upload Python wheel
run: |
for file in python-package/dist/*.whl python-package/dist/meta.json
do
bash ops/pipeline/publish-artifact.sh "${file}" \
s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/
done
build-cuda-with-rmm:
name: Build CUDA with RMM
needs: build-containers
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.gpu_build_rockylinux8
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.manylinux_2_28_x86_64
- run: bash ops/pipeline/build-cuda-with-rmm.sh
- name: Stash files
run: bash ops/pipeline/stash-artifacts.sh build/testxgboost
env:
COMMAND: upload
KEY: build-cuda-with-rmm
- name: Upload Python wheel
run: |
bash ops/pipeline/publish-artifact.sh python-package/dist/*.whl \
s3://xgboost-nightly-builds/experimental_build_with_rmm/
build-manylinux2014:
name: Build manylinux2014_${{ matrix.arch }} wheel
needs: build-containers
runs-on:
- runs-on
- runner=${{ matrix.runner }}
- run-id=${{ github.run_id }}
- tag=main-build-manylinux2014-${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
runner: linux-arm64-cpu
- arch: x86_64
runner: linux-amd64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.manylinux2014_${{ matrix.arch }}
- run: bash ops/pipeline/build-manylinux2014.sh ${{ matrix.arch }}
- name: Upload Python wheel
run: |
for wheel in python-package/dist/*.whl
do
bash ops/pipeline/publish-artifact.sh "${wheel}" \
s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/
done
build-gpu-rpkg:
name: Build GPU-enabled R package
needs: build-containers
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.gpu_build_r_rockylinux8
- run: bash ops/pipeline/build-gpu-rpkg.sh
- name: Upload R tarball
run: |
bash ops/pipeline/publish-artifact.sh xgboost_r_gpu_linux_*.tar.gz \
s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/
test-cpp-gpu:
name: >-
Run Google Tests with GPUs
(Suite ${{ matrix.suite }}, Runner ${{ matrix.runner }})
needs: [build-cuda, build-cuda-with-rmm]
runs-on:
- runs-on
- runner=${{ matrix.runner }}
- run-id=${{ github.run_id }}
- tag=main-test-cpp-gpu-${{ matrix.suite }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- suite: gpu
runner: linux-amd64-gpu
artifact_from: build-cuda
- suite: gpu-rmm
runner: linux-amd64-gpu
artifact_from: build-cuda-with-rmm
- suite: mgpu
runner: linux-amd64-mgpu
artifact_from: build-cuda
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: xgb-ci.gpu
- name: Unstash gtest
run: |
bash ops/pipeline/stash-artifacts.sh build/testxgboost
chmod +x build/testxgboost
env:
COMMAND: download
KEY: ${{ matrix.artifact_from }}
- run: bash ops/pipeline/test-cpp-gpu.sh ${{ matrix.suite }}
test-python-wheel:
name: Run Python tests (${{ matrix.description }})
needs: [build-cuda, build-cpu-arm64]
runs-on:
- runs-on
- runner=${{ matrix.runner }}
- run-id=${{ github.run_id }}
- tag=main-test-python-wheel-${{ matrix.description }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- description: single-gpu
container: xgb-ci.gpu
suite: gpu
runner: linux-amd64-gpu
artifact_from: build-cuda
- description: single-gpu-nightly-deps
container: xgb-ci.gpu_dev_ver
suite: gpu
runner: linux-amd64-gpu
artifact_from: build-cuda
- description: multiple-gpu
container: xgb-ci.gpu
suite: mgpu
runner: linux-amd64-mgpu
artifact_from: build-cuda
- description: multiple-gpu-nightly-deps
container: xgb-ci.gpu_dev_ver
suite: mgpu
runner: linux-amd64-mgpu
artifact_from: build-cuda
- description: cpu-amd64
container: xgb-ci.cpu
suite: cpu
runner: linux-amd64-cpu
artifact_from: build-cuda
- description: cpu-arm64
container: xgb-ci.aarch64
suite: cpu-arm64
runner: linux-arm64-cpu
artifact_from: build-cpu-arm64
steps:
# Restart Docker daemon so that it recognizes the ephemeral disks
- run: sudo systemctl restart docker
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Fetch container from cache
run: bash ops/docker_build.sh
env:
CONTAINER_ID: ${{ matrix.container }}
- name: Unstash Python wheel
run: |
bash ops/pipeline/stash-artifacts.sh python-package/dist/*.whl ./xgboost
chmod +x ./xgboost
env:
COMMAND: download
KEY: ${{ matrix.artifact_from }}
- name: Run Python tests, ${{ matrix.description }}
run: bash ops/pipeline/test-python-wheel.sh ${{ matrix.suite }} ${{ matrix.container }}