parent
488f12a996
commit
820e1c01ef
66
.github/workflows/python_tests.yml
vendored
66
.github/workflows/python_tests.yml
vendored
@ -45,13 +45,59 @@ jobs:
|
|||||||
cd ..
|
cd ..
|
||||||
python -c 'import xgboost'
|
python -c 'import xgboost'
|
||||||
|
|
||||||
python-tests:
|
python-tests-on-win:
|
||||||
name: Test XGBoost Python package on ${{ matrix.config.os }}
|
name: Test XGBoost Python package on ${{ matrix.config.os }}
|
||||||
runs-on: ${{ matrix.config.os }}
|
runs-on: ${{ matrix.config.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {os: windows-2016, python-version: '3.8'}
|
- {os: windows-2016, python-version: '3.8'}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
|
- uses: conda-incubator/setup-miniconda@v2
|
||||||
|
with:
|
||||||
|
auto-update-conda: true
|
||||||
|
python-version: ${{ matrix.config.python-version }}
|
||||||
|
activate-environment: win64_env
|
||||||
|
environment-file: tests/ci_build/conda_env/win64_cpu_test.yml
|
||||||
|
|
||||||
|
- name: Display Conda env
|
||||||
|
shell: bash -l {0}
|
||||||
|
run: |
|
||||||
|
conda info
|
||||||
|
conda list
|
||||||
|
|
||||||
|
- name: Build XGBoost on Windows
|
||||||
|
shell: bash -l {0}
|
||||||
|
run: |
|
||||||
|
mkdir build_msvc
|
||||||
|
cd build_msvc
|
||||||
|
cmake .. -G"Visual Studio 15 2017" -DCMAKE_CONFIGURATION_TYPES="Release" -A x64 -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON
|
||||||
|
cmake --build . --config Release --parallel $(nproc)
|
||||||
|
|
||||||
|
- name: Install Python package
|
||||||
|
shell: bash -l {0}
|
||||||
|
run: |
|
||||||
|
cd python-package
|
||||||
|
python --version
|
||||||
|
python setup.py bdist_wheel --universal
|
||||||
|
pip install ./dist/*.whl
|
||||||
|
|
||||||
|
- name: Test Python package
|
||||||
|
shell: bash -l {0}
|
||||||
|
run: |
|
||||||
|
pytest -s -v ./tests/python
|
||||||
|
|
||||||
|
python-tests-on-macos:
|
||||||
|
name: Test XGBoost Python package on ${{ matrix.config.os }}
|
||||||
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
- {os: macos-10.15, python-version "3.8" }
|
- {os: macos-10.15, python-version "3.8" }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -63,8 +109,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
auto-update-conda: true
|
auto-update-conda: true
|
||||||
python-version: ${{ matrix.config.python-version }}
|
python-version: ${{ matrix.config.python-version }}
|
||||||
activate-environment: win64_test
|
activate-environment: macos_test
|
||||||
environment-file: tests/ci_build/conda_env/win64_cpu_test.yml
|
environment-file: tests/ci_build/conda_env/macos_cpu_test.yml
|
||||||
|
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
shell: bash -l {0}
|
||||||
@ -72,17 +118,7 @@ jobs:
|
|||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
|
|
||||||
- name: Build XGBoost on Windows
|
|
||||||
shell: bash -l {0}
|
|
||||||
if: matrix.config.os == 'windows-2016'
|
|
||||||
run: |
|
|
||||||
mkdir build_msvc
|
|
||||||
cd build_msvc
|
|
||||||
cmake .. -G"Visual Studio 15 2017" -DCMAKE_CONFIGURATION_TYPES="Release" -A x64 -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON
|
|
||||||
cmake --build . --config Release --parallel $(nproc)
|
|
||||||
|
|
||||||
- name: Build XGBoost on macos
|
- name: Build XGBoost on macos
|
||||||
if: matrix.config.os == 'macos-10.15'
|
|
||||||
run: |
|
run: |
|
||||||
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb)
|
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb)
|
||||||
brew install ninja libomp
|
brew install ninja libomp
|
||||||
@ -108,15 +144,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Rename Python wheel
|
- name: Rename Python wheel
|
||||||
shell: bash -l {0}
|
shell: bash -l {0}
|
||||||
if: matrix.config.os == 'macos-10.15'
|
|
||||||
run: |
|
run: |
|
||||||
TAG=macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64
|
TAG=macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64
|
||||||
python tests/ci_build/rename_whl.py python-package/dist/*.whl ${{ github.sha }} ${TAG}
|
python tests/ci_build/rename_whl.py python-package/dist/*.whl ${{ github.sha }} ${TAG}
|
||||||
|
|
||||||
- name: Upload Python wheel
|
- name: Upload Python wheel
|
||||||
shell: bash -l {0}
|
shell: bash -l {0}
|
||||||
if: |
|
if: (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_'))
|
||||||
(github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')) && matrix.config.os == 'macos-10.15'
|
|
||||||
run: |
|
run: |
|
||||||
python -m awscli s3 cp python-package/dist/*.whl s3://xgboost-nightly-builds/${{ steps.extract_branch.outputs.branch }}/ --acl public-read
|
python -m awscli s3 cp python-package/dist/*.whl s3://xgboost-nightly-builds/${{ steps.extract_branch.outputs.branch }}/ --acl public-read
|
||||||
env:
|
env:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
name: cpu_test
|
name: macos_test
|
||||||
channels:
|
channels:
|
||||||
- conda-forge
|
- conda-forge
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user