Move sdist test to action. (#6635)

* Move x86 linux and osx sdist test to action.

* Add Windows.
This commit is contained in:
Jiaming Yuan
2021-01-26 08:25:59 +08:00
committed by GitHub
parent 740d042255
commit d19a0ddacf
2 changed files with 41 additions and 8 deletions

View File

@@ -59,6 +59,45 @@ jobs:
cd build
ctest --extra-verbose
python-sdist-test:
name: Test installing XGBoost Python source package
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-10.15, windows-latest]
python-version: ["3.8"]
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install osx system dependencies
if: matrix.os == 'macos-10.15'
run: |
brew install ninja libomp
- name: Install Ubuntu system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y --no-install-recommends ninja-build
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
- name: Display Conda env
shell: bash -l {0}
run: |
conda info
conda list
- name: Build and install XGBoost
shell: bash -l {0}
run: |
cd python-package
python --version
python setup.py sdist
pip install -v ./dist/xgboost-*.tar.gz
cd ..
python -c 'import xgboost'
c-api-demo:
name: Test installing XGBoost lib + building the C API demo
runs-on: ${{ matrix.os }}
@@ -78,6 +117,7 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
- name: Display Conda env
shell: bash -l {0}
run: |
@@ -222,7 +262,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.8'
architecture: 'x64'
- name: Install system packages
run: |