Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [CI] Add noLD test * Make noLD test only trigger with a PR comment * [CI] Don't install stringi * Add the Titanic example as a unit test * Document trigger * add to index * Clarify that it needs to be a review comment
- Loading branch information
Showing
6 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Run R tests with noLD R. Only triggered by a pull request review | ||
# See discussion at https://github.com/dmlc/xgboost/pull/6378 | ||
|
||
name: XGBoost-R-noLD | ||
|
||
on: | ||
pull_request_review_comment: | ||
types: [created] | ||
|
||
env: | ||
R_PACKAGES: c('XML', 'igraph', 'data.table', 'magrittr', 'ggplot2', 'DiagrammeR', 'Ckmeans.1d.dp', 'vcd', 'testthat', 'lintr', 'knitr', 'rmarkdown', 'e1071', 'cplm', 'devtools', 'float', 'titanic') | ||
|
||
jobs: | ||
test-R-noLD: | ||
if: github.event.comment.body == '/gha run r-nold-test' && contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association) | ||
timeout-minutes: 120 | ||
runs-on: ubuntu-latest | ||
container: rhub/debian-gcc-devel-nold | ||
steps: | ||
- name: Install git and system packages | ||
shell: bash | ||
run: | | ||
apt-get update && apt-get install -y git libcurl4-openssl-dev libssl-dev libssh2-1-dev libgit2-dev libxml2-dev | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
cat > install_libs.R <<EOT | ||
install.packages(${{ env.R_PACKAGES }}, | ||
repos = 'http://cloud.r-project.org', | ||
dependencies = c('Depends', 'Imports', 'LinkingTo')) | ||
EOT | ||
/tmp/R-devel/bin/Rscript install_libs.R | ||
- name: Run R tests | ||
shell: bash | ||
run: | | ||
cd R-package && \ | ||
/tmp/R-devel/bin/R CMD INSTALL . && \ | ||
/tmp/R-devel/bin/R -q -e "library(testthat); setwd('tests'); source('testthat.R')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,8 @@ Suggests: | |
igraph (>= 1.0.1), | ||
jsonlite, | ||
float, | ||
crayon | ||
crayon, | ||
titanic | ||
Depends: | ||
R (>= 3.3.0) | ||
Imports: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#################################### | ||
Automated testing in XGBoost project | ||
#################################### | ||
|
||
This document collects tips for using the Continuous Integration (CI) service of the XGBoost | ||
project. | ||
|
||
**Contents** | ||
|
||
.. contents:: | ||
:backlinks: none | ||
:local: | ||
|
||
************** | ||
GitHub Actions | ||
************** | ||
The configuration files are located under the directory | ||
`.github/workflows <https://github.com/dmlc/xgboost/tree/master/.github/workflows>`_. | ||
|
||
Most of the tests listed in the configuration files run automatically for every incoming pull | ||
requests and every update to branches. A few tests however require manual activation: | ||
|
||
* R tests with ``noLD`` option: Run R tests using a custom-built R with compilation flag | ||
``--disable-long-double``. See `this page <https://blog.r-hub.io/2019/05/21/nold/>`_ for more | ||
details about noLD. This is a requirement for keeping XGBoost on CRAN (the R package index). | ||
To invoke this test suite for a particular pull request, simply add a review comment | ||
``/gha run r-nold-test``. (Ordinary comment won't work. It needs to be a review comment.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters