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
fe7f8fe6
Unverified
Commit
fe7f8fe6
authored
Sep 20, 2023
by
James Lamb
Committed by
GitHub
Sep 20, 2023
Browse files
[ci] ensure correct R version is used on GitHub Actions (fixes #5640) (#6107)
parent
aa489f43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
.ci/test_r_package_windows.ps1
.ci/test_r_package_windows.ps1
+13
-0
No files found.
.ci/test_r_package_windows.ps1
View file @
fe7f8fe6
...
...
@@ -203,6 +203,19 @@ if ($env:COMPILER -ne "MSVC") {
}
}
# Checking that the correct R version was used
if
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
$checks
=
Select-String
-Path
"
${LOG_FILE_NAME}
"
-Pattern
"using R version
$
env
:
R_WINDOWS_VERSION
"
$checks_cnt
=
$checks
.
Matches
.
length
}
else
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"R version passed into FindLibR.*
$
env
:
R_WINDOWS_VERSION
"
$checks_cnt
=
$checks
.
Matches
.
length
}
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"Wrong R version was found (expected '
$
env
:
R_WINDOWS_VERSION
'). Check the build logs."
Check-Output
$False
}
# Checking that we actually got the expected compiler. The R package has some logic
# to fail back to MinGW if MSVC fails, but for CI builds we need to check that the correct
# compiler was used.
...
...
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