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
92aa07b4
Unverified
Commit
92aa07b4
authored
Nov 01, 2024
by
Nikita Titov
Committed by
GitHub
Oct 31, 2024
Browse files
[ci] check PowerShell scripts with PSScriptAnalyzer (part 2) (#6709)
parent
8d5dca2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
214 additions
and
214 deletions
+214
-214
.ci/install-opencl.ps1
.ci/install-opencl.ps1
+14
-14
.ci/test-r-package-windows.ps1
.ci/test-r-package-windows.ps1
+121
-121
.ci/test-windows.ps1
.ci/test-windows.ps1
+78
-78
.ci/test.sh
.ci/test.sh
+1
-1
No files found.
.ci/install-opencl.ps1
View file @
92aa07b4
...
@@ -7,12 +7,12 @@ $ProgressPreference = "SilentlyContinue" # progress bar bug extremely slows dow
...
@@ -7,12 +7,12 @@ $ProgressPreference = "SilentlyContinue" # progress bar bug extremely slows dow
Invoke-WebRequest
-OutFile
"
$installer
"
-Uri
"https://github.com/microsoft/LightGBM/releases/download/v2.0.12/
$installer
"
Invoke-WebRequest
-OutFile
"
$installer
"
-Uri
"https://github.com/microsoft/LightGBM/releases/download/v2.0.12/
$installer
"
if
(
Test-Path
"
$installer
"
)
{
if
(
Test-Path
"
$installer
"
)
{
Write-Output
"Successfully downloaded OpenCL platform installer"
Write-Output
"Successfully downloaded OpenCL platform installer"
}
else
{
}
else
{
Write-Output
"Unable to download OpenCL platform installer"
Write-Output
"Unable to download OpenCL platform installer"
Write-Output
"Setting EXIT"
Write-Output
"Setting EXIT"
$host
.
SetShouldExit
(
-1
)
$host
.
SetShouldExit
(
-1
)
exit
1
exit
1
}
}
# Install OpenCL platform from installer executable
# Install OpenCL platform from installer executable
...
@@ -21,14 +21,14 @@ Invoke-Command -ScriptBlock { Start-Process "$installer" -ArgumentList '/S /V"/q
...
@@ -21,14 +21,14 @@ Invoke-Command -ScriptBlock { Start-Process "$installer" -ArgumentList '/S /V"/q
$property
=
Get-ItemProperty
-Path
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
$property
=
Get-ItemProperty
-Path
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
if
(
$property
-eq
$null
)
{
if
(
$property
-eq
$null
)
{
Write-Output
"Unable to install OpenCL CPU platform"
Write-Output
"Unable to install OpenCL CPU platform"
Write-Output
"OpenCL installation log:"
Write-Output
"OpenCL installation log:"
Get-Content
"opencl.log"
Get-Content
"opencl.log"
Write-Output
"Setting EXIT"
Write-Output
"Setting EXIT"
$host
.
SetShouldExit
(
-1
)
$host
.
SetShouldExit
(
-1
)
exit
1
exit
1
}
else
{
}
else
{
Write-Output
"Successfully installed OpenCL CPU platform"
Write-Output
"Successfully installed OpenCL CPU platform"
Write-Output
"Current OpenCL drivers:"
Write-Output
"Current OpenCL drivers:"
Write-Output
$property
Write-Output
$property
}
}
.ci/test-r-package-windows.ps1
View file @
92aa07b4
...
@@ -75,22 +75,22 @@ Remove-Item C:\rtools43 -Force -Recurse -ErrorAction Ignore
...
@@ -75,22 +75,22 @@ Remove-Item C:\rtools43 -Force -Recurse -ErrorAction Ignore
# * some paths and file names are different on R4.0
# * some paths and file names are different on R4.0
$
env
:
R_MAJOR_VERSION
=
$
env
:
R_VERSION
.
split
(
'.'
)[
0
]
$
env
:
R_MAJOR_VERSION
=
$
env
:
R_VERSION
.
split
(
'.'
)[
0
]
if
(
$
env
:
R_MAJOR_VERSION
-eq
"3"
)
{
if
(
$
env
:
R_MAJOR_VERSION
-eq
"3"
)
{
# Rtools 3.x has to be installed at C:\Rtools\
# Rtools 3.x has to be installed at C:\Rtools\
# * https://stackoverflow.com/a/46619260/3986677
# * https://stackoverflow.com/a/46619260/3986677
$RTOOLS_INSTALL_PATH
=
"C:\Rtools"
$RTOOLS_INSTALL_PATH
=
"C:\Rtools"
$
env
:
RTOOLS_BIN
=
"
$RTOOLS_INSTALL_PATH
\bin"
$
env
:
RTOOLS_BIN
=
"
$RTOOLS_INSTALL_PATH
\bin"
$
env
:
RTOOLS_MINGW_BIN
=
"
$RTOOLS_INSTALL_PATH
\mingw_64\bin"
$
env
:
RTOOLS_MINGW_BIN
=
"
$RTOOLS_INSTALL_PATH
\mingw_64\bin"
$
env
:
RTOOLS_EXE_FILE
=
"rtools35-x86_64.exe"
$
env
:
RTOOLS_EXE_FILE
=
"rtools35-x86_64.exe"
$
env
:
R_WINDOWS_VERSION
=
"3.6.3"
$
env
:
R_WINDOWS_VERSION
=
"3.6.3"
}
elseif
(
$
env
:
R_MAJOR_VERSION
-eq
"4"
)
{
}
elseif
(
$
env
:
R_MAJOR_VERSION
-eq
"4"
)
{
$RTOOLS_INSTALL_PATH
=
"C:\rtools43"
$RTOOLS_INSTALL_PATH
=
"C:\rtools43"
$
env
:
RTOOLS_BIN
=
"
$RTOOLS_INSTALL_PATH
\usr\bin"
$
env
:
RTOOLS_BIN
=
"
$RTOOLS_INSTALL_PATH
\usr\bin"
$
env
:
RTOOLS_MINGW_BIN
=
"
$RTOOLS_INSTALL_PATH
\x86_64-w64-mingw32.static.posix\bin"
$
env
:
RTOOLS_MINGW_BIN
=
"
$RTOOLS_INSTALL_PATH
\x86_64-w64-mingw32.static.posix\bin"
$
env
:
RTOOLS_EXE_FILE
=
"rtools43-5550-5548.exe"
$
env
:
RTOOLS_EXE_FILE
=
"rtools43-5550-5548.exe"
$
env
:
R_WINDOWS_VERSION
=
"4.3.1"
$
env
:
R_WINDOWS_VERSION
=
"4.3.1"
}
else
{
}
else
{
Write-Output
"[ERROR] Unrecognized R version:
$
env
:
R_VERSION
"
Write-Output
"[ERROR] Unrecognized R version:
$
env
:
R_VERSION
"
Assert-Output
$false
Assert-Output
$false
}
}
$
env
:
CMAKE_VERSION
=
"3.30.0"
$
env
:
CMAKE_VERSION
=
"3.30.0"
...
@@ -99,9 +99,9 @@ $env:R_LIBS = "$env:R_LIB_PATH"
...
@@ -99,9 +99,9 @@ $env:R_LIBS = "$env:R_LIB_PATH"
$
env
:
CMAKE_PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/CMake_installation"
$
env
:
CMAKE_PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/CMake_installation"
$
env
:
PATH
=
"
$
env
:
RTOOLS_BIN
;"
+
"
$
env
:
RTOOLS_MINGW_BIN
;"
+
"
$
env
:
R_LIB_PATH
/R/bin/x64;"
+
"
$
env
:
CMAKE_PATH
/cmake-
$
env
:
CMAKE_VERSION
-windows-x86_64/bin;"
+
$
env
:
PATH
$
env
:
PATH
=
"
$
env
:
RTOOLS_BIN
;"
+
"
$
env
:
RTOOLS_MINGW_BIN
;"
+
"
$
env
:
R_LIB_PATH
/R/bin/x64;"
+
"
$
env
:
CMAKE_PATH
/cmake-
$
env
:
CMAKE_VERSION
-windows-x86_64/bin;"
+
$
env
:
PATH
if
([
version
]
$
env
:
R_VERSION
-lt
[
version
]
"4.0"
)
{
if
([
version
]
$
env
:
R_VERSION
-lt
[
version
]
"4.0"
)
{
$
env
:
CRAN_MIRROR
=
"https://cran-archive.r-project.org"
$
env
:
CRAN_MIRROR
=
"https://cran-archive.r-project.org"
}
else
{
}
else
{
$
env
:
CRAN_MIRROR
=
"https://cran.rstudio.com"
$
env
:
CRAN_MIRROR
=
"https://cran.rstudio.com"
}
}
$
env
:
MIKTEX_EXCEPTION_PATH
=
"
$
env
:
TEMP
\miktex"
$
env
:
MIKTEX_EXCEPTION_PATH
=
"
$
env
:
TEMP
\miktex"
...
@@ -112,8 +112,8 @@ if ($env:R_BUILD_TYPE -ne "cran") {
...
@@ -112,8 +112,8 @@ if ($env:R_BUILD_TYPE -ne "cran") {
}
}
if
((
$
env
:
COMPILER
-eq
"MINGW"
)
-and
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
))
{
if
((
$
env
:
COMPILER
-eq
"MINGW"
)
-and
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
))
{
$
env
:
CXX
=
"
$
env
:
RTOOLS_MINGW_BIN
/g++.exe"
$
env
:
CXX
=
"
$
env
:
RTOOLS_MINGW_BIN
/g++.exe"
$
env
:
CC
=
"
$
env
:
RTOOLS_MINGW_BIN
/gcc.exe"
$
env
:
CC
=
"
$
env
:
RTOOLS_MINGW_BIN
/gcc.exe"
}
}
cd
$
env
:
BUILD_SOURCESDIRECTORY
cd
$
env
:
BUILD_SOURCESDIRECTORY
...
@@ -152,158 +152,158 @@ Write-Output "Building R-package"
...
@@ -152,158 +152,158 @@ Write-Output "Building R-package"
# R CMD check is not used for MSVC builds
# R CMD check is not used for MSVC builds
if
(
$
env
:
COMPILER
-ne
"MSVC"
)
{
if
(
$
env
:
COMPILER
-ne
"MSVC"
)
{
$PKG_FILE_NAME
=
"lightgbm_
$
env
:
LGB_VER
.tar.gz"
$PKG_FILE_NAME
=
"lightgbm_
$
env
:
LGB_VER
.tar.gz"
$LOG_FILE_NAME
=
"lightgbm.Rcheck/00check.log"
$LOG_FILE_NAME
=
"lightgbm.Rcheck/00check.log"
if
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
)
{
if
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
)
{
if
(
$
env
:
TOOLCHAIN
-eq
"MINGW"
)
{
if
(
$
env
:
TOOLCHAIN
-eq
"MINGW"
)
{
Write-Output
"Telling R to use MinGW"
Write-Output
"Telling R to use MinGW"
$
env
:
BUILD_R_FLAGS
=
"c('--skip-install', '--use-mingw', '-j4')"
$
env
:
BUILD_R_FLAGS
=
"c('--skip-install', '--use-mingw', '-j4')"
}
elseif
(
$
env
:
TOOLCHAIN
-eq
"MSYS"
)
{
}
elseif
(
$
env
:
TOOLCHAIN
-eq
"MSYS"
)
{
Write-Output
"Telling R to use MSYS"
Write-Output
"Telling R to use MSYS"
$
env
:
BUILD_R_FLAGS
=
"c('--skip-install', '--use-msys2', '-j4')"
$
env
:
BUILD_R_FLAGS
=
"c('--skip-install', '--use-msys2', '-j4')"
}
elseif
(
$
env
:
TOOLCHAIN
-eq
"MSVC"
)
{
}
elseif
(
$
env
:
TOOLCHAIN
-eq
"MSVC"
)
{
$
env
:
BUILD_R_FLAGS
=
"'--skip-install'"
$
env
:
BUILD_R_FLAGS
=
"'--skip-install'"
}
else
{
}
else
{
Write-Output
"[ERROR] Unrecognized toolchain:
$
env
:
TOOLCHAIN
"
Write-Output
"[ERROR] Unrecognized toolchain:
$
env
:
TOOLCHAIN
"
Assert-Output
$false
Assert-Output
$false
}
}
Invoke-R-Code-Redirect-Stderr
"commandArgs <- function(...){
$
env
:
BUILD_R_FLAGS
}; source('build_r.R')"
;
Assert-Output
$?
Invoke-R-Code-Redirect-Stderr
"commandArgs <- function(...){
$
env
:
BUILD_R_FLAGS
}; source('build_r.R')"
;
Assert-Output
$?
}
elseif
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
}
elseif
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
# NOTE: gzip and tar are needed to create a CRAN package on Windows, but
# NOTE: gzip and tar are needed to create a CRAN package on Windows, but
# some flavors of tar.exe can fail in some settings on Windows.
# some flavors of tar.exe can fail in some settings on Windows.
# Putting the msys64 utilities at the beginning of PATH temporarily to be
# Putting the msys64 utilities at the beginning of PATH temporarily to be
# sure they're used for that purpose.
# sure they're used for that purpose.
if
(
$
env
:
R_MAJOR_VERSION
-eq
"3"
)
{
if
(
$
env
:
R_MAJOR_VERSION
-eq
"3"
)
{
$
env
:
PATH
=
"C:\msys64\usr\bin;"
+
$
env
:
PATH
$
env
:
PATH
=
"C:\msys64\usr\bin;"
+
$
env
:
PATH
}
Invoke-R-Code-Redirect-Stderr
"result <- processx::run(command = 'sh', args = 'build-cran-package.sh', echo = TRUE, windows_verbatim_args = FALSE, error_on_status = TRUE)"
;
Assert-Output
$?
Remove-From-Path
".*msys64.*"
# Test CRAN source .tar.gz in a directory that is not this repo or below it.
# When people install.packages('lightgbm'), they won't have the LightGBM
# git repo around. This is to protect against the use of relative paths
# like ../../CMakeLists.txt that would only work if you are in the repoo
$R_CMD_CHECK_DIR
=
"tmp-r-cmd-check"
New-Item
-Path
"C:\"
-Name
$R_CMD_CHECK_DIR
-ItemType
"directory"
>
$null
Move-Item
-Path
"
$PKG_FILE_NAME
"
-Destination
"C:\
$R_CMD_CHECK_DIR
\"
>
$null
cd
"C:\
$R_CMD_CHECK_DIR
\"
}
}
Invoke-R-Code-Redirect-Stderr
"result <- processx::run(command = 'sh', args = 'build-cran-package.sh', echo = TRUE, windows_verbatim_args = FALSE, error_on_status = TRUE)"
;
Assert-Output
$?
Remove-From-Path
".*msys64.*"
# Test CRAN source .tar.gz in a directory that is not this repo or below it.
# When people install.packages('lightgbm'), they won't have the LightGBM
# git repo around. This is to protect against the use of relative paths
# like ../../CMakeLists.txt that would only work if you are in the repoo
$R_CMD_CHECK_DIR
=
"tmp-r-cmd-check"
New-Item
-Path
"C:\"
-Name
$R_CMD_CHECK_DIR
-ItemType
"directory"
>
$null
Move-Item
-Path
"
$PKG_FILE_NAME
"
-Destination
"C:\
$R_CMD_CHECK_DIR
\"
>
$null
cd
"C:\
$R_CMD_CHECK_DIR
\"
}
Write-Output
"Running R CMD check"
Write-Output
"Running R CMD check"
if
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
if
(
$
env
:
R_BUILD_TYPE
-eq
"cran"
)
{
# CRAN packages must pass without --no-multiarch (build on 64-bit and 32-bit)
# CRAN packages must pass without --no-multiarch (build on 64-bit and 32-bit)
$check_args
=
"c('CMD', 'check', '--as-cran', '--run-donttest', '
$PKG_FILE_NAME
')"
$check_args
=
"c('CMD', 'check', '--as-cran', '--run-donttest', '
$PKG_FILE_NAME
')"
}
else
{
}
else
{
$check_args
=
"c('CMD', 'check', '--no-multiarch', '--as-cran', '--run-donttest', '
$PKG_FILE_NAME
')"
$check_args
=
"c('CMD', 'check', '--no-multiarch', '--as-cran', '--run-donttest', '
$PKG_FILE_NAME
')"
}
}
Invoke-R-Code-Redirect-Stderr
"result <- processx::run(command = 'R.exe', args =
$check_args
, echo = TRUE, windows_verbatim_args = FALSE, error_on_status = TRUE)"
;
$check_succeeded
=
$?
Invoke-R-Code-Redirect-Stderr
"result <- processx::run(command = 'R.exe', args =
$check_args
, echo = TRUE, windows_verbatim_args = FALSE, error_on_status = TRUE)"
;
$check_succeeded
=
$?
Write-Output
"R CMD check build logs:"
Write-Output
"R CMD check build logs:"
$INSTALL_LOG_FILE_NAME
=
"lightgbm.Rcheck\00install.out"
$INSTALL_LOG_FILE_NAME
=
"lightgbm.Rcheck\00install.out"
Get-Content
-Path
"
$INSTALL_LOG_FILE_NAME
"
Get-Content
-Path
"
$INSTALL_LOG_FILE_NAME
"
Assert-Output
$check_succeeded
Assert-Output
$check_succeeded
Write-Output
"Looking for issues with R CMD check results"
Write-Output
"Looking for issues with R CMD check results"
if
(
Get-Content
"
$LOG_FILE_NAME
"
|
Select-String
-Pattern
"NOTE|WARNING|ERROR"
-CaseSensitive
-Quiet
)
{
if
(
Get-Content
"
$LOG_FILE_NAME
"
|
Select-String
-Pattern
"NOTE|WARNING|ERROR"
-CaseSensitive
-Quiet
)
{
echo
"NOTEs, WARNINGs, or ERRORs have been found by R CMD check"
echo
"NOTEs, WARNINGs, or ERRORs have been found by R CMD check"
Assert-Output
$False
Assert-Output
$False
}
}
}
else
{
}
else
{
$INSTALL_LOG_FILE_NAME
=
"
$
env
:
BUILD_SOURCESDIRECTORY
\00install_out.txt"
$INSTALL_LOG_FILE_NAME
=
"
$
env
:
BUILD_SOURCESDIRECTORY
\00install_out.txt"
Invoke-R-Code-Redirect-Stderr
"source('build_r.R')"
1
>
$INSTALL_LOG_FILE_NAME
;
$install_succeeded
=
$?
Invoke-R-Code-Redirect-Stderr
"source('build_r.R')"
1
>
$INSTALL_LOG_FILE_NAME
;
$install_succeeded
=
$?
Write-Output
"----- build and install logs -----"
Write-Output
"----- build and install logs -----"
Get-Content
-Path
"
$INSTALL_LOG_FILE_NAME
"
Get-Content
-Path
"
$INSTALL_LOG_FILE_NAME
"
Write-Output
"----- end of build and install logs -----"
Write-Output
"----- end of build and install logs -----"
Assert-Output
$install_succeeded
Assert-Output
$install_succeeded
# some errors are not raised above, but can be found in the logs
# some errors are not raised above, but can be found in the logs
if
(
Get-Content
"
$INSTALL_LOG_FILE_NAME
"
|
Select-String
-Pattern
"ERROR"
-CaseSensitive
-Quiet
)
{
if
(
Get-Content
"
$INSTALL_LOG_FILE_NAME
"
|
Select-String
-Pattern
"ERROR"
-CaseSensitive
-Quiet
)
{
echo
"ERRORs have been found installing lightgbm"
echo
"ERRORs have been found installing lightgbm"
Assert-Output
$False
Assert-Output
$False
}
}
}
}
# Checking that the correct R version was used
# Checking that the correct R version was used
if
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
if
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
$checks
=
Select-String
-Path
"
${LOG_FILE_NAME}
"
-Pattern
"using R version
$
env
:
R_WINDOWS_VERSION
"
$checks
=
Select-String
-Path
"
${LOG_FILE_NAME}
"
-Pattern
"using R version
$
env
:
R_WINDOWS_VERSION
"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
}
else
{
}
else
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"R version passed into FindLibR.*
$
env
:
R_WINDOWS_VERSION
"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"R version passed into FindLibR.*
$
env
:
R_WINDOWS_VERSION
"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
}
}
if
(
$checks_cnt
-eq
0
)
{
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"Wrong R version was found (expected '
$
env
:
R_WINDOWS_VERSION
'). Check the build logs."
Write-Output
"Wrong R version was found (expected '
$
env
:
R_WINDOWS_VERSION
'). Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
# Checking that we actually got the expected compiler. The R-package has some logic
# 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
# to fail back to MinGW if MSVC fails, but for CI builds we need to check that the correct
# compiler was used.
# compiler was used.
if
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
)
{
if
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
)
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"Check for working CXX compiler.*
$
env
:
COMPILER
"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"Check for working CXX compiler.*
$
env
:
COMPILER
"
if
(
$checks
.
Matches
.
length
-eq
0
)
{
if
(
$checks
.
Matches
.
length
-eq
0
)
{
Write-Output
"The wrong compiler was used. Check the build logs."
Write-Output
"The wrong compiler was used. Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
}
}
# Checking that we got the right toolchain for MinGW. If using MinGW, both
# Checking that we got the right toolchain for MinGW. If using MinGW, both
# MinGW and MSYS toolchains are supported
# MinGW and MSYS toolchains are supported
if
((
$
env
:
COMPILER
-eq
"MINGW"
)
-and
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
))
{
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
"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
"Trying to build with.*
$
env
:
TOOLCHAIN
"
if
(
$checks
.
Matches
.
length
-eq
0
)
{
if
(
$checks
.
Matches
.
length
-eq
0
)
{
Write-Output
"The wrong toolchain was used. Check the build logs."
Write-Output
"The wrong toolchain was used. Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
}
}
# Checking that MM_PREFETCH preprocessor definition is actually used in CI builds.
# Checking that MM_PREFETCH preprocessor definition is actually used in CI 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"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
}
elseif
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
}
elseif
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Performing Test MM_PREFETCH - Success"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Performing Test MM_PREFETCH - Success"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
}
else
{
}
else
{
$checks_cnt
=
1
$checks_cnt
=
1
}
}
if
(
$checks_cnt
-eq
0
)
{
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"MM_PREFETCH preprocessor definition wasn't used. Check the build logs."
Write-Output
"MM_PREFETCH preprocessor definition wasn't used. Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
# Checking that MM_MALLOC preprocessor definition is actually used in CI builds.
# Checking that MM_MALLOC preprocessor definition is actually used in CI 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"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
}
elseif
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
}
elseif
(
$
env
:
TOOLCHAIN
-ne
"MSVC"
)
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Performing Test MM_MALLOC - Success"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Performing Test MM_MALLOC - Success"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
}
else
{
}
else
{
$checks_cnt
=
1
$checks_cnt
=
1
}
}
if
(
$checks_cnt
-eq
0
)
{
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"MM_MALLOC preprocessor definition wasn't used. Check the build logs."
Write-Output
"MM_MALLOC preprocessor definition wasn't used. Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
# Checking that OpenMP is actually used in CMake builds.
# Checking that OpenMP is actually used in CMake builds.
if
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
)
{
if
(
$
env
:
R_BUILD_TYPE
-eq
"cmake"
)
{
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Found OpenMP: TRUE.*"
$checks
=
Select-String
-Path
"
${INSTALL_LOG_FILE_NAME}
"
-Pattern
".*Found OpenMP: TRUE.*"
if
(
$checks
.
Matches
.
length
-eq
0
)
{
if
(
$checks
.
Matches
.
length
-eq
0
)
{
Write-Output
"OpenMP wasn't found. Check the build logs."
Write-Output
"OpenMP wasn't found. Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
}
}
if
(
$
env
:
COMPILER
-eq
"MSVC"
)
{
if
(
$
env
:
COMPILER
-eq
"MSVC"
)
{
Write-Output
"Running tests with testthat.R"
Write-Output
"Running tests with testthat.R"
cd
R-package/tests
cd
R-package/tests
# NOTE: using Rscript.exe intentionally here, instead of Invoke-R-Code-Redirect-Stderr,
# NOTE: using Rscript.exe intentionally here, instead of Invoke-R-Code-Redirect-Stderr,
# because something about the interaction between Invoke-R-Code-Redirect-Stderr
# because something about the interaction between Invoke-R-Code-Redirect-Stderr
# and testthat results in failing tests not exiting with a non-0 exit code.
# and testthat results in failing tests not exiting with a non-0 exit code.
Rscript.exe
--vanilla
"testthat.R"
;
Assert-Output
$?
Rscript.exe
--vanilla
"testthat.R"
;
Assert-Output
$?
}
}
Write-Output
"No issues were found checking the R-package"
Write-Output
"No issues were found checking the R-package"
.ci/test-windows.ps1
View file @
92aa07b4
...
@@ -17,41 +17,41 @@ Remove-Item $env:TMPDIR -Force -Recurse -ErrorAction Ignore
...
@@ -17,41 +17,41 @@ Remove-Item $env:TMPDIR -Force -Recurse -ErrorAction Ignore
[
Void
][
System.IO.Directory
]::
CreateDirectory
(
$
env
:
TMPDIR
)
[
Void
][
System.IO.Directory
]::
CreateDirectory
(
$
env
:
TMPDIR
)
if
(
$
env
:
TASK
-eq
"r-package"
)
{
if
(
$
env
:
TASK
-eq
"r-package"
)
{
&
.
\.ci\test-r-package-windows.ps1
;
Assert-Output
$?
&
.
\.ci\test-r-package-windows.ps1
;
Assert-Output
$?
Exit
0
Exit
0
}
}
if
(
$
env
:
TASK
-eq
"cpp-tests"
)
{
if
(
$
env
:
TASK
-eq
"cpp-tests"
)
{
cmake
-B
build
-S
.
-DBUILD_CPP_TEST
=
ON
-DUSE_DEBUG
=
ON
-A
x64
cmake
-B
build
-S
.
-DBUILD_CPP_TEST
=
ON
-DUSE_DEBUG
=
ON
-A
x64
cmake
--build
build
--target
testlightgbm
--config
Debug
;
Assert-Output
$?
cmake
--build
build
--target
testlightgbm
--config
Debug
;
Assert-Output
$?
.
\Debug\testlightgbm.exe
;
Assert-Output
$?
.
\Debug\testlightgbm.exe
;
Assert-Output
$?
Exit
0
Exit
0
}
}
if
(
$
env
:
TASK
-eq
"swig"
)
{
if
(
$
env
:
TASK
-eq
"swig"
)
{
$
env
:
JAVA_HOME
=
$
env
:
JAVA_HOME_8_X64
# there is pre-installed Eclipse Temurin 8 somewhere
$
env
:
JAVA_HOME
=
$
env
:
JAVA_HOME_8_X64
# there is pre-installed Eclipse Temurin 8 somewhere
$ProgressPreference
=
"SilentlyContinue"
# progress bar bug extremely slows down download speed
$ProgressPreference
=
"SilentlyContinue"
# progress bar bug extremely slows down download speed
Invoke-WebRequest
-Uri
"https://sourceforge.net/projects/swig/files/latest/download"
-OutFile
$
env
:
BUILD_SOURCESDIRECTORY
/swig/swigwin.zip
-UserAgent
"curl"
Invoke-WebRequest
-Uri
"https://sourceforge.net/projects/swig/files/latest/download"
-OutFile
$
env
:
BUILD_SOURCESDIRECTORY
/swig/swigwin.zip
-UserAgent
"curl"
Add-Type
-AssemblyName
System.IO.Compression.FileSystem
Add-Type
-AssemblyName
System.IO.Compression.FileSystem
[
System.IO.Compression.ZipFile
]::
ExtractToDirectory
(
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig/swigwin.zip"
,
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig"
)
;
Assert-Output
$?
[
System.IO.Compression.ZipFile
]::
ExtractToDirectory
(
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig/swigwin.zip"
,
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig"
)
;
Assert-Output
$?
$SwigFolder
=
Get-ChildItem
-Directory
-Name
-Path
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig"
$SwigFolder
=
Get-ChildItem
-Directory
-Name
-Path
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig"
$
env
:
PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig/
$SwigFolder
;"
+
$
env
:
PATH
$
env
:
PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/swig/
$SwigFolder
;"
+
$
env
:
PATH
$BuildLogFileName
=
"
$
env
:
BUILD_SOURCESDIRECTORY
\cmake_build.log"
$BuildLogFileName
=
"
$
env
:
BUILD_SOURCESDIRECTORY
\cmake_build.log"
cmake
-B
build
-S
.
-A
x64
-DUSE_SWIG
=
ON
*
>
"
$BuildLogFileName
"
;
$build_succeeded
=
$?
cmake
-B
build
-S
.
-A
x64
-DUSE_SWIG
=
ON
*
>
"
$BuildLogFileName
"
;
$build_succeeded
=
$?
Write-Output
"CMake build logs:"
Write-Output
"CMake build logs:"
Get-Content
-Path
"
$BuildLogFileName
"
Get-Content
-Path
"
$BuildLogFileName
"
Assert-Output
$build_succeeded
Assert-Output
$build_succeeded
$checks
=
Select-String
-Path
"
${BuildLogFileName}
"
-Pattern
"-- Found SWIG.*
${SwigFolder}
/swig.exe"
$checks
=
Select-String
-Path
"
${BuildLogFileName}
"
-Pattern
"-- Found SWIG.*
${SwigFolder}
/swig.exe"
$checks_cnt
=
$checks
.
Matches
.
length
$checks_cnt
=
$checks
.
Matches
.
length
if
(
$checks_cnt
-eq
0
)
{
if
(
$checks_cnt
-eq
0
)
{
Write-Output
"Wrong SWIG version was found (expected '
${SwigFolder}
'). Check the build logs."
Write-Output
"Wrong SWIG version was found (expected '
${SwigFolder}
'). Check the build logs."
Assert-Output
$False
Assert-Output
$False
}
}
cmake
--build
build
--target
ALL_BUILD
--config
Release
;
Assert-Output
$?
cmake
--build
build
--target
ALL_BUILD
--config
Release
;
Assert-Output
$?
if
(
$
env
:
AZURE
-eq
"true"
)
{
if
(
$
env
:
AZURE
-eq
"true"
)
{
cp
.
/build/lightgbmlib.jar
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
/lightgbmlib_win.jar
;
Assert-Output
$?
cp
.
/build/lightgbmlib.jar
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
/lightgbmlib_win.jar
;
Assert-Output
$?
}
}
Exit
0
Exit
0
}
}
# setup for Python
# setup for Python
...
@@ -61,82 +61,82 @@ conda config --set always_yes yes --set changeps1 no
...
@@ -61,82 +61,82 @@ conda config --set always_yes yes --set changeps1 no
conda
update
-q
-y
conda
"python=
$
env
:
PYTHON_VERSION
[build=*cpython]"
conda
update
-q
-y
conda
"python=
$
env
:
PYTHON_VERSION
[build=*cpython]"
if
(
$
env
:
PYTHON_VERSION
-eq
"3.7"
)
{
if
(
$
env
:
PYTHON_VERSION
-eq
"3.7"
)
{
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core-py37.txt"
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core-py37.txt"
}
elseif
(
$
env
:
PYTHON_VERSION
-eq
"3.8"
)
{
}
elseif
(
$
env
:
PYTHON_VERSION
-eq
"3.8"
)
{
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core-py38.txt"
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core-py38.txt"
}
else
{
}
else
{
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core.txt"
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core.txt"
}
}
conda
create
`
conda
create
`
-y
`
-y
`
-n
$
env
:
CONDA_ENV
`
-n
$
env
:
CONDA_ENV
`
--file
$
env
:
CONDA_REQUIREMENT_FILE
`
--file
$
env
:
CONDA_REQUIREMENT_FILE
`
"python=
$
env
:
PYTHON_VERSION
[build=*cpython]"
;
Assert-Output
$?
"python=
$
env
:
PYTHON_VERSION
[build=*cpython]"
;
Assert-Output
$?
if
(
$
env
:
TASK
-ne
"bdist"
)
{
if
(
$
env
:
TASK
-ne
"bdist"
)
{
conda
activate
$
env
:
CONDA_ENV
conda
activate
$
env
:
CONDA_ENV
}
}
cd
$
env
:
BUILD_SOURCESDIRECTORY
cd
$
env
:
BUILD_SOURCESDIRECTORY
if
(
$
env
:
TASK
-eq
"regular"
)
{
if
(
$
env
:
TASK
-eq
"regular"
)
{
cmake
-B
build
-S
.
-A
x64
;
Assert-Output
$?
cmake
-B
build
-S
.
-A
x64
;
Assert-Output
$?
cmake
--build
build
--target
ALL_BUILD
--config
Release
;
Assert-Output
$?
cmake
--build
build
--target
ALL_BUILD
--config
Release
;
Assert-Output
$?
sh
.
/build-python.sh
install
--precompile
;
Assert-Output
$?
sh
.
/build-python.sh
install
--precompile
;
Assert-Output
$?
cp
.
/Release/lib_lightgbm.dll
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
cp
.
/Release/lib_lightgbm.dll
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
cp
.
/Release/lightgbm.exe
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
cp
.
/Release/lightgbm.exe
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
}
}
elseif
(
$
env
:
TASK
-eq
"sdist"
)
{
elseif
(
$
env
:
TASK
-eq
"sdist"
)
{
sh
.
/build-python.sh
sdist
;
Assert-Output
$?
sh
.
/build-python.sh
sdist
;
Assert-Output
$?
sh
.
/.ci/check-python-dists.sh
.
/dist
;
Assert-Output
$?
sh
.
/.ci/check-python-dists.sh
.
/dist
;
Assert-Output
$?
cd
dist
;
pip
install
@(
Get-ChildItem
*.gz
)
-v
;
Assert-Output
$?
cd
dist
;
pip
install
@(
Get-ChildItem
*.gz
)
-v
;
Assert-Output
$?
}
}
elseif
(
$
env
:
TASK
-eq
"bdist"
)
{
elseif
(
$
env
:
TASK
-eq
"bdist"
)
{
# Import the Chocolatey profile module so that the RefreshEnv command
# Import the Chocolatey profile module so that the RefreshEnv command
# invoked below properly updates the current PowerShell session environment.
# invoked below properly updates the current PowerShell session environment.
$module
=
"
$
env
:
ChocolateyInstall
\helpers\chocolateyProfile.psm1"
$module
=
"
$
env
:
ChocolateyInstall
\helpers\chocolateyProfile.psm1"
Import-Module
"
$module
"
;
Assert-Output
$?
Import-Module
"
$module
"
;
Assert-Output
$?
RefreshEnv
RefreshEnv
Write-Output
"Current OpenCL drivers:"
Write-Output
"Current OpenCL drivers:"
Get-ItemProperty
-Path
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
Get-ItemProperty
-Path
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
conda
activate
$
env
:
CONDA_ENV
conda
activate
$
env
:
CONDA_ENV
sh
"build-python.sh"
bdist_wheel
--integrated-opencl
;
Assert-Output
$?
sh
"build-python.sh"
bdist_wheel
--integrated-opencl
;
Assert-Output
$?
sh
.
/.ci/check-python-dists.sh
.
/dist
;
Assert-Output
$?
sh
.
/.ci/check-python-dists.sh
.
/dist
;
Assert-Output
$?
cd
dist
;
pip
install
@(
Get-ChildItem
*py
3
-none-win_amd
64
.whl
)
;
Assert-Output
$?
cd
dist
;
pip
install
@(
Get-ChildItem
*py
3
-none-win_amd
64
.whl
)
;
Assert-Output
$?
cp
@(
Get-ChildItem
*py
3
-none-win_amd
64
.whl
)
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
cp
@(
Get-ChildItem
*py
3
-none-win_amd
64
.whl
)
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
}
elseif
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
))
{
}
elseif
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
))
{
if
(
$
env
:
COMPILER
-eq
"MINGW"
)
{
if
(
$
env
:
COMPILER
-eq
"MINGW"
)
{
sh
.
/build-python.sh
install
--mingw
;
Assert-Output
$?
sh
.
/build-python.sh
install
--mingw
;
Assert-Output
$?
}
else
{
}
else
{
sh
.
/build-python.sh
install
;
Assert-Output
$?
sh
.
/build-python.sh
install
;
Assert-Output
$?
}
}
}
}
if
((
$
env
:
TASK
-eq
"sdist"
)
-or
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
)))
{
if
((
$
env
:
TASK
-eq
"sdist"
)
-or
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
)))
{
# cannot test C API with "sdist" task
# cannot test C API with "sdist" task
$tests
=
$
env
:
BUILD_SOURCESDIRECTORY
+
"/tests/python_package_test"
$tests
=
$
env
:
BUILD_SOURCESDIRECTORY
+
"/tests/python_package_test"
}
else
{
}
else
{
$tests
=
$
env
:
BUILD_SOURCESDIRECTORY
+
"/tests"
$tests
=
$
env
:
BUILD_SOURCESDIRECTORY
+
"/tests"
}
}
if
(
$
env
:
TASK
-eq
"bdist"
)
{
if
(
$
env
:
TASK
-eq
"bdist"
)
{
# Make sure we can do both CPU and GPU; see tests/python_package_test/test_dual.py
# Make sure we can do both CPU and GPU; see tests/python_package_test/test_dual.py
$
env
:
LIGHTGBM_TEST_DUAL_CPU_GPU
=
"1"
$
env
:
LIGHTGBM_TEST_DUAL_CPU_GPU
=
"1"
}
}
pytest
$tests
;
Assert-Output
$?
pytest
$tests
;
Assert-Output
$?
if
((
$
env
:
TASK
-eq
"regular"
)
-or
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
)))
{
if
((
$
env
:
TASK
-eq
"regular"
)
-or
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
)))
{
cd
$
env
:
BUILD_SOURCESDIRECTORY
/examples/python-guide
cd
$
env
:
BUILD_SOURCESDIRECTORY
/examples/python-guide
@(
"import matplotlib"
,
"matplotlib.use('Agg')"
)
+
(
Get-Content
"plot_example.py"
)
|
Set-Content
"plot_example.py"
@(
"import matplotlib"
,
"matplotlib.use('Agg')"
)
+
(
Get-Content
"plot_example.py"
)
|
Set-Content
"plot_example.py"
(
Get-Content
"plot_example.py"
)
.
replace
(
'graph.render(view=True)'
,
'graph.render(view=False)'
)
|
Set-Content
"plot_example.py"
# prevent interactive window mode
(
Get-Content
"plot_example.py"
)
.
replace
(
'graph.render(view=True)'
,
'graph.render(view=False)'
)
|
Set-Content
"plot_example.py"
# prevent interactive window mode
conda
install
-y
-n
$
env
:
CONDA_ENV
"h5py>=3.10"
"ipywidgets>=8.1.2"
"notebook>=7.1.2"
conda
install
-y
-n
$
env
:
CONDA_ENV
"h5py>=3.10"
"ipywidgets>=8.1.2"
"notebook>=7.1.2"
foreach
(
$file
in
@(
Get-ChildItem
*.py
))
{
foreach
(
$file
in
@(
Get-ChildItem
*.py
))
{
@(
"import sys, warnings"
,
"warnings.showwarning = lambda message, category, filename, lineno, file=None, line=None: sys.stdout.write(warnings.formatwarning(message, category, filename, lineno, line))"
)
+
(
Get-Content
$file
)
|
Set-Content
$file
@(
"import sys, warnings"
,
"warnings.showwarning = lambda message, category, filename, lineno, file=None, line=None: sys.stdout.write(warnings.formatwarning(message, category, filename, lineno, line))"
)
+
(
Get-Content
$file
)
|
Set-Content
$file
python
$file
;
Assert-Output
$?
python
$file
;
Assert-Output
$?
}
# run all examples
}
# run all examples
cd
$
env
:
BUILD_SOURCESDIRECTORY
/examples/python-guide/notebooks
cd
$
env
:
BUILD_SOURCESDIRECTORY
/examples/python-guide/notebooks
(
Get-Content
"interactive_plot_example.ipynb"
)
.
replace
(
'INTERACTIVE = False'
,
'assert False, \"Interactive mode disabled\"'
)
|
Set-Content
"interactive_plot_example.ipynb"
(
Get-Content
"interactive_plot_example.ipynb"
)
.
replace
(
'INTERACTIVE = False'
,
'assert False, \"Interactive mode disabled\"'
)
|
Set-Content
"interactive_plot_example.ipynb"
jupyter
nbconvert
--ExecutePreprocessor
.
timeout
=
180
--to
notebook
--execute
--inplace
*.
ipynb
;
Assert-Output
$?
# run all notebooks
jupyter
nbconvert
--ExecutePreprocessor
.
timeout
=
180
--to
notebook
--execute
--inplace
*.
ipynb
;
Assert-Output
$?
# run all notebooks
}
}
.ci/test.sh
View file @
92aa07b4
...
@@ -100,7 +100,7 @@ fi
...
@@ -100,7 +100,7 @@ fi
if
[[
$TASK
==
"lint"
]]
;
then
if
[[
$TASK
==
"lint"
]]
;
then
pwsh
-command
"Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -SkipPublisherCheck"
pwsh
-command
"Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -SkipPublisherCheck"
echo
"Linting PowerShell code"
echo
"Linting PowerShell code"
pwsh
-file
"./.ci/lint-powershell.ps1"
||
exit
0
pwsh
-file
"./.ci/lint-powershell.ps1"
||
:
conda create
-q
-y
-n
"
${
CONDA_ENV
}
"
\
conda create
-q
-y
-n
"
${
CONDA_ENV
}
"
\
"
${
CONDA_PYTHON_REQUIREMENT
}
"
\
"
${
CONDA_PYTHON_REQUIREMENT
}
"
\
'cmakelint>=1.4.3'
\
'cmakelint>=1.4.3'
\
...
...
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