"include/LightGBM/vscode:/vscode.git/clone" did not exist on "e02ddc445481b79b38de4fc44ff542af032c44cc"
Unverified Commit 4a60a53c authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] [R-package] remove code for 'rchk' checks (#6545)

* [ci] [R-package] re-enable 'rchk' checks

* comment out most CI

* it would be helpful to actually enable rchk

* remove all Rf_unprotect() calls to try to trigger failure

* try removing some Rf_protect() calls

* revert CI changes

* just remove rchk

* revert whitespace changes
parent 9b351e6e
......@@ -142,7 +142,7 @@ else # Linux
fi
fi
if [[ "${TASK}" != "r-package" ]] && [[ "${TASK}" != "r-rchk" ]]; then
if [[ "${TASK}" != "r-package" ]]; then
if [[ $SETUP_CONDA != "false" ]]; then
curl \
-sL \
......
......@@ -125,12 +125,7 @@ Rscript --vanilla -e "install.packages('https://cran.r-project.org/src/contrib/A
# Manually install Depends and Imports libraries + 'knitr', 'markdown', 'RhpcBLASctl', 'testthat'
# to avoid a CI-time dependency on devtools (for devtools::install_deps())
# NOTE: testthat is not required when running rchk
if [[ "${TASK}" == "r-rchk" ]]; then
packages="c('data.table', 'jsonlite', 'knitr', 'markdown', 'R6', 'RhpcBLASctl')"
else
packages="c('data.table', 'jsonlite', 'knitr', 'markdown', 'R6', 'RhpcBLASctl', 'testthat')"
fi
packages="c('data.table', 'jsonlite', 'knitr', 'markdown', 'R6', 'RhpcBLASctl', 'testthat')"
compile_from_source="both"
if [[ $OS_NAME == "macos" ]]; then
packages+=", type = 'binary'"
......@@ -166,28 +161,6 @@ elif [[ $R_BUILD_TYPE == "cran" ]]; then
./build-cran-package.sh || exit 1
if [[ "${TASK}" == "r-rchk" ]]; then
echo "Checking R-package with rchk"
mkdir -p packages
cp "${PKG_TARBALL}" packages
RCHK_LOG_FILE="rchk-logs.txt"
docker run \
-v "$(pwd)/packages:/rchk/packages" \
kalibera/rchk:latest \
"/rchk/packages/${PKG_TARBALL}" \
> "${RCHK_LOG_FILE}" 2>&1 \
|| (cat ${RCHK_LOG_FILE} && exit 1)
cat ${RCHK_LOG_FILE}
# the exceptions below are from R itself and not LightGBM:
# https://github.com/kalibera/rchk/issues/22#issuecomment-656036156
exit "$(
grep "${RCHK_LOG_FILE}" -v "in function strptime_internal" \
| grep -v "in function RunGenCollect" \
| grep --count -E '\[PB\]|ERROR'
)"
fi
# Test CRAN source .tar.gz in a directory that is not this repo or below it.
# When people install.packages('lightgbm'), they won't have the LightGBM
# git repo around. This is to protect against the use of relative paths
......
......@@ -42,7 +42,7 @@ else
export MACOSX_DEPLOYMENT_TARGET=12.0
fi
if [[ "${TASK}" == "r-package" ]] || [[ "${TASK}" == "r-rchk" ]]; then
if [[ "${TASK}" == "r-package" ]]; then
bash "${BUILD_DIRECTORY}/.ci/test-r-package.sh" || exit 1
exit 0
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment