Skip to content

Commit

Permalink
few more minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jun 26, 2020
1 parent 1437322 commit f11ef40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ if grep -q -R "WARNING" "$LOG_FILE_NAME"; then
exit -1
fi

ALLOWED_CHECK_NOTES=3
ALLOWED_CHECK_NOTES=4
NUM_CHECK_NOTES=$(
cat ${LOG_FILE_NAME} \
| grep -e '^Status: .* NOTE.*' \
Expand Down
5 changes: 2 additions & 3 deletions .ci/test_r_package_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,12 @@ Write-Output "Building R package"

# R CMD check is not used for MSVC builds
if ($env:COMPILER -ne "MSVC") {
Run-R-Code-Redirect-Stderr "commandArgs <- function(...){'--skip-install'}; source('build_r.R')"; Check-Output $?

$PKG_FILE_NAME = "lightgbm_$env:LGB_VER.tar.gz"
$LOG_FILE_NAME = "lightgbm.Rcheck/00check.log"

if ($env:R_BUILD_TYPE -eq "cmake") {
Rscript build_r.R --skip-install ; Check-Output $?
Run-R-Code-Redirect-Stderr "commandArgs <- function(...){'--skip-install'}; source('build_r.R')"; Check-Output $?
} elseif ($env:R_BUILD_TYPE -eq "cran") {
sh build-cran-package.sh ; Check-Output $?
# Test CRAN source .tar.gz in a directory that is not this repo or below it.
Expand Down Expand Up @@ -208,7 +207,7 @@ if ($env:R_BUILD_TYPE -eq "cmake") {

# Checking that we got the right toolchain for MinGW. If using MinGW, both
# MinGW and MSYS toolchains are supported
if ($env:COMPILER -eq "MINGW") {
if (($env:COMPILER -eq "MINGW") -and ($env:R_BUILD_TYPE -eq "cmake")) {
$checks = Select-String -Path "${INSTALL_LOG_FILE_NAME}" -Pattern "Trying to build with.*$env:TOOLCHAIN"
if ($checks.Matches.length -eq 0) {
Write-Output "The wrong toolchain was used. Check the build logs."
Expand Down
2 changes: 0 additions & 2 deletions build-cran-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
set -e

ORIG_WD=$(pwd)
echo "woring-dir: ${ORIG_WD}"
TEMP_R_DIR=$(pwd)/lightgbm_r
echo "temp-dir: ${TEMP_R_DIR}"

if test -d ${TEMP_R_DIR}; then
rm -r ${TEMP_R_DIR}
Expand Down

0 comments on commit f11ef40

Please sign in to comment.