[CI] Revise R tests. (#8430)
- Use the standard package check (check on the tarball instead of the source tree). - Run commands in parallel. - Cleanup dependencies installation. - Replace makefile. - Documentation. - Test using the image from rhub.
This commit is contained in:
@@ -503,10 +503,3 @@ XGBoost uses `Sphinx <https://www.sphinx-doc.org/en/stable/>`_ for documentation
|
||||
Checkout the ``requirements.txt`` file under ``doc/``
|
||||
|
||||
Under ``xgboost/doc`` directory, run ``make <format>`` with ``<format>`` replaced by the format you want. For a list of supported formats, run ``make help`` under the same directory.
|
||||
|
||||
*********
|
||||
Makefiles
|
||||
*********
|
||||
|
||||
It's only used for creating shorthands for running linters, performing packaging tasks
|
||||
etc. So the remaining makefiles are legacy.
|
||||
|
||||
@@ -39,12 +39,6 @@ Code Style
|
||||
- This is mainly to be consistent with the rest of the project.
|
||||
- Another reason is we will be able to check style automatically with a linter.
|
||||
|
||||
- You can check the style of the code by typing the following command at root folder.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make rcpplint
|
||||
|
||||
- When needed, you can disable the linter warning of certain line with ``// NOLINT(*)`` comments.
|
||||
- We use `roxygen <https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html>`_ for documenting the R package.
|
||||
|
||||
@@ -79,6 +73,7 @@ The following steps are followed to add a new Rmarkdown vignettes:
|
||||
|
||||
The reason we do this is to avoid exploded repo size due to generated images.
|
||||
|
||||
|
||||
R package versioning
|
||||
====================
|
||||
See :ref:`release`.
|
||||
@@ -89,6 +84,11 @@ According to `R extension manual <https://cran.r-project.org/doc/manuals/r-relea
|
||||
it is good practice to register native routines and to disable symbol search. When any changes or additions are made to the
|
||||
C++ interface of the R package, please make corresponding changes in ``src/init.c`` as well.
|
||||
|
||||
Generating the Package and Running Tests
|
||||
========================================
|
||||
|
||||
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.
|
||||
|
||||
*********************************
|
||||
Running Formatting Checks Locally
|
||||
*********************************
|
||||
|
||||
Reference in New Issue
Block a user