@@ -12,40 +12,12 @@ concurrency:
1212env :
1313 BRANCH_NAME : >-
1414 ${{ github.event.pull_request.number && 'PR-' }}${{ github.event.pull_request.number || github.ref_name }}
15- USE_DOCKER_CACHE : 1
1615
1716jobs :
18- build-containers :
19- name : Build CI containers (${{ matrix.container_id }})
20- runs-on :
21- - runs-on
22- - runner=${{ matrix.runner }}
23- - run-id=${{ github.run_id }}
24- - tag=jvm-tests-build-containers-${{ matrix.container_id }}
25- strategy :
26- matrix :
27- container_id :
28- - xgb-ci.manylinux2014_x86_64
29- - xgb-ci.jvm
30- - xgb-ci.jvm_gpu_build
31- runner : [linux-amd64-cpu]
32- include :
33- - container_id : xgb-ci.manylinux2014_aarch64
34- runner : linux-arm64-cpu
35- steps :
36- # Restart Docker daemon so that it recognizes the ephemeral disks
37- - run : sudo systemctl restart docker
38- - uses : actions/checkout@v4
39- with :
40- submodules : " true"
41- - name : Build ${{ matrix.container_id }}
42- run : bash ops/docker_build.sh ${{ matrix.container_id }}
43-
4417 build-jvm-manylinux2014 :
4518 name : >-
4619 Build libxgboost4j.so targeting glibc 2.17
4720 (arch ${{ matrix.arch }}, runner ${{ matrix.runner }})
48- needs : build-containers
4921 runs-on :
5022 - runs-on
5123 - runner=${{ matrix.runner }}
@@ -65,19 +37,12 @@ jobs:
6537 - uses : actions/checkout@v4
6638 with :
6739 submodules : " true"
68- - name : Fetch container from cache
69- run : bash ops/docker_build.sh xgb-ci.manylinux2014_${{ matrix.arch }}
40+ - name : Log into Docker registry (AWS ECR)
41+ run : bash ops/pipeline/login-docker-registry.sh
7042 - run : bash ops/pipeline/build-jvm-manylinux2014.sh ${{ matrix.arch }}
71- - name : Upload libxgboost4j.so
72- run : |
73- libname=lib/libxgboost4j_linux_${{ matrix.arch }}_${{ github.sha }}.so
74- mv -v lib/libxgboost4j.so ${libname}
75- bash ops/pipeline/publish-artifact.sh ${libname} \
76- s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/libxgboost4j/
7743
7844 build-jvm-gpu :
7945 name : Build libxgboost4j.so with CUDA
80- needs : build-containers
8146 runs-on :
8247 - runs-on=${{ github.run_id }}
8348 - runner=linux-amd64-cpu
@@ -88,12 +53,15 @@ jobs:
8853 - uses : actions/checkout@v4
8954 with :
9055 submodules : " true"
91- - name : Fetch container from cache
92- run : bash ops/docker_build.sh xgb-ci.jvm_gpu_build
56+ - name : Log into Docker registry (AWS ECR)
57+ run : bash ops/pipeline/login-docker-registry.sh
9358 - run : bash ops/pipeline/build-jvm-gpu.sh
9459 - name : Stash files
9560 run : |
96- bash ops/pipeline/stash-artifacts.sh stash build-jvm-gpu lib/libxgboost4j.so
61+ python3 ops/pipeline/manage-artifacts.py upload \
62+ --s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
63+ --prefix cache/${{ github.run_id }}/build-jvm-gpu \
64+ lib/libxgboost4j.so
9765
9866 build-jvm-mac :
9967 name : " Build libxgboost4j.dylib for ${{ matrix.description }}"
@@ -104,22 +72,25 @@ jobs:
10472 include :
10573 - description : " MacOS (Apple Silicon)"
10674 script : ops/pipeline/build-jvm-macos-apple-silicon.sh
107- libname : libxgboost4j_m1_${{ github.sha }} .dylib
75+ libname : libxgboost4j_m1 .dylib
10876 runner : macos-14
10977 - description : " MacOS (Intel)"
11078 script : ops/pipeline/build-jvm-macos-intel.sh
111- libname : libxgboost4j_intel_${{ github.sha }} .dylib
79+ libname : libxgboost4j_intel .dylib
11280 runner : macos-13
11381 steps :
11482 - uses : actions/checkout@v4
11583 with :
11684 submodules : " true"
11785 - run : bash ${{ matrix.script }}
11886 - name : Upload libxgboost4j.dylib
87+ if : github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')
11988 run : |
12089 mv -v lib/libxgboost4j.dylib ${{ matrix.libname }}
121- bash ops/pipeline/publish-artifact.sh ${{ matrix.libname }} \
122- s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/libxgboost4j/
90+ python3 ops/pipeline/manage-artifacts.py upload \
91+ --s3-bucket xgboost-nightly-builds \
92+ --prefix ${{ env.BRANCH_NAME }}/${{ github.sha }} --make-public \
93+ ${{ matrix.libname }}
12394 env :
12495 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
12596 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}
@@ -137,21 +108,25 @@ jobs:
137108 - uses : actions/checkout@v4
138109 with :
139110 submodules : " true"
140- - name : Fetch container from cache
141- run : bash ops/docker_build.sh xgb-ci.jvm_gpu_build
111+ - name : Log into Docker registry (AWS ECR)
112+ run : bash ops/pipeline/login-docker-registry.sh
142113 - name : Unstash files
143114 run : |
144- bash ops/pipeline/stash-artifacts.sh unstash build-jvm-gpu lib/libxgboost4j.so
115+ python3 ops/pipeline/manage-artifacts.py download \
116+ --s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
117+ --prefix cache/${{ github.run_id }}/build-jvm-gpu \
118+ --dest-dir lib \
119+ libxgboost4j.so
145120 - run : bash ops/pipeline/build-jvm-doc.sh
146121 - name : Upload JVM doc
147122 run : |
148- bash ops/pipeline/publish-artifact.sh \
149- jvm-packages/${{ env.BRANCH_NAME }}.tar.bz2 \
150- s3://xgboost-docs/
123+ python3 ops/pipeline/manage-artifacts.py upload \
124+ --s3-bucket xgboost-docs \
125+ --prefix ${BRANCH_NAME}/${GITHUB_SHA} --make-public \
126+ jvm-packages/${{ env.BRANCH_NAME }}.tar.bz2
151127
152128 build-test-jvm-packages :
153129 name : Build and test JVM packages (Linux, Scala ${{ matrix.scala_version }})
154- needs : build-containers
155130 runs-on :
156131 - runs-on=${{ github.run_id }}
157132 - runner=linux-amd64-cpu
@@ -166,16 +141,18 @@ jobs:
166141 - uses : actions/checkout@v4
167142 with :
168143 submodules : " true"
169- - name : Fetch container from cache
170- run : bash ops/docker_build.sh xgb-ci.jvm
144+ - name : Log into Docker registry (AWS ECR)
145+ run : bash ops/pipeline/login-docker-registry.sh
171146 - name : Build and test JVM packages (Scala ${{ matrix.scala_version }})
172147 run : bash ops/pipeline/build-test-jvm-packages.sh
173148 env :
174149 SCALA_VERSION : ${{ matrix.scala_version }}
175150 - name : Stash files
176151 run : |
177- bash ops/pipeline/stash-artifacts.sh stash \
178- build-test-jvm-packages lib/libxgboost4j.so
152+ python3 ops/pipeline/manage-artifacts.py upload \
153+ --s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
154+ --prefix cache/${{ github.run_id }}/build-test-jvm-packages \
155+ lib/libxgboost4j.so
179156 if : matrix.scala_version == '2.13'
180157
181158 build-test-jvm-packages-other-os :
@@ -210,11 +187,10 @@ jobs:
210187 mvn test -B -pl :xgboost4j_2.12
211188 - name : Publish artifact xgboost4j.dll to S3
212189 run : |
213- cd lib/
214- Rename-Item -Path xgboost4j.dll -NewName xgboost4j_${{ github.sha }}.dll
215- python -m awscli s3 cp xgboost4j_${{ github.sha }}.dll `
216- s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/libxgboost4j/ `
217- --acl public-read --region us-west-2
190+ python ops/pipeline/manage-artifacts.py upload \
191+ --s3-bucket xgboost-nightly-builds \
192+ --prefix ${{ env.BRANCH_NAME }}/${{ github.sha }} --make-public \
193+ lib/xgboost4j.dll
218194 if : |
219195 (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')) &&
220196 matrix.os == 'windows-latest'
@@ -239,11 +215,15 @@ jobs:
239215 - uses : actions/checkout@v4
240216 with :
241217 submodules : " true"
242- - name : Fetch container from cache
243- run : bash ops/docker_build.sh xgb-ci.jvm_gpu_build
218+ - name : Log into Docker registry (AWS ECR)
219+ run : bash ops/pipeline/login-docker-registry.sh
244220 - name : Unstash files
245221 run : |
246- bash ops/pipeline/stash-artifacts.sh unstash build-jvm-gpu lib/libxgboost4j.so
222+ python3 ops/pipeline/manage-artifacts.py download \
223+ --s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
224+ --prefix cache/${{ github.run_id }}/build-jvm-gpu \
225+ --dest-dir lib \
226+ libxgboost4j.so
247227 - run : bash ops/pipeline/test-jvm-gpu.sh
248228 env :
249229 SCALA_VERSION : ${{ matrix.scala_version }}
@@ -273,13 +253,15 @@ jobs:
273253 - uses : actions/checkout@v4
274254 with :
275255 submodules : " true"
276- - name : Fetch container from cache
277- run : bash ops/docker_build .sh ${{ matrix.variant.container_id }}
256+ - name : Log into Docker registry (AWS ECR)
257+ run : bash ops/pipeline/login-docker-registry .sh
278258 - name : Unstash files
279259 run : |
280- bash ops/pipeline/stash-artifacts.sh \
281- unstash ${{ matrix.variant.artifact_from }} \
282- lib/libxgboost4j.so
260+ python3 ops/pipeline/manage-artifacts.py download \
261+ --s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
262+ --prefix cache/${{ github.run_id }}/${{ matrix.variant.artifact_from }} \
263+ --dest-dir lib \
264+ libxgboost4j.so
283265 ls -lh lib/libxgboost4j.so
284266 - name : Deploy JVM packages to S3
285267 run : |
0 commit comments