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
35a2a2e3
Unverified
Commit
35a2a2e3
authored
Jul 31, 2024
by
Nikita Titov
Committed by
GitHub
Jul 31, 2024
Browse files
[ci] place all CI helpers under the .ci folder and use - instead of _ in their names (#6581)
parent
2f60e115
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
32 additions
and
32 deletions
+32
-32
.appveyor.yml
.appveyor.yml
+1
-1
.ci/append-comment.sh
.ci/append-comment.sh
+1
-1
.ci/check-dynamic-dependencies.py
.ci/check-dynamic-dependencies.py
+0
-0
.ci/check-python-dists.sh
.ci/check-python-dists.sh
+0
-0
.ci/create-nuget.py
.ci/create-nuget.py
+0
-0
.ci/get-workflow-status.py
.ci/get-workflow-status.py
+1
-1
.ci/install-opencl.ps1
.ci/install-opencl.ps1
+0
-0
.ci/lint-r-code.R
.ci/lint-r-code.R
+0
-0
.ci/parameter-generator.py
.ci/parameter-generator.py
+1
-1
.ci/rerun-workflow.sh
.ci/rerun-workflow.sh
+1
-1
.ci/set-commit-status.sh
.ci/set-commit-status.sh
+1
-1
.ci/test-r-package-valgrind.sh
.ci/test-r-package-valgrind.sh
+0
-0
.ci/test-r-package-windows.ps1
.ci/test-r-package-windows.ps1
+0
-0
.ci/test-r-package.sh
.ci/test-r-package.sh
+0
-0
.ci/test-windows.ps1
.ci/test-windows.ps1
+3
-3
.ci/test.sh
.ci/test.sh
+14
-14
.ci/trigger-dispatch-run.sh
.ci/trigger-dispatch-run.sh
+1
-1
.github/workflows/optional_checks.yml
.github/workflows/optional_checks.yml
+1
-1
.github/workflows/r_package.yml
.github/workflows/r_package.yml
+1
-1
.github/workflows/r_valgrind.yml
.github/workflows/r_valgrind.yml
+6
-6
No files found.
.appveyor.yml
View file @
35a2a2e3
...
...
@@ -39,4 +39,4 @@ test_script:
-
conda config --add channels conda-forge
-
conda config --set channel_priority strict
-
conda init powershell
-
powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test
_
windows.ps1
-
powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test
-
windows.ps1
.ci/append
_
comment.sh
→
.ci/append
-
comment.sh
View file @
35a2a2e3
...
...
@@ -4,7 +4,7 @@
# Update comment appending a given body to the specified original comment.
#
# [usage]
# append
_
comment.sh <COMMENT_ID> <BODY>
# append
-
comment.sh <COMMENT_ID> <BODY>
#
# COMMENT_ID: ID of comment that should be modified.
#
...
...
helpers
/check
_
dynamic
_
dependencies.py
→
.ci
/check
-
dynamic
-
dependencies.py
View file @
35a2a2e3
File moved
.ci/check
_
python
_
dists.sh
→
.ci/check
-
python
-
dists.sh
View file @
35a2a2e3
File moved
.
nuget
/create
_
nuget.py
→
.
ci
/create
-
nuget.py
View file @
35a2a2e3
File moved
.ci/get
_
workflow
_
status.py
→
.ci/get
-
workflow
-
status.py
View file @
35a2a2e3
...
...
@@ -2,7 +2,7 @@
"""Get the most recent status of workflow for the current PR.
[usage]
python get
_
workflow
_
status.py TRIGGER_PHRASE
python get
-
workflow
-
status.py TRIGGER_PHRASE
TRIGGER_PHRASE: Code phrase that triggers workflow.
"""
...
...
.ci/install
_
opencl.ps1
→
.ci/install
-
opencl.ps1
View file @
35a2a2e3
File moved
.ci/lint
_r_
code.R
→
.ci/lint
-r-
code.R
View file @
35a2a2e3
File moved
helpers
/parameter
_
generator.py
→
.ci
/parameter
-
generator.py
View file @
35a2a2e3
...
...
@@ -286,7 +286,7 @@ def gen_parameter_code(
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*
* \note
* This file is auto generated by LightGBM\
helpers
\parameter
_
generator.py from LightGBM\include\LightGBM\config.h file.
* This file is auto generated by LightGBM\
.ci
\parameter
-
generator.py from LightGBM\include\LightGBM\config.h file.
*/
"""
str_to_write
+=
"#include<LightGBM/config.h>
\n
namespace LightGBM {
\n
"
...
...
.ci/rerun
_
workflow.sh
→
.ci/rerun
-
workflow.sh
View file @
35a2a2e3
...
...
@@ -4,7 +4,7 @@
# Rerun specified workflow for given pull request.
#
# [usage]
# rerun
_
workflow.sh <WORKFLOW_ID> <PR_NUMBER> <PR_BRANCH>
# rerun
-
workflow.sh <WORKFLOW_ID> <PR_NUMBER> <PR_BRANCH>
#
# WORKFLOW_ID: Identifier (config name of ID) of a workflow to be rerun.
#
...
...
.ci/set
_
commit
_
status.sh
→
.ci/set
-
commit
-
status.sh
View file @
35a2a2e3
...
...
@@ -4,7 +4,7 @@
# Set a status with a given name to the specified commit.
#
# [usage]
# set
_
commit
_
status.sh <NAME> <STATUS> <SHA>
# set
-
commit
-
status.sh <NAME> <STATUS> <SHA>
#
# NAME: Name of status.
# Status with existing name overwrites a previous one.
...
...
.ci/test
_r_
package
_
valgrind.sh
→
.ci/test
-r-
package
-
valgrind.sh
View file @
35a2a2e3
File moved
.ci/test
_r_
package
_
windows.ps1
→
.ci/test
-r-
package
-
windows.ps1
View file @
35a2a2e3
File moved
.ci/test
_r_
package.sh
→
.ci/test
-r-
package.sh
View file @
35a2a2e3
File moved
.ci/test
_
windows.ps1
→
.ci/test
-
windows.ps1
View file @
35a2a2e3
...
...
@@ -17,7 +17,7 @@ Remove-Item $env:TMPDIR -Force -Recurse -ErrorAction Ignore
[
Void
][
System.IO.Directory
]::
CreateDirectory
(
$
env
:
TMPDIR
)
if
(
$
env
:
TASK
-eq
"r-package"
)
{
&
.
\.ci\test
_r_
package
_
windows.ps1
;
Check-Output
$?
&
.
\.ci\test
-r-
package
-
windows.ps1
;
Check-Output
$?
Exit
0
}
...
...
@@ -77,7 +77,7 @@ if ($env:TASK -eq "regular") {
}
elseif
(
$
env
:
TASK
-eq
"sdist"
)
{
sh
.
/build-python.sh
sdist
;
Check-Output
$?
sh
.
/.ci/check
_
python
_
dists.sh
.
/dist
;
Check-Output
$?
sh
.
/.ci/check
-
python
-
dists.sh
.
/dist
;
Check-Output
$?
cd
dist
;
pip
install
@(
Get-ChildItem
*.gz
)
-v
;
Check-Output
$?
}
elseif
(
$
env
:
TASK
-eq
"bdist"
)
{
...
...
@@ -92,7 +92,7 @@ elseif ($env:TASK -eq "bdist") {
conda
activate
$
env
:
CONDA_ENV
sh
"build-python.sh"
bdist_wheel
--integrated-opencl
;
Check-Output
$?
sh
.
/.ci/check
_
python
_
dists.sh
.
/dist
;
Check-Output
$?
sh
.
/.ci/check
-
python
-
dists.sh
.
/dist
;
Check-Output
$?
cd
dist
;
pip
install
@(
Get-ChildItem
*py
3
-none-win_amd
64
.whl
)
;
Check-Output
$?
cp
@(
Get-ChildItem
*py
3
-none-win_amd
64
.whl
)
$
env
:
BUILD_ARTIFACTSTAGINGDIRECTORY
}
elseif
((
$
env
:
APPVEYOR
-eq
"true"
)
-and
(
$
env
:
TASK
-eq
"python"
))
{
...
...
.ci/test.sh
View file @
35a2a2e3
...
...
@@ -43,7 +43,7 @@ else
fi
if
[[
"
${
TASK
}
"
==
"r-package"
]]
||
[[
"
${
TASK
}
"
==
"r-rchk"
]]
;
then
bash
"
${
BUILD_DIRECTORY
}
/.ci/test
_r_
package.sh"
||
exit
1
bash
"
${
BUILD_DIRECTORY
}
/.ci/test
-r-
package.sh"
||
exit
1
exit
0
fi
...
...
@@ -86,7 +86,7 @@ if [[ $TASK == "swig" ]]; then
if
[[
$OS_NAME
==
"linux"
]]
&&
[[
$COMPILER
==
"gcc"
]]
;
then
objdump
-T
./lib_lightgbm.so
>
./objdump.log
||
exit
1
objdump
-T
./lib_lightgbm_swig.so
>>
./objdump.log
||
exit
1
python ./
helpers
/check
_
dynamic
_
dependencies.py ./objdump.log
||
exit
1
python ./
.ci
/check
-
dynamic
-
dependencies.py ./objdump.log
||
exit
1
fi
if
[[
$PRODUCES_ARTIFACTS
==
"true"
]]
;
then
cp
./build/lightgbmlib.jar
$BUILD_ARTIFACTSTAGINGDIRECTORY
/lightgbmlib_
$OS_NAME
.jar
...
...
@@ -108,7 +108,7 @@ if [[ $TASK == "lint" ]]; then
echo
"Linting Python code"
bash ./.ci/lint-python.sh
||
exit
1
echo
"Linting R code"
Rscript ./.ci/lint
_r_
code.R
"
${
BUILD_DIRECTORY
}
"
||
exit
1
Rscript ./.ci/lint
-r-
code.R
"
${
BUILD_DIRECTORY
}
"
||
exit
1
echo
"Linting C++ code"
bash ./.ci/lint-cpp.sh
||
exit
1
exit
0
...
...
@@ -143,7 +143,7 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
cd
"
${
BUILD_DIRECTORY
}
"
cp
./docs/Parameters.rst ./docs/Parameters-backup.rst
cp
./src/io/config_auto.cpp ./src/io/config_auto-backup.cpp
python ./
helpers
/parameter
_
generator.py
||
exit
1
python ./
.ci
/parameter
-
generator.py
||
exit
1
diff ./docs/Parameters-backup.rst ./docs/Parameters.rst
||
exit
1
diff ./src/io/config_auto-backup.cpp ./src/io/config_auto.cpp
||
exit
1
exit
0
...
...
@@ -170,7 +170,7 @@ cd "${BUILD_DIRECTORY}"
if
[[
$TASK
==
"sdist"
]]
;
then
sh ./build-python.sh sdist
||
exit
1
sh .ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh .ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
./dist/lightgbm-
$LGB_VER
.tar.gz
-v
||
exit
1
if
[[
$PRODUCES_ARTIFACTS
==
"true"
]]
;
then
cp
./dist/lightgbm-
$LGB_VER
.tar.gz
$BUILD_ARTIFACTSTAGINGDIRECTORY
||
exit
1
...
...
@@ -180,7 +180,7 @@ if [[ $TASK == "sdist" ]]; then
elif
[[
$TASK
==
"bdist"
]]
;
then
if
[[
$OS_NAME
==
"macos"
]]
;
then
sh ./build-python.sh bdist_wheel
||
exit
1
sh .ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh .ci/check
-
python
-
dists.sh ./dist
||
exit
1
if
[[
$PRODUCES_ARTIFACTS
==
"true"
]]
;
then
cp
dist/lightgbm-
$LGB_VER
-py3-none-macosx
*
.whl
$BUILD_ARTIFACTSTAGINGDIRECTORY
||
exit
1
fi
...
...
@@ -199,7 +199,7 @@ elif [[ $TASK == "bdist" ]]; then
mv
\
./dist/tmp.whl
\
./dist/lightgbm-
$LGB_VER
-py3-none-
$PLATFORM
.whl
||
exit
1
sh .ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh .ci/check
-
python
-
dists.sh ./dist
||
exit
1
if
[[
$PRODUCES_ARTIFACTS
==
"true"
]]
;
then
cp
dist/lightgbm-
$LGB_VER
-py3-none-
$PLATFORM
.whl
$BUILD_ARTIFACTSTAGINGDIRECTORY
||
exit
1
fi
...
...
@@ -216,7 +216,7 @@ if [[ $TASK == "gpu" ]]; then
grep
-q
'std::string device_type = "gpu"'
./include/LightGBM/config.h
||
exit
1
# make sure that changes were really done
if
[[
$METHOD
==
"pip"
]]
;
then
sh ./build-python.sh sdist
||
exit
1
sh .ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh .ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
\
-v
\
--config-settings
=
cmake.define.USE_GPU
=
ON
\
...
...
@@ -226,7 +226,7 @@ if [[ $TASK == "gpu" ]]; then
exit
0
elif
[[
$METHOD
==
"wheel"
]]
;
then
sh ./build-python.sh bdist_wheel
--gpu
||
exit
1
sh ./.ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh ./.ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
./dist/lightgbm-
$LGB_VER
*
.whl
-v
||
exit
1
pytest ./tests
||
exit
1
exit
0
...
...
@@ -241,7 +241,7 @@ elif [[ $TASK == "cuda" ]]; then
grep
-q
'gpu_use_dp = true'
./include/LightGBM/config.h
||
exit
1
# make sure that changes were really done
if
[[
$METHOD
==
"pip"
]]
;
then
sh ./build-python.sh sdist
||
exit
1
sh ./.ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh ./.ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
\
-v
\
--config-settings
=
cmake.define.USE_CUDA
=
ON
\
...
...
@@ -251,7 +251,7 @@ elif [[ $TASK == "cuda" ]]; then
exit
0
elif
[[
$METHOD
==
"wheel"
]]
;
then
sh ./build-python.sh bdist_wheel
--cuda
||
exit
1
sh ./.ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh ./.ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
./dist/lightgbm-
$LGB_VER
*
.whl
-v
||
exit
1
pytest ./tests
||
exit
1
exit
0
...
...
@@ -261,7 +261,7 @@ elif [[ $TASK == "cuda" ]]; then
elif
[[
$TASK
==
"mpi"
]]
;
then
if
[[
$METHOD
==
"pip"
]]
;
then
sh ./build-python.sh sdist
||
exit
1
sh ./.ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh ./.ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
\
-v
\
--config-settings
=
cmake.define.USE_MPI
=
ON
\
...
...
@@ -271,7 +271,7 @@ elif [[ $TASK == "mpi" ]]; then
exit
0
elif
[[
$METHOD
==
"wheel"
]]
;
then
sh ./build-python.sh bdist_wheel
--mpi
||
exit
1
sh ./.ci/check
_
python
_
dists.sh ./dist
||
exit
1
sh ./.ci/check
-
python
-
dists.sh ./dist
||
exit
1
pip
install
./dist/lightgbm-
$LGB_VER
*
.whl
-v
||
exit
1
pytest ./tests
||
exit
1
exit
0
...
...
@@ -294,7 +294,7 @@ if [[ $TASK == "regular" ]]; then
else
if
[[
$COMPILER
==
"gcc"
]]
;
then
objdump
-T
./lib_lightgbm.so
>
./objdump.log
||
exit
1
python ./
helpers
/check
_
dynamic
_
dependencies.py ./objdump.log
||
exit
1
python ./
.ci
/check
-
dynamic
-
dependencies.py ./objdump.log
||
exit
1
fi
cp
./lib_lightgbm.so
$BUILD_ARTIFACTSTAGINGDIRECTORY
/lib_lightgbm.so
fi
...
...
.ci/trigger
_
dispatch
_
run.sh
→
.ci/trigger
-
dispatch
-
run.sh
View file @
35a2a2e3
...
...
@@ -4,7 +4,7 @@
# Trigger manual workflow run by a dispatch event.
#
# [usage]
# trigger
_
dispatch
_
run.sh <PR_URL> <COMMENT_ID> <DISPATCH_NAME>
# trigger
-
dispatch
-
run.sh <PR_URL> <COMMENT_ID> <DISPATCH_NAME>
#
# PR_URL: URL of pull request from which dispatch is triggering.
#
...
...
.github/workflows/optional_checks.yml
View file @
35a2a2e3
...
...
@@ -23,7 +23,7 @@ jobs:
for i in "${workflows[@]}"; do
workflow_name=${i%;*}
trigger_phrase=${i#*;}
python "$GITHUB_WORKSPACE/.ci/get
_
workflow
_
status.py" "$trigger_phrase" \
python "$GITHUB_WORKSPACE/.ci/get
-
workflow
-
status.py" "$trigger_phrase" \
|| { echo "The last reported status from workflow \"$workflow_name\" is failure. Commit fixes and rerun the workflow."; \
exit 1; }
done
.github/workflows/r_package.yml
View file @
35a2a2e3
...
...
@@ -226,7 +226,7 @@ jobs:
$env:R_BUILD_TYPE = "${{ matrix.build_type }}"
$env:COMPILER = "${{ matrix.compiler }}"
$env:TASK = "${{ matrix.task }}"
& "$env:GITHUB_WORKSPACE/.ci/test
_
windows.ps1"
& "$env:GITHUB_WORKSPACE/.ci/test
-
windows.ps1"
test-r-sanitizers
:
name
:
r-sanitizers (ubuntu-latest, R-devel, ${{ matrix.compiler }} ASAN/UBSAN)
timeout-minutes
:
60
...
...
.github/workflows/r_valgrind.yml
View file @
35a2a2e3
...
...
@@ -33,24 +33,24 @@ jobs:
-
name
:
Send init status
if
:
${{ always() }}
run
:
|
$GITHUB_WORKSPACE/.ci/set
_
commit
_
status.sh "${{ github.workflow }}" "pending" "${{ github.event.client_payload.pr_sha }}"
$GITHUB_WORKSPACE/.ci/append
_
comment.sh \
$GITHUB_WORKSPACE/.ci/set
-
commit
-
status.sh "${{ github.workflow }}" "pending" "${{ github.event.client_payload.pr_sha }}"
$GITHUB_WORKSPACE/.ci/append
-
comment.sh \
"${{ github.event.client_payload.comment_number }}" \
"Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}"
-
name
:
Run tests with valgrind
shell
:
bash
run
:
./.ci/test
_r_
package
_
valgrind.sh
run
:
./.ci/test
-r-
package
-
valgrind.sh
-
name
:
Send final status
if
:
${{ always() }}
run
:
|
$GITHUB_WORKSPACE/.ci/set
_
commit
_
status.sh "${{ github.workflow }}" "${{ job.status }}" "${{ github.event.client_payload.pr_sha }}"
$GITHUB_WORKSPACE/.ci/append
_
comment.sh \
$GITHUB_WORKSPACE/.ci/set
-
commit
-
status.sh "${{ github.workflow }}" "${{ job.status }}" "${{ github.event.client_payload.pr_sha }}"
$GITHUB_WORKSPACE/.ci/append
-
comment.sh \
"${{ github.event.client_payload.comment_number }}" \
"Status: ${{ job.status }}."
-
name
:
Rerun workflow-indicator
if
:
${{ always() }}
run
:
|
bash $GITHUB_WORKSPACE/.ci/rerun
_
workflow.sh \
bash $GITHUB_WORKSPACE/.ci/rerun
-
workflow.sh \
"optional_checks.yml" \
"${{ github.event.client_payload.pr_number }}" \
"${{ github.event.client_payload.pr_branch }}" \
...
...
Prev
1
2
Next
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