[CI] Cleanup github action tests. (#8397)
- Merge doxygen build with sphinx. - Use mamba on non-windows Github Action.
This commit is contained in:
parent
7174d60ed2
commit
2ed3c29c8a
53
.github/workflows/main.yml
vendored
53
.github/workflows/main.yml
vendored
@ -130,7 +130,7 @@ jobs:
|
|||||||
./tests/ci_build/verify_link.sh ./demo/c-api/build/basic/api-demo
|
./tests/ci_build/verify_link.sh ./demo/c-api/build/basic/api-demo
|
||||||
./tests/ci_build/verify_link.sh ./demo/c-api/build/external-memory/external-memory-demo
|
./tests/ci_build/verify_link.sh ./demo/c-api/build/external-memory/external-memory-demo
|
||||||
|
|
||||||
lint:
|
cpp-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Code linting for C++
|
name: Code linting for C++
|
||||||
steps:
|
steps:
|
||||||
@ -148,43 +148,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
LINT_LANG=cpp make lint
|
LINT_LANG=cpp make lint
|
||||||
|
|
||||||
doxygen:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Generate C/C++ API doc using Doxygen
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'true'
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: "3.8"
|
|
||||||
architecture: 'x64'
|
|
||||||
- name: Install system packages
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y --no-install-recommends doxygen graphviz ninja-build
|
|
||||||
python -m pip install wheel setuptools
|
|
||||||
python -m pip install awscli
|
|
||||||
- name: Run Doxygen
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. -DBUILD_C_DOC=ON -GNinja
|
|
||||||
ninja -v doc_doxygen
|
|
||||||
- name: Extract branch name
|
|
||||||
shell: bash
|
|
||||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
||||||
id: extract_branch
|
|
||||||
if: github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')
|
|
||||||
- name: Publish
|
|
||||||
run: |
|
|
||||||
cd build/
|
|
||||||
tar cvjf ${{ steps.extract_branch.outputs.branch }}.tar.bz2 doc_doxygen/
|
|
||||||
python -m awscli s3 cp ./${{ steps.extract_branch.outputs.branch }}.tar.bz2 s3://xgboost-docs/doxygen/ --acl public-read
|
|
||||||
if: github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')
|
|
||||||
env:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}
|
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build docs using Sphinx
|
name: Build docs using Sphinx
|
||||||
@ -198,8 +161,8 @@ jobs:
|
|||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
- name: Install system packages
|
- name: Install system packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y --no-install-recommends graphviz
|
sudo apt-get install -y --no-install-recommends graphviz doxygen ninja-build
|
||||||
python -m pip install wheel setuptools
|
python -m pip install wheel setuptools awscli
|
||||||
python -m pip install -r doc/requirements.txt
|
python -m pip install -r doc/requirements.txt
|
||||||
- name: Extract branch name
|
- name: Extract branch name
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -211,3 +174,13 @@ jobs:
|
|||||||
make -C doc html
|
make -C doc html
|
||||||
env:
|
env:
|
||||||
SPHINX_GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
|
SPHINX_GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
|
||||||
|
READTHEDOCS: "True"
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
run: |
|
||||||
|
tar cvjf ${{ steps.extract_branch.outputs.branch }}.tar.bz2 doxygen/doc_doxygen/
|
||||||
|
python -m awscli s3 cp ./${{ steps.extract_branch.outputs.branch }}.tar.bz2 s3://xgboost-docs/doxygen/ --acl public-read
|
||||||
|
if: github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}
|
||||||
|
|||||||
22
.github/workflows/python_tests.yml
vendored
22
.github/workflows/python_tests.yml
vendored
@ -12,16 +12,15 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
python-version: ["3.8"]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
- uses: conda-incubator/setup-miniconda@v2
|
- uses: mamba-org/provision-with-micromamba@main
|
||||||
with:
|
with:
|
||||||
auto-update-conda: true
|
cache-downloads: true
|
||||||
python-version: ${{ matrix.python-version }}
|
cache-env: true
|
||||||
activate-environment: python_lint
|
environment-name: python_lint
|
||||||
environment-file: tests/ci_build/conda_env/python_lint.yml
|
environment-file: tests/ci_build/conda_env/python_lint.yml
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
shell: bash -l {0}
|
||||||
@ -83,6 +82,7 @@ jobs:
|
|||||||
python-tests-on-win:
|
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 }}
|
||||||
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
@ -130,22 +130,22 @@ jobs:
|
|||||||
python-tests-on-macos:
|
python-tests-on-macos:
|
||||||
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 }}
|
||||||
timeout-minutes: 90
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {os: macos-11, python-version "3.8" }
|
- {os: macos-11}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
|
|
||||||
- uses: conda-incubator/setup-miniconda@v2
|
- uses: mamba-org/provision-with-micromamba@main
|
||||||
with:
|
with:
|
||||||
auto-update-conda: true
|
cache-downloads: true
|
||||||
python-version: ${{ matrix.config.python-version }}
|
cache-env: true
|
||||||
activate-environment: macos_test
|
environment-name: macos_test
|
||||||
environment-file: tests/ci_build/conda_env/macos_cpu_test.yml
|
environment-file: tests/ci_build/conda_env/macos_cpu_test.yml
|
||||||
|
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
|
|||||||
@ -15,7 +15,9 @@ dependencies:
|
|||||||
- distributed
|
- distributed
|
||||||
- black
|
- black
|
||||||
- isort
|
- isort
|
||||||
- pyspark
|
|
||||||
- cloudpickle
|
- cloudpickle
|
||||||
- pytest
|
- pytest
|
||||||
- hypothesis
|
- hypothesis
|
||||||
|
- pip:
|
||||||
|
# TODO: Replace it with pyspark>=3.4 once 3.4 released.
|
||||||
|
- https://ml-team-public-read.s3.us-west-2.amazonaws.com/pyspark-3.4.0.dev0.tar.gz
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user