Next-generation CI/CD pipelines with RunsOn #11013
Workflow file for this run
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 (Python tests) | |
on: [push, pull_request] | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
defaults: | |
run: | |
shell: bash -l {0} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
python-sdist-test: | |
runs-on: ${{ matrix.os }} | |
name: Test installing Python XGBoost from the source distribution (${{ matrix.os }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Miniforge3 | |
miniforge-version: latest | |
activate-environment: sdist_test | |
environment-file: ops/conda_env/sdist_test.yml | |
use-mamba: true | |
- name: Display Conda env | |
run: | | |
conda info | |
conda list | |
- name: Install extra package for MacOS | |
run: | | |
mamba install -c conda-forge llvm-openmp | |
if: matrix.os == 'macos-13' | |
- name: Build and install XGBoost | |
run: bash ops/pipeline/test-python-sdist.sh | |
python-tests-on-macos: | |
name: Test XGBoost Python package on macos-13 | |
runs-on: macos-13 | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Miniforge3 | |
miniforge-version: latest | |
activate-environment: macos_cpu_test | |
environment-file: ops/conda_env/macos_cpu_test.yml | |
use-mamba: true | |
- name: Display Conda env | |
run: | | |
conda info | |
conda list | |
- run: bash ops/pipeline/test-python-macos.sh | |
python-system-installation-on-ubuntu: | |
name: Test XGBoost Python package System Installation on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- run: bash ops/pipeline/test-python-with-sysprefix.sh |