Unverified Commit 59c73133 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] fix locale-setting in jobs running in ubuntu container (#5643)

parent fffd066c
...@@ -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
......
...@@ -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
......
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment