Skip to content

Commit

Permalink
ci: deal with CentOS 7 EOL and disappearance of yum mirrors
Browse files Browse the repository at this point in the history
This was breaking CI for us. Hard break for icc/icx tests, since those
REQUIRED a yum install of the intel compilers. Softer undetected break
for all the ASWF <= 2022 containers based on CentOS 7, which were not
failing outright but were failing to install certain optional
packages.

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Jul 7, 2024
1 parent 0b4e015 commit a20a660
Showing 1 changed file with 37 additions and 24 deletions.
61 changes: 37 additions & 24 deletions src/build-scripts/gh-installdeps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,35 @@ set -ex
# Install system packages when those are acceptable for dependencies.
#
if [[ "$ASWF_ORG" != "" ]] ; then
# Using ASWF CentOS container
# Using ASWF container

YUMARGS="-y"

#ls /etc/yum.repos.d

sudo yum install -y giflib giflib-devel && true
# This fix excludes the deprecated mirror. I think we can remove this when
# we no longer rely on CentOS 7 based containers.
if [[ "$ASWF_VFXPLATFORM_VERSION" == "2021" || "$ASWF_VFXPLATFORM_VERSION" == "2022" ]] ; then
# CentOS 7 based containers
echo "Adjusting CentOS-Base.repo"
yum-config-manager --disable centos-sclo-rh/x86_64 && true
yum-config-manager --disable centos-sclo-rh && true
sed -i 's,^mirrorlist=,#,; s,^#baseurl=http://mirror\.centos\.org/centos/$releasever,baseurl=https://vault.centos.org/7.9.2009,' /etc/yum.repos.d/CentOS-Base.repo
YUMARGS="$YUMARGS --disablerepo=centos-sclo-rh/x86_64"
fi

sudo yum install $YUMARGS giflib giflib-devel && true
if [[ "${USE_OPENCV}" != "0" ]] ; then
sudo yum install -y opencv opencv-devel && true
sudo yum install $YUMARGS opencv opencv-devel && true
fi
if [[ "${USE_FFMPEG}" != "0" ]] ; then
sudo yum install -y ffmpeg ffmpeg-devel && true
sudo yum install $YUMARGS ffmpeg ffmpeg-devel && true
fi
if [[ "${USE_FREETYPE:-1}" != "0" ]] ; then
sudo yum install -y freetype freetype-devel && true
sudo yum install $YUMARGS freetype freetype-devel && true
fi
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
time sudo yum install -y ${EXTRA_DEP_PACKAGES}
time sudo yum install $YUMARGS ${EXTRA_DEP_PACKAGES}
fi

if [[ "${CONAN_LLVM_VERSION}" != "" ]] ; then
Expand All @@ -55,15 +68,15 @@ if [[ "$ASWF_ORG" != "" ]] ; then
# repo require a glibc too new for the ASWF CentOS7-based containers
# we run CI on.
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
sudo /usr/bin/yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0.x86_64
sudo /usr/bin/yum install $YUMARGS intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0.x86_64
set +e; source /opt/intel/oneapi/setvars.sh --config oneapi_2022.1.0.cfg; set -e
elif [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$CXX" == "icpx" || "$CC" == "icx" || "$USE_ICX" != "" ]] ; then
# Lock down icx to 2023.1 because newer versions hosted on the Intel
# repo require a libstd++ too new for the ASWF containers we run CI on
# because their default install of gcc 9 based toolchain.
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.1.0.x86_64
# sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
sudo yum install $YUMARGS intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.1.0.x86_64
# sudo yum install $YUMARGS intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
set +e; source /opt/intel/oneapi/setvars.sh; set -e
echo "Verifying installation of Intel(r) oneAPI DPC++/C++ Compiler:"
icpx --version
Expand All @@ -76,12 +89,12 @@ else
time sudo apt-get update
fi

time sudo apt-get -q install -y \
time sudo apt-get -q install $YUMARGS \
git cmake ninja-build ccache g++ \
libilmbase-dev libopenexr-dev \
libtiff-dev libgif-dev libpng-dev
if [[ "${SKIP_SYSTEM_DEPS_INSTALL}" != "1" ]] ; then
time sudo apt-get -q install -y \
time sudo apt-get -q install $YUMARGS \
libraw-dev libwebp-dev \
libavcodec-dev libavformat-dev libswscale-dev libavutil-dev \
dcmtk libopenvdb-dev \
Expand All @@ -91,18 +104,18 @@ else
libopencv-dev
fi
if [[ "${QT_VERSION:-5}" == "5" ]] ; then
time sudo apt-get -q install -y \
time sudo apt-get -q install $YUMARGS \
qt5-default || /bin/true
elif [[ "${QT_VERSION}" == "6" ]] ; then
time sudo apt-get -q install -y qt6-base-dev || /bin/true
time sudo apt-get -q install $YUMARGS qt6-base-dev || /bin/true
fi
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
time sudo apt-get -q install -y ${EXTRA_DEP_PACKAGES}
time sudo apt-get -q install $YUMARGS ${EXTRA_DEP_PACKAGES}
fi

# Nonstandard python versions
if [[ "${PYTHON_VERSION}" == "3.9" ]] ; then
time sudo apt-get -q install -y python3.9-dev python3-numpy
time sudo apt-get -q install $YUMARGS python3.9-dev python3-numpy
pip3 --version
fi
if [[ "${PIP_INSTALLS:=numpy}" != "none" ]] ; then
Expand All @@ -112,33 +125,33 @@ else
if [[ "$USE_LIBHEIF" != "0" ]] ; then
sudo add-apt-repository ppa:strukturag/libde265 || true
sudo add-apt-repository ppa:strukturag/libheif || true
time sudo apt-get -q install -y libheif-plugin-aomdec \
time sudo apt-get -q install $YUMARGS libheif-plugin-aomdec \
libheif-plugin-aomenc libheif-plugin-libde265 \
libheif-plugin-x265 libheif-dev || true
fi

export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:$CMAKE_PREFIX_PATH

if [[ "$CXX" == "g++-9" ]] ; then
time sudo apt-get install -y g++-9
time sudo apt-get install $YUMARGS g++-9
elif [[ "$CXX" == "g++-10" ]] ; then
time sudo apt-get install -y g++-10
time sudo apt-get install $YUMARGS g++-10
elif [[ "$CXX" == "g++-11" ]] ; then
time sudo apt-get install -y g++-11
time sudo apt-get install $YUMARGS g++-11
elif [[ "$CXX" == "g++-12" ]] ; then
time sudo apt-get install -y g++-12
time sudo apt-get install $YUMARGS g++-12
elif [[ "$CXX" == "g++-13" ]] ; then
time sudo apt-get install -y g++-13
time sudo apt-get install $YUMARGS g++-13
elif [[ "$CXX" == "g++-14" ]] ; then
time sudo apt-get install -y g++-14
time sudo apt-get install $YUMARGS g++-14
fi

if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$USE_ICX" != "" ]] ; then
time sudo apt-get -q install -y wget
time sudo apt-get -q install $YUMARGS wget
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
time sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
time sudo apt-get install $YUMARGS intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
set +e; source /opt/intel/oneapi/setvars.sh; set -e
fi

Expand Down

0 comments on commit a20a660

Please sign in to comment.