Skip to content

Commit a8a8c6a

Browse files
committed
Document CI
1 parent 7540203 commit a8a8c6a

File tree

8 files changed

+256
-126
lines changed

8 files changed

+256
-126
lines changed

.github/workflows/update_rapids.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
if: github.ref == 'refs/heads/master'
3737
with:
3838
add-paths: |
39-
tests/buildkite
39+
ops/docker
4040
branch: create-pull-request/update-rapids
4141
base: master
4242
title: "[CI] Update RAPIDS to latest stable"

dev/release-artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def make_python_sdist(
123123
with DirectoryExcursion(ROOT):
124124
with open("python-package/pyproject.toml", "r") as f:
125125
orig_pyproj_lines = f.read()
126-
with open("tests/buildkite/remove_nccl_dep.patch", "r") as f:
126+
with open("ops/patch/remove_nccl_dep.patch", "r") as f:
127127
patch_lines = f.read()
128128
subprocess.run(
129129
["patch", "-p0"], input=patch_lines, check=True, text=True, encoding="utf-8"

doc/contrib/ci.rst

Lines changed: 239 additions & 110 deletions
Large diffs are not rendered by default.

doc/contrib/coding_guide.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ C++ interface of the R package, please make corresponding changes in ``src/init.
107107
Generating the Package and Running Tests
108108
========================================
109109

110-
The source layout of XGBoost is a bit unusual to normal R packages as XGBoost is primarily written in C++ with multiple language bindings in mind. As a result, some special cares need to be taken to generate a standard R tarball. Most of the tests are being run on CI, and as a result, the best way to see how things work is by looking at the CI configuration files (GitHub action, at the time of writing). There are helper scripts in ``tests/ci_build`` and ``R-package/tests/helper_scripts`` for running various checks including linter and making the standard tarball.
110+
The source layout of XGBoost is a bit unusual to normal R packages as XGBoost is primarily written in C++ with multiple language bindings in mind. As a result, some special cares need to be taken to generate a standard R tarball. Most of the tests are being run on CI, and as a result, the best way to see how things work is by looking at the CI configuration files (GitHub action, at the time of writing). There are helper scripts in ``ops/script`` and ``R-package/tests/helper_scripts`` for running various checks including linter and making the standard tarball.
111111

112112
*********************************
113113
Running Formatting Checks Locally
@@ -127,29 +127,29 @@ To run checks for Python locally, install the checkers mentioned previously and
127127
.. code-block:: bash
128128
129129
cd /path/to/xgboost/
130-
python ./tests/ci_build/lint_python.py --fix
130+
python ./ops/script/lint_python.py --fix
131131
132132
To run checks for R:
133133

134134
.. code-block:: bash
135135
136136
cd /path/to/xgboost/
137137
R CMD INSTALL R-package/
138-
Rscript tests/ci_build/lint_r.R $(pwd)
138+
Rscript ops/script/lint_r.R $(pwd)
139139
140140
To run checks for cpplint locally:
141141

142142
.. code-block:: bash
143143
144144
cd /path/to/xgboost/
145-
python ./tests/ci_build/lint_cpp.py
145+
python ./ops/script/lint_cpp.py
146146
147147
148148
See next section for clang-tidy. For CMake scripts:
149149

150150
.. code-block:: bash
151151
152-
bash ./tests/ci_build/lint_cmake.sh
152+
bash ./ops/script/lint_cmake.sh
153153
154154
Lastly, the linter for jvm-packages is integrated into the maven build process.
155155

@@ -163,21 +163,21 @@ To run this check locally, run the following command from the top level source t
163163
.. code-block:: bash
164164
165165
cd /path/to/xgboost/
166-
python3 tests/ci_build/tidy.py
166+
python3 ops/script/run_clang_tidy.py
167167
168168
Also, the script accepts two optional integer arguments, namely ``--cpp`` and ``--cuda``. By default they are both set to 1, meaning that both C++ and CUDA code will be checked. If the CUDA toolkit is not installed on your machine, you'll encounter an error. To exclude CUDA source from linting, use:
169169

170170
.. code-block:: bash
171171
172172
cd /path/to/xgboost/
173-
python3 tests/ci_build/tidy.py --cuda=0
173+
python3 ops/script/run_clang_tidy.py --cuda=0
174174
175175
Similarly, if you want to exclude C++ source from linting:
176176

177177
.. code-block:: bash
178178
179179
cd /path/to/xgboost/
180-
python3 tests/ci_build/tidy.py --cpp=0
180+
python3 ops/script/run_clang_tidy.py --cpp=0
181181
182182
**********************************
183183
Guide for handling user input data

doc/contrib/donate.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ DMLC/XGBoost has grown from a research project incubated in academia to one of t
1313

1414
A robust and efficient **continuous integration (CI)** infrastructure is one of the most critical solutions to address the above challenge. A CI service will monitor an open-source repository and run a suite of integration tests for every incoming contribution. This way, the CI ensures that every proposed change in the codebase is compatible with existing functionalities. Furthermore, XGBoost can enable more thorough tests with a powerful CI infrastructure to cover cases which are closer to the production environment.
1515

16-
There are several CI services available free to open source projects, such as Travis CI and AppVeyor. The XGBoost project already utilizes GitHub Actions. However, the XGBoost project has needs that these free services do not adequately address. In particular, the limited usage quota of resources such as CPU and memory leaves XGBoost developers unable to bring "too-intensive" tests. In addition, they do not offer test machines with GPUs for testing XGBoost-GPU code base which has been attracting more and more interest across many organizations. Consequently, the XGBoost project uses a cloud-hosted test farm. We use `BuildKite <https://buildkite.com/xgboost>`_ to organize CI pipelines.
16+
There are several CI services available free to open source projects, such as Travis CI and AppVeyor. The XGBoost project already utilizes GitHub Actions. However, the XGBoost project has needs that these free services do not adequately address. In particular, the limited usage quota of resources such as CPU and memory leaves XGBoost developers unable to bring "too-intensive" tests. In addition, they do not offer test machines with GPUs for testing XGBoost-GPU code base which has been attracting more and more interest across many organizations. Consequently, the XGBoost project uses a cloud-hosted test farm. We host `Amazon Web Services (AWS) <https://aws.amazon.com/>`_ to host the test machines, along with `GitHub Actions <https://github.com/features/actions>`_ and `RunsOn <https://runs-on.com/>`_ (SaaS app) to organize the CI pipelines.
1717

18-
The cloud-hosted test farm has recurring operating expenses. It utilizes a leading cloud provider (AWS) to accommodate variable workload. BuildKite launches worker machines on AWS on demand, to run the test suite on incoming contributions. To save cost, the worker machines are terminated when they are no longer needed.
18+
The cloud-hosted test farm has recurring operating expenses. RunsOn launches worker machines on AWS on demand to run the test suite on incoming contributions. To save cost, the worker machines are terminated when they are no longer needed.
1919

2020
To help defray the hosting cost, the XGBoost project seeks donations from third parties.
2121

@@ -29,9 +29,9 @@ The Project Management Committee (PMC) of the XGBoost project appointed `Open So
2929

3030
All expenses incurred for hosting CI will be submitted to the fiscal host with receipts. Only the expenses in the following categories will be approved for reimbursement:
3131

32-
* Cloud expenses for the cloud test farm (https://buildkite.com/xgboost)
32+
* Cloud expenses for the cloud test farm
3333
* Cost of domain https://xgboost-ci.net
34-
* Monthly cost of using BuildKite
34+
* Annual subscription for RunsOn
3535
* Hosting cost of the User Forum (https://discuss.xgboost.ai)
3636

3737
Administration of cloud CI infrastructure

doc/contrib/release.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Making a Release
1717
-----------------
1818

1919
1. Create an issue for the release, noting the estimated date and expected features or major fixes, pin that issue.
20-
2. Create a release branch if this is a major release. Bump release version. There's a helper script ``tests/ci_build/change_version.py``.
20+
2. Create a release branch if this is a major release. Bump release version. There's a helper script ``ops/script/change_version.py``.
2121
3. Commit the change, create a PR on GitHub on release branch. Port the bumped version to default branch, optionally with the postfix ``SNAPSHOT``.
2222
4. Create a tag on release branch, either on GitHub or locally.
2323
5. Make a release on GitHub tag page, which might be done with previous step if the tag is created on GitHub.

doc/contrib/unit_tests.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Run
6363

6464
.. code-block:: bash
6565
66-
python ./tests/ci_build/test_r_package.py --task=check
66+
python ./ops/script/test_r_package.py --task=check
6767
6868
at the root of the project directory. The command builds and checks the XGBoost
6969
r-package. Alternatively, if you want to just run the tests, you can use the following

ops/pipeline/test-python-wheel.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ else
1919
gpu_option=""
2020
fi
2121

22+
set -x
2223
python3 ops/docker_run.py --container-id "${container_id}" ${gpu_option} \
2324
--run-args='--shm-size=4g' \
2425
-- bash ops/pipeline/test-python-wheel-impl.sh "${suite}"

0 commit comments

Comments
 (0)