tools/ci-install.sh: Install newer CMake on openSuSE

This is needed for JUnit XML output for tests.
This commit is contained in:
Alex Richardson 2022-05-14 19:24:21 +01:00 committed by Ralf Habacker
parent f366b38f31
commit 364fe6be69
2 changed files with 23 additions and 18 deletions

View file

@ -60,7 +60,7 @@ variables:
.opensuse-vars:
variables:
FDO_DISTRIBUTION_VERSION: 'leap'
FDO_DISTRIBUTION_TAG: '2022-04-17' # Bump this version on every ci-install.sh change
FDO_DISTRIBUTION_TAG: '2022-05-14' # Bump this version on every ci-install.sh change
.cmake-common:
variables:

View file

@ -224,6 +224,27 @@ case "$ci_distro" in
which
)
# choose distribution
id=$(. /etc/os-release; echo ${ID} | sed 's, ,_,g')
case "$id" in
(opensuse-leap)
version=$(. /etc/os-release; echo ${VERSION_ID} | sed 's, ,_,g')
repo="openSUSE_Leap_$version"
# Use a newer CMake (3.21) version for JUnit XML support on openSUSE Leap.
if ! zypper lr cmake > /dev/null; then
$zypper ar --refresh --no-gpgcheck --name cmake \
"https://download.opensuse.org/repositories/devel:tools:building/$version/devel:tools:building.repo"
fi
;;
(opensuse-tumbleweed)
repo="openSUSE_Tumbleweed"
;;
(*)
echo "ci_suite not specified, please choose one from 'leap' or 'tumbleweed'"
exit 1
;;
esac
case "$ci_host" in
(*-w64-mingw32)
# cross
@ -233,22 +254,6 @@ case "$ci_distro" in
xvfb-run
)
# choose distribution
id=$(. /etc/os-release; echo ${ID} | sed 's, ,_,g')
case "$id" in
(opensuse-leap)
version=$(. /etc/os-release; echo ${VERSION_ID} | sed 's, ,_,g')
repo="openSUSE_Leap_$version"
;;
(opensuse-tumbleweed)
repo="openSUSE_Tumbleweed"
;;
(*)
echo "ci_suite not specified, please choose one from 'leap' or 'tumbleweed'"
exit 1
;;
esac
# add required repos
if [ "${ci_host%%-*}" = x86_64 ]; then
bits="64"
@ -281,7 +286,7 @@ case "$ci_distro" in
)
;;
esac
$zypper install "${packages[@]}"
$zypper install --allow-vendor-change "${packages[@]}"
if [ "$ci_in_docker" = yes ]; then
# Add the user that we will use to do the build inside the