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
59c73133
Unverified
Commit
59c73133
authored
Dec 28, 2022
by
James Lamb
Committed by
GitHub
Dec 28, 2022
Browse files
[ci] fix locale-setting in jobs running in ubuntu container (#5643)
parent
fffd066c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
.ci/setup.sh
.ci/setup.sh
+6
-6
.ci/test.sh
.ci/test.sh
+5
-0
.vsts-ci.yml
.vsts-ci.yml
+1
-1
No files found.
.ci/setup.sh
View file @
59c73133
...
@@ -23,7 +23,7 @@ if [[ $OS_NAME == "macos" ]]; then
...
@@ -23,7 +23,7 @@ if [[ $OS_NAME == "macos" ]]; then
-o
miniforge.sh
\
-o
miniforge.sh
\
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh
else
# Linux
else
# Linux
if
[[
$IN_UBUNTU_
LATEST
_CONTAINER
==
"true"
]]
;
then
if
[[
$IN_UBUNTU_
BASE
_CONTAINER
==
"true"
]]
;
then
# fixes error "unable to initialize frontend: Dialog"
# fixes error "unable to initialize frontend: Dialog"
# https://github.com/moby/moby/issues/27988#issuecomment-462809153
# https://github.com/moby/moby/issues/27988#issuecomment-462809153
echo
'debconf debconf/frontend select Noninteractive'
|
sudo
debconf-set-selections
echo
'debconf debconf/frontend select Noninteractive'
|
sudo
debconf-set-selections
...
@@ -46,6 +46,7 @@ else # Linux
...
@@ -46,6 +46,7 @@ else # Linux
libssl-dev
\
libssl-dev
\
libunwind8
\
libunwind8
\
locales
\
locales
\
locales-all
\
netcat
\
netcat
\
unzip
\
unzip
\
zip
||
exit
-1
zip
||
exit
-1
...
@@ -56,16 +57,15 @@ else # Linux
...
@@ -56,16 +57,15 @@ else # Linux
fi
fi
export
LANG
=
"en_US.UTF-8"
export
LANG
=
"en_US.UTF-8"
sudo
update-locale
LANG
=
${
LANG
}
export
LC_ALL
=
"
${
LANG
}
"
export
LC_ALL
=
"
${
LANG
}
"
sudo
locale-gen
${
LANG
}
sudo
update-locale
fi
fi
if
[[
$TASK
==
"r-package"
]]
&&
[[
$COMPILER
==
"clang"
]]
;
then
if
[[
$TASK
==
"r-package"
]]
&&
[[
$COMPILER
==
"clang"
]]
;
then
sudo
apt-get
install
--no-install-recommends
-y
\
sudo
apt-get
install
--no-install-recommends
-y
\
libomp-dev
libomp-dev
fi
fi
if
[[
$TASK
==
"mpi"
]]
;
then
if
[[
$TASK
==
"mpi"
]]
;
then
if
[[
$IN_UBUNTU_
LATEST
_CONTAINER
==
"true"
]]
;
then
if
[[
$IN_UBUNTU_
BASE
_CONTAINER
==
"true"
]]
;
then
sudo
apt-get update
sudo
apt-get update
sudo
apt-get
install
--no-install-recommends
-y
\
sudo
apt-get
install
--no-install-recommends
-y
\
libopenmpi-dev
\
libopenmpi-dev
\
...
@@ -78,7 +78,7 @@ else # Linux
...
@@ -78,7 +78,7 @@ else # Linux
fi
fi
fi
fi
if
[[
$TASK
==
"gpu"
]]
;
then
if
[[
$TASK
==
"gpu"
]]
;
then
if
[[
$IN_UBUNTU_
LATEST
_CONTAINER
==
"true"
]]
;
then
if
[[
$IN_UBUNTU_
BASE
_CONTAINER
==
"true"
]]
;
then
sudo
apt-get update
sudo
apt-get update
sudo
apt-get
install
--no-install-recommends
-y
\
sudo
apt-get
install
--no-install-recommends
-y
\
libboost1.74-dev
\
libboost1.74-dev
\
...
@@ -94,7 +94,7 @@ else # Linux
...
@@ -94,7 +94,7 @@ else # Linux
fi
fi
fi
fi
if
[[
$TASK
==
"gpu"
||
$TASK
==
"bdist"
]]
;
then
if
[[
$TASK
==
"gpu"
||
$TASK
==
"bdist"
]]
;
then
if
[[
$IN_UBUNTU_
LATEST
_CONTAINER
==
"true"
]]
;
then
if
[[
$IN_UBUNTU_
BASE
_CONTAINER
==
"true"
]]
;
then
sudo
apt-get update
sudo
apt-get update
sudo
apt-get
install
--no-install-recommends
-y
\
sudo
apt-get
install
--no-install-recommends
-y
\
pocl-opencl-icd
pocl-opencl-icd
...
...
.ci/test.sh
View file @
59c73133
...
@@ -8,6 +8,11 @@ elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then
...
@@ -8,6 +8,11 @@ elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then
export
CC
=
clang
export
CC
=
clang
fi
fi
if
[[
$IN_UBUNTU_BASE_CONTAINER
==
"true"
]]
;
then
export
LANG
=
"en_US.UTF-8"
export
LC_ALL
=
"en_US.UTF-8"
fi
if
[[
"
${
TASK
}
"
==
"r-package"
]]
||
[[
"
${
TASK
}
"
==
"r-rchk"
]]
;
then
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
exit
0
...
...
.vsts-ci.yml
View file @
59c73133
...
@@ -84,7 +84,7 @@ jobs:
...
@@ -84,7 +84,7 @@ jobs:
variables
:
variables
:
COMPILER
:
clang
COMPILER
:
clang
DEBIAN_FRONTEND
:
'
noninteractive'
DEBIAN_FRONTEND
:
'
noninteractive'
IN_UBUNTU_
LATEST
_CONTAINER
:
'
true'
IN_UBUNTU_
BASE
_CONTAINER
:
'
true'
OS_NAME
:
'
linux'
OS_NAME
:
'
linux'
SETUP_CONDA
:
'
true'
SETUP_CONDA
:
'
true'
pool
:
sh-ubuntu
pool
:
sh-ubuntu
...
...
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