[CI] Use bash -l {0} as the default in GitHub Actions (#8741)
This commit is contained in:
parent
0d8248ddcd
commit
16ef016ba7
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@ -66,6 +66,9 @@ jobs:
|
|||||||
c-api-demo:
|
c-api-demo:
|
||||||
name: Test installing XGBoost lib + building the C API demo
|
name: Test installing XGBoost lib + building the C API demo
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -l {0}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -82,13 +85,11 @@ jobs:
|
|||||||
environment-name: cpp_test
|
environment-name: cpp_test
|
||||||
environment-file: tests/ci_build/conda_env/cpp_test.yml
|
environment-file: tests/ci_build/conda_env/cpp_test.yml
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
|
|
||||||
- name: Build and install XGBoost static library
|
- name: Build and install XGBoost static library
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
@ -96,7 +97,6 @@ jobs:
|
|||||||
ninja -v install
|
ninja -v install
|
||||||
cd -
|
cd -
|
||||||
- name: Build and run C API demo with static
|
- name: Build and run C API demo with static
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pushd .
|
pushd .
|
||||||
cd demo/c-api/
|
cd demo/c-api/
|
||||||
@ -110,14 +110,12 @@ jobs:
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
- name: Build and install XGBoost shared library
|
- name: Build and install XGBoost shared library
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DBUILD_STATIC_LIB=OFF -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -GNinja
|
cmake .. -DBUILD_STATIC_LIB=OFF -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -GNinja
|
||||||
ninja -v install
|
ninja -v install
|
||||||
cd -
|
cd -
|
||||||
- name: Build and run C API demo with shared
|
- name: Build and run C API demo with shared
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pushd .
|
pushd .
|
||||||
cd demo/c-api/
|
cd demo/c-api/
|
||||||
|
|||||||
26
.github/workflows/python_tests.yml
vendored
26
.github/workflows/python_tests.yml
vendored
@ -5,6 +5,10 @@ on: [push, pull_request]
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -l {0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
python-mypy-lint:
|
python-mypy-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -23,20 +27,16 @@ jobs:
|
|||||||
environment-name: 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}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
python tests/ci_build/lint_python.py --format=0 --type-check=1 --pylint=0
|
python tests/ci_build/lint_python.py --format=0 --type-check=1 --pylint=0
|
||||||
- name: Run formatter
|
- name: Run formatter
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
python tests/ci_build/lint_python.py --format=1 --type-check=0 --pylint=0
|
python tests/ci_build/lint_python.py --format=1 --type-check=0 --pylint=0
|
||||||
- name: Run pylint
|
- name: Run pylint
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
python tests/ci_build/lint_python.py --format=0 --type-check=0 --pylint=1
|
python tests/ci_build/lint_python.py --format=0 --type-check=0 --pylint=1
|
||||||
|
|
||||||
@ -58,12 +58,10 @@ jobs:
|
|||||||
environment-name: sdist_test
|
environment-name: sdist_test
|
||||||
environment-file: tests/ci_build/conda_env/sdist_test.yml
|
environment-file: tests/ci_build/conda_env/sdist_test.yml
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
- name: Build and install XGBoost
|
- name: Build and install XGBoost
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
cd python-package
|
cd python-package
|
||||||
python --version
|
python --version
|
||||||
@ -95,12 +93,10 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
activate-environment: test
|
activate-environment: test
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
- name: Build and install XGBoost
|
- name: Build and install XGBoost
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
cd python-package
|
cd python-package
|
||||||
python --version
|
python --version
|
||||||
@ -131,13 +127,11 @@ jobs:
|
|||||||
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
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
|
|
||||||
- name: Build XGBoost on macos
|
- name: Build XGBoost on macos
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
brew install ninja
|
brew install ninja
|
||||||
|
|
||||||
@ -150,19 +144,16 @@ jobs:
|
|||||||
ninja
|
ninja
|
||||||
|
|
||||||
- name: Install Python package
|
- name: Install Python package
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
cd python-package
|
cd python-package
|
||||||
python --version
|
python --version
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
|
||||||
- name: Test Python package
|
- name: Test Python package
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pytest -s -v -rxXs --durations=0 ./tests/python
|
pytest -s -v -rxXs --durations=0 ./tests/python
|
||||||
|
|
||||||
- name: Test Dask Interface
|
- name: Test Dask Interface
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pytest -s -v -rxXs --durations=0 ./tests/test_distributed/test_with_dask
|
pytest -s -v -rxXs --durations=0 ./tests/test_distributed/test_with_dask
|
||||||
|
|
||||||
@ -188,13 +179,11 @@ jobs:
|
|||||||
environment-file: tests/ci_build/conda_env/win64_cpu_test.yml
|
environment-file: tests/ci_build/conda_env/win64_cpu_test.yml
|
||||||
|
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
|
|
||||||
- name: Build XGBoost on Windows
|
- name: Build XGBoost on Windows
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
mkdir build_msvc
|
mkdir build_msvc
|
||||||
cd build_msvc
|
cd build_msvc
|
||||||
@ -202,7 +191,6 @@ jobs:
|
|||||||
cmake --build . --config Release --parallel $(nproc)
|
cmake --build . --config Release --parallel $(nproc)
|
||||||
|
|
||||||
- name: Install Python package
|
- name: Install Python package
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
cd python-package
|
cd python-package
|
||||||
python --version
|
python --version
|
||||||
@ -210,7 +198,6 @@ jobs:
|
|||||||
pip install ./dist/*.whl
|
pip install ./dist/*.whl
|
||||||
|
|
||||||
- name: Test Python package
|
- name: Test Python package
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pytest -s -v -rxXs --durations=0 ./tests/python
|
pytest -s -v -rxXs --durations=0 ./tests/python
|
||||||
|
|
||||||
@ -236,13 +223,11 @@ jobs:
|
|||||||
environment-file: tests/ci_build/conda_env/linux_cpu_test.yml
|
environment-file: tests/ci_build/conda_env/linux_cpu_test.yml
|
||||||
|
|
||||||
- name: Display Conda env
|
- name: Display Conda env
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
conda info
|
conda info
|
||||||
conda list
|
conda list
|
||||||
|
|
||||||
- name: Build XGBoost on Ubuntu
|
- name: Build XGBoost on Ubuntu
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
@ -250,19 +235,16 @@ jobs:
|
|||||||
ninja
|
ninja
|
||||||
|
|
||||||
- name: Install Python package
|
- name: Install Python package
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
cd python-package
|
cd python-package
|
||||||
python --version
|
python --version
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
|
||||||
- name: Test Python package
|
- name: Test Python package
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pytest -s -v -rxXs --durations=0 ./tests/python
|
pytest -s -v -rxXs --durations=0 ./tests/python
|
||||||
|
|
||||||
- name: Test Dask Interface
|
- name: Test Dask Interface
|
||||||
shell: bash -l {0}
|
|
||||||
run: |
|
run: |
|
||||||
pytest -s -v -rxXs --durations=0 ./tests/test_distributed/test_with_dask
|
pytest -s -v -rxXs --durations=0 ./tests/test_distributed/test_with_dask
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user