Replace stash-artifacts.{sh,py} -> manage-artifacts.py #1125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-cuda: | |
name: Build CUDA + manylinux_2_28_x86_64 wheel | |
runs-on: | |
- runs-on=${{ github.run_id }} | |
- runner=linux-amd64-cpu | |
- tag=main-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: Log into Docker registry (AWS ECR) | |
run: bash ops/pipeline/login-docker-registry.sh | |
- run: bash ops/pipeline/build-cuda.sh | |
- name: Stash files | |
run: | | |
python3 ops/pipeline/manage-artifacts.py upload \ | |
--s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \ | |
--prefix cache/${{ github.run_id }}/build-cuda \ | |
build/testxgboost ./xgboost python-package/dist/*.whl | |
test-cpp-gpu: | |
name: >- | |
Run Google Tests with GPUs | |
(Suite ${{ matrix.suite }}, Runner ${{ matrix.runner }}) | |
needs: [build-cuda] | |
runs-on: | |
- runs-on | |
- runner=${{ matrix.runner }} | |
- run-id=${{ github.run_id }} | |
- tag=main-test-cpp-gpu-${{ matrix.suite }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- suite: gpu | |
runner: linux-amd64-gpu | |
artifact_from: build-cuda | |
- 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: Log into Docker registry (AWS ECR) | |
run: bash ops/pipeline/login-docker-registry.sh | |
- name: Unstash gtest | |
run: | | |
python3 ops/pipeline/manage-artifacts.py download \ | |
--s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \ | |
--prefix cache/${{ github.run_id }}/${{ matrix.artifact_from }} \ | |
--dest-dir . \ | |
build/testxgboost | |
chmod +x build/testxgboost | |
- run: bash ops/pipeline/test-cpp-gpu.sh ${{ matrix.suite }} | |
test-python-wheel: | |
name: Run Python tests (${{ matrix.description }}) | |
needs: [build-cuda] | |
runs-on: | |
- runs-on | |
- runner=${{ matrix.runner }} | |
- run-id=${{ github.run_id }} | |
- tag=main-test-python-wheel-${{ matrix.description }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- description: single-gpu | |
container: xgb-ci.gpu | |
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 | |
steps: | |
# Restart Docker daemon so that it recognizes the ephemeral disks | |
- run: sudo systemctl restart docker | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- name: Log into Docker registry (AWS ECR) | |
run: bash ops/pipeline/login-docker-registry.sh | |
- name: Unstash Python wheel | |
run: | | |
python3 ops/pipeline/manage-artifacts.py download \ | |
--s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \ | |
--prefix cache/${{ github.run_id }}/${{ matrix.artifact_from }} \ | |
--dest-dir . \ | |
python-package/dist/*.whl ./xgboost | |
chmod +x ./xgboost | |
- name: Run Python tests, ${{ matrix.description }} | |
run: bash ops/pipeline/test-python-wheel.sh ${{ matrix.suite }} ${{ matrix.container }} |