Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
60c92a96
Unverified
Commit
60c92a96
authored
Nov 24, 2022
by
James Lamb
Committed by
GitHub
Nov 24, 2022
Browse files
[ci] switch from MiKTeX to tinytex on Windows R jobs (fixes #5600) (#5602)
parent
93f2da43
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
20 deletions
+7
-20
.ci/test_r_package_windows.ps1
.ci/test_r_package_windows.ps1
+1
-20
.github/workflows/r_package.yml
.github/workflows/r_package.yml
+6
-0
No files found.
.ci/test_r_package_windows.ps1
View file @
60c92a96
...
...
@@ -88,10 +88,8 @@ if ($env:R_MAJOR_VERSION -eq "3") {
$
env
:
R_LIB_PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/RLibrary"
-replace
'[\\]'
,
'/'
$
env
:
R_LIBS
=
"
$
env
:
R_LIB_PATH
"
$
env
:
PATH
=
"
$
env
:
RTOOLS_BIN
;"
+
"
$
env
:
RTOOLS_MINGW_BIN
;"
+
"
$
env
:
R_LIB_PATH
/R/bin/x64;"
+
"
$
env
:
R_LIB_PATH
/miktex/texmfs/install/miktex/bin/x64;"
+
$
env
:
PATH
$
env
:
PATH
=
"
$
env
:
RTOOLS_BIN
;"
+
"
$
env
:
RTOOLS_MINGW_BIN
;"
+
"
$
env
:
R_LIB_PATH
/R/bin/x64;"
+
$
env
:
PATH
$
env
:
CRAN_MIRROR
=
"https://cran.rstudio.com"
$
env
:
CTAN_MIRROR
=
"https://ctan.math.illinois.edu/systems/win32/miktex"
$
env
:
CTAN_PACKAGE_ARCHIVE
=
"
$
env
:
CTAN_MIRROR
/tm/packages/"
$
env
:
MIKTEX_EXCEPTION_PATH
=
"
$
env
:
TEMP
\miktex"
# don't fail builds for long-running examples unless they're very long.
...
...
@@ -127,23 +125,6 @@ Write-Output "Installing dependencies"
$packages
=
"c('data.table', 'jsonlite', 'knitr', 'Matrix', 'processx', 'R6', 'RhpcBLASctl', 'rmarkdown', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')"
Run-R-Code-Redirect-Stderr
"options(install.packages.check.source = 'no'); install.packages(
$packages
, repos = '
$
env
:
CRAN_MIRROR
', type = 'binary', lib = '
$
env
:
R_LIB_PATH
', Ncpus = parallel::detectCores())"
;
Check-Output
$?
# MiKTeX and pandoc can be skipped on non-MinGW builds, since we don't
# build the package documentation for those.
#
# MiKTeX always needs to be built to test a CRAN package.
if
((
$
env
:
COMPILER
-eq
"MINGW"
)
-or
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
))
{
Download-File-With-Retries
"https://github.com/microsoft/LightGBM/releases/download/v2.0.12/miktexsetup-5.2.0-x64.zip"
-destfile
"miktexsetup-x64.zip"
Add-Type
-AssemblyName
System.IO.Compression.FileSystem
[
System.IO.Compression.ZipFile
]::
ExtractToDirectory
(
"miktexsetup-x64.zip"
,
"miktex"
)
Write-Output
"Setting up MiKTeX"
.
\miktex\miktexsetup_standalone.exe
--remote-package-repository
=
"
$
env
:
CTAN_PACKAGE_ARCHIVE
"
--local-package-repository
=.
/miktex/download
--package-set
=
essential
--quiet
download
;
Check-Output
$?
Write-Output
"Installing MiKTeX"
.
\miktex\download\miktexsetup_standalone.exe
--remote-package-repository
=
"
$
env
:
CTAN_PACKAGE_ARCHIVE
"
--portable
=
"
$
env
:
R_LIB_PATH
/miktex"
--quiet
install
;
Check-Output
$?
Write-Output
"Done installing MiKTeX"
Run-R-Code-Redirect-Stderr
"result <- processx::run(command = 'initexmf', args = c('--set-config-value', '[MPM]AutoInstall=1'), echo = TRUE, windows_verbatim_args = TRUE, error_on_status = TRUE)"
;
Check-Output
$?
}
Write-Output
"Building R package"
# R CMD check is not used for MSVC builds
...
...
.github/workflows/r_package.yml
View file @
60c92a96
...
...
@@ -144,6 +144,12 @@ jobs:
submodules
:
true
-
name
:
Install pandoc
uses
:
r-lib/actions/setup-pandoc@v1
-
name
:
install tinytex
if
:
startsWith(matrix.os, 'windows')
uses
:
r-lib/actions/setup-tinytex@v2
env
:
CTAN_MIRROR
:
https://ctan.math.illinois.edu/systems/win32/miktex
TINYTEX_INSTALLER
:
TinyTeX
-
name
:
Setup and run tests on Linux and macOS
if
:
matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest'
shell
:
bash
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment