Skip to content

Commit

Permalink
cut documentation stuff out of MSVC build
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Mar 31, 2020
1 parent 45adca9 commit c72265b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
11 changes: 6 additions & 5 deletions .ci/test_r_package_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ $PKG_FILE_NAME = Get-Item *.tar.gz
$LOG_FILE_NAME = "lightgbm.Rcheck/00check.log"

Write-Output "Running R CMD check"
$check_flags = "--as-cran --no-multiarch"
$env:_R_CHECK_FORCE_SUGGESTS_=0
if ($env:AZURE -eq "true") {
$check_flags = "--no-multiarch --no-manual --ignore-vignettes"
Write-Output "Running R CMD check without checking documentation"
R.exe CMD check --no-multiarch --no-manual --ignore-vignettes ; Check-Output $?
} else {
Write-Output "Running R CMD check as CRAN"
R.exe CMD check --no-multiarch --as-cran ${PKG_FILE_NAME} ; Check-Output $?
}
Write-Output "using check flags '$check_flags'"
$env:_R_CHECK_FORCE_SUGGESTS_=0
R.exe CMD check "${PKG_FILE_NAME}" $check_flags ; Check-Output $?

Write-Output "Looking for issues with R CMD check results"
if (Get-Content "$LOG_FILE_NAME" | Select-String -Pattern "WARNING" -Quiet) {
Expand Down
16 changes: 8 additions & 8 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
strategy:
maxParallel: 6
matrix:
r_package:
TASK: r-package
regular:
TASK: regular
sdist:
Expand All @@ -42,8 +44,6 @@ jobs:
TASK: gpu
METHOD: source
PYTHON_VERSION: 3.6
r_package:
TASK: r-package
steps:
- script: |
echo "##vso[task.setvariable variable=HOME_DIRECTORY]$AGENT_HOMEDIRECTORY"
Expand Down Expand Up @@ -78,6 +78,8 @@ jobs:
strategy:
maxParallel: 3
matrix:
r_package:
TASK: r-package
regular:
TASK: regular
PYTHON_VERSION: 3.6
Expand All @@ -86,8 +88,6 @@ jobs:
PYTHON_VERSION: 3.5
bdist:
TASK: bdist
r_package:
TASK: r-package
steps:
- script: |
echo "##vso[task.setvariable variable=HOME_DIRECTORY]$AGENT_HOMEDIRECTORY"
Expand Down Expand Up @@ -126,11 +126,11 @@ jobs:
TASK: regular
PYTHON_VERSION: 3.7
sdist:
TASK: sdist
PYTHON_VERSION: 2.7
TASK: sdist
PYTHON_VERSION: 2.7
bdist:
TASK: bdist
PYTHON_VERSION: 3.5
TASK: bdist
PYTHON_VERSION: 3.5
steps:
- powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
Expand Down
4 changes: 2 additions & 2 deletions build_r.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Sys.setenv("CXX" = "/usr/local/bin/g++-8")
# Sys.setenv("CC" = "/usr/local/bin/gcc-8")

args <- commandArgs(trailingOnly=TRUE)
args <- commandArgs(trailingOnly = TRUE)
INSTALL_AFTER_BUILD <- !("--skip-install" %in% args)

# R returns FALSE (not a non-zero exit code) if a file copy operation
Expand Down Expand Up @@ -89,7 +89,7 @@ version <- gsub(
tarball <- file.path(getwd(), sprintf("lightgbm_%s.tar.gz", version))

cmd <- sprintf("R CMD INSTALL %s --no-multiarch --with-keep.source", tarball)
if (INSTALL_AFTER_BUILD){
if (INSTALL_AFTER_BUILD) {
.run_shell_command(cmd)
} else {
print(sprintf("Skipping installation. Install the package with command '%s'", cmd))
Expand Down

0 comments on commit c72265b

Please sign in to comment.