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
4e18c60b
Unverified
Commit
4e18c60b
authored
Aug 22, 2021
by
Nikita Titov
Committed by
GitHub
Aug 21, 2021
Browse files
[ci] Check for MM_PREFETCH and MM_MALLOC not only in CRAN builds (#4540)
parent
8a90ea3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
20 deletions
+42
-20
.ci/test_r_package.sh
.ci/test_r_package.sh
+20
-10
.ci/test_r_package_windows.ps1
.ci/test_r_package_windows.ps1
+22
-10
No files found.
.ci/test_r_package.sh
View file @
4e18c60b
...
@@ -219,30 +219,40 @@ if [[ $omp_working -ne 1 ]]; then
...
@@ -219,30 +219,40 @@ if [[ $omp_working -ne 1 ]]; then
exit
-1
exit
-1
fi
fi
# this check makes sure that CI builds of the
CRAN
package
# this check makes sure that CI builds of the package
# actually use MM_PREFETCH preprocessor definition
# actually use MM_PREFETCH preprocessor definition
if
[[
$R_BUILD_TYPE
==
"cran"
]]
;
then
if
[[
$R_BUILD_TYPE
==
"cran"
]]
;
then
mm_prefetch_working
=
$(
mm_prefetch_working
=
$(
cat
$BUILD_LOG_FILE
\
cat
$BUILD_LOG_FILE
\
|
grep
--count
-E
"checking whether MM_PREFETCH work.*yes"
|
grep
--count
-E
"checking whether MM_PREFETCH work.*yes"
)
)
if
[[
$mm_prefetch_working
-ne
1
]]
;
then
else
echo
"MM_PREFETCH test was not passed, and should be when testing the CRAN package"
mm_prefetch_working
=
$(
exit
-1
cat
$BUILD_LOG_FILE
\
fi
|
grep
--count
-E
".*Performing Test MM_PREFETCH - Success"
)
fi
if
[[
$mm_prefetch_working
-ne
1
]]
;
then
echo
"MM_PREFETCH test was not passed"
exit
-1
fi
fi
# this check makes sure that CI builds of the
CRAN
package
# this check makes sure that CI builds of the package
# actually use MM_MALLOC preprocessor definition
# actually use MM_MALLOC preprocessor definition
if
[[
$R_BUILD_TYPE
==
"cran"
]]
;
then
if
[[
$R_BUILD_TYPE
==
"cran"
]]
;
then
mm_malloc_working
=
$(
mm_malloc_working
=
$(
cat
$BUILD_LOG_FILE
\
cat
$BUILD_LOG_FILE
\
|
grep
--count
-E
"checking whether MM_MALLOC work.*yes"
|
grep
--count
-E
"checking whether MM_MALLOC work.*yes"
)
)
if
[[
$mm_malloc_working
-ne
1
]]
;
then
else
echo
"MM_MALLOC test was not passed, and should be when testing the CRAN package"
mm_malloc_working
=
$(
exit
-1
cat
$BUILD_LOG_FILE
\
fi
|
grep
--count
-E
".*Performing Test MM_MALLOC - Success"
)
fi
if
[[
$mm_malloc_working
-ne
1
]]
;
then
echo
"MM_MALLOC test was not passed"
exit
-1
fi
fi
# this check makes sure that no "warning: unknown pragma ignored" logs
# this check makes sure that no "warning: unknown pragma ignored" logs
...
...
.ci/test_r_package_windows.ps1
View file @
4e18c60b
...
@@ -232,22 +232,34 @@ if (($env:COMPILER -eq "MINGW") -and ($env:R_BUILD_TYPE -eq "cmake")) {
...
@@ -232,22 +232,34 @@ if (($env:COMPILER -eq "MINGW") -and ($env:R_BUILD_TYPE -eq "cmake")) {
}
}
}
}
# Checking that MM_PREFETCH preprocessor definition is actually used in C
RAN
builds.
# Checking that MM_PREFETCH preprocessor definition is actually used in C
I
builds.
if
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
if
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"checking whether MM_PREFETCH work.*yes"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"checking whether MM_PREFETCH work.*yes"
if
(
$checks
.
Matches
.
length
-eq
0
)
{
$checks_cnt
=
$checks
.
Matches
.
length
Write-Output
"MM_PREFETCH preprocessor definition wasn't used. Check the build logs."
}
elseif
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
Check-Output
$False
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Performing Test MM_PREFETCH - Success"
}
$checks_cnt
=
$checks
.
Matches
.
length
}
else
{
$checks_cnt
=
1
}
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"MM_PREFETCH preprocessor definition wasn't used. Check the build logs."
Check-Output
$False
}
}
# Checking that MM_MALLOC preprocessor definition is actually used in C
RAN
builds.
# Checking that MM_MALLOC preprocessor definition is actually used in C
I
builds.
if
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
if
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"checking whether MM_MALLOC work.*yes"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"checking whether MM_MALLOC work.*yes"
if
(
$checks
.
Matches
.
length
-eq
0
)
{
$checks_cnt
=
$checks
.
Matches
.
length
Write-Output
"MM_MALLOC preprocessor definition wasn't used. Check the build logs."
}
elseif
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
Check-Output
$False
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Performing Test MM_MALLOC - Success"
}
$checks_cnt
=
$checks
.
Matches
.
length
}
else
{
$checks_cnt
=
1
}
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"MM_MALLOC preprocessor definition wasn't used. Check the build logs."
Check-Output
$False
}
}
# Checking that OpenMP is actually used in CMake builds.
# Checking that OpenMP is actually used in CMake builds.
...
...
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