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
cc733f85
Unverified
Commit
cc733f85
authored
Feb 09, 2024
by
James Lamb
Committed by
GitHub
Feb 09, 2024
Browse files
[ci] ensure shell script exit codes are in range 0-255 (#6305)
parent
ecfdc76c
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
21 deletions
+21
-21
.github/workflows/static_analysis.yml
.github/workflows/static_analysis.yml
+6
-6
.vsts-ci.yml
.vsts-ci.yml
+6
-6
R-package/recreate-configure.sh
R-package/recreate-configure.sh
+1
-1
build-cran-package.sh
build-cran-package.sh
+1
-1
build-python.sh
build-python.sh
+1
-1
docs/build-docs.sh
docs/build-docs.sh
+2
-2
docs/conf.py
docs/conf.py
+4
-4
No files found.
.github/workflows/static_analysis.yml
View file @
cc733f85
...
...
@@ -47,8 +47,8 @@ jobs:
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export CONDA=${HOME}/miniforge
export PATH=${CONDA}/bin:$HOME/.local/bin:${PATH}
$GITHUB_WORKSPACE/.ci/setup.sh || exit
-
1
$GITHUB_WORKSPACE/.ci/test.sh || exit
-
1
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1
$GITHUB_WORKSPACE/.ci/test.sh || exit 1
r-check-docs
:
name
:
r-package-check-docs
timeout-minutes
:
60
...
...
@@ -67,12 +67,12 @@ jobs:
shell
:
bash
run
:
|
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
sh build-cran-package.sh || exit
-
1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit
-
1
sh build-cran-package.sh || exit 1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit 1
-
name
:
Test documentation
shell
:
bash --noprofile --norc {0}
run
:
|
Rscript --vanilla -e "roxygen2::roxygenize('R-package/', load = 'installed')" || exit
-
1
Rscript --vanilla -e "roxygen2::roxygenize('R-package/', load = 'installed')" || exit 1
num_doc_files_changed=$(
git diff --name-only | grep --count -E "\.Rd|NAMESPACE"
)
...
...
@@ -83,7 +83,7 @@ jobs:
echo " R CMD INSTALL --with-keep.source lightgbm_*.tar.gz"
echo " Rscript -e \"roxygen2::roxygenize('R-package/', load = 'installed')\""
echo ""
exit
-
1
exit 1
fi
all-static-analysis-jobs-successful
:
if
:
always()
...
...
.vsts-ci.yml
View file @
cc733f85
...
...
@@ -189,12 +189,12 @@ jobs:
export CONDA=\$HOME/miniforge
export PATH=\$CONDA/bin:/opt/rh/llvm-toolset-7.0/root/usr/bin:\$PATH
export LD_LIBRARY_PATH=/opt/rh/llvm-toolset-7.0/root/usr/lib64:\$LD_LIBRARY_PATH
$ROOT_DOCKER_FOLDER/.ci/setup.sh || exit
-
1
$ROOT_DOCKER_FOLDER/.ci/test.sh || exit
-
1
$ROOT_DOCKER_FOLDER/.ci/setup.sh || exit 1
$ROOT_DOCKER_FOLDER/.ci/test.sh || exit 1
EOF
IMAGE_URI="lightgbm/vsts-agent:manylinux2014_aarch64"
docker pull "${IMAGE_URI}" || exit
-
1
PLATFORM=$(docker inspect --format='{{.Os}}/{{.Architecture}}' "${IMAGE_URI}") || exit
-
1
docker pull "${IMAGE_URI}" || exit 1
PLATFORM=$(docker inspect --format='{{.Os}}/{{.Architecture}}' "${IMAGE_URI}") || exit 1
echo "detected image platform: ${PLATFORM}"
docker run \
--platform "${PLATFORM}" \
...
...
@@ -309,8 +309,8 @@ jobs:
R_LIB_PATH=~/Rlib
export R_LIBS=${R_LIB_PATH}
mkdir -p ${R_LIB_PATH}
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" || exit
-
1
sh build-cran-package.sh --r-executable=RD || exit
-
1
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" || exit 1
sh build-cran-package.sh --r-executable=RD || exit 1
mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
displayName
:
'
Build
CRAN
R-package'
-
task
:
PublishBuildArtifacts@1
...
...
R-package/recreate-configure.sh
View file @
cc733f85
...
...
@@ -28,7 +28,7 @@ sed -i.bak -e "s/~~VERSION~~/${LGB_VERSION}/" ${TMP_CONFIGURE_AC}
autoconf
\
--output
configure
\
${
TMP_CONFIGURE_AC
}
\
||
exit
-
1
||
exit
1
rm
${
TMP_CONFIGURE_AC
}
...
...
build-cran-package.sh
View file @
cc733f85
...
...
@@ -43,7 +43,7 @@ while [ $# -gt 0 ]; do
;;
*
)
echo
"invalid argument '
${
1
}
'"
exit
-
1
exit
1
;;
esac
shift
...
...
build-python.sh
View file @
cc733f85
...
...
@@ -180,7 +180,7 @@ while [ $# -gt 0 ]; do
;;
*
)
echo
"invalid argument '
${
1
}
'"
exit
-
1
exit
1
;;
esac
shift
...
...
docs/build-docs.sh
View file @
cc733f85
...
...
@@ -16,9 +16,9 @@ conda update -q -y conda
conda
env
create
\
--name
docs-env
\
--file
env.yml
||
exit
-
1
--file
env.yml
||
exit
1
source
activate docs-env
make clean html
||
exit
-
1
make clean html
||
exit
1
echo
"Done building docs. Open docs/_build/html/index.html in a web browser to view them."
docs/conf.py
View file @
cc733f85
...
...
@@ -270,13 +270,13 @@ def generate_r_docs(app: Sphinx) -> None:
export TAR=/bin/tar
cd
{
CURR_PATH
.
parent
}
export R_LIBS="$CONDA_PREFIX/lib/R/library"
sh build-cran-package.sh || exit
-
1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit
-
1
sh build-cran-package.sh || exit 1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit 1
cp -R
\
{
CURR_PATH
.
parent
/
"R-package"
/
"pkgdown"
}
\
{
CURR_PATH
.
parent
/
"lightgbm_r"
/
"pkgdown"
}
cd
{
CURR_PATH
.
parent
/
"lightgbm_r"
}
Rscript -e "roxygen2::roxygenize(load = 'installed')" || exit
-
1
Rscript -e "roxygen2::roxygenize(load = 'installed')" || exit 1
Rscript -e "pkgdown::build_site(
\
lazy = FALSE
\
, install = FALSE
\
...
...
@@ -287,7 +287,7 @@ def generate_r_docs(app: Sphinx) -> None:
, preview = FALSE
\
, new_process = TRUE
\
)
" || exit
-
1
" || exit 1
cd
{
CURR_PATH
.
parent
}
"""
try
:
...
...
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