ci_local_packages: "yes"
ci_parallel: "2"
ci_sudo: "yes"
- ci_distro: "debian"
ci_suite: "bullseye"
###
# IMPORTANT
.suse-build:
extends: .unix-host-build
image: "opensuse/leap:15"
- variables:
- ci_distro: "opensuse"
opensuse cmake:
extends: .suse-build
# ci_distro:
# OS distribution in which we are testing
-# Typical values: ubuntu, debian; maybe fedora in future
-: "${ci_distro:=ubuntu}"
+# Typical values: auto (detect at runtime), ubuntu, debian; maybe fedora in future
+: "${ci_distro:=auto}"
# ci_docker:
# If non-empty, this is the name of a Docker image. ci-install.sh will
echo "ci_buildsys=$ci_buildsys ci_distro=$ci_distro ci_docker=$ci_docker ci_host=$ci_host ci_local_packages=$ci_local_packages ci_parallel=$ci_parallel ci_suite=$ci_suite ci_test=$ci_test ci_test_fatal=$ci_test_fatal ci_variant=$ci_variant ci_runtime=$ci_runtime $0"
+# choose distribution
+if [ "$ci_distro" = "auto" ]; then
+ ci_distro=$(. /etc/os-release; echo ${ID} | sed 's, ,_,g')
+ echo "detected ci_distro as '${ci_distro}'"
+fi
+
if [ -n "$ci_docker" ]; then
exec docker run \
--env=ci_buildsys="${ci_buildsys}" \
# enable tests if supported
if [ "$ci_test" = yes ]; then
# choose correct wine architecture
- if [ "${ci_distro}" = opensuse ]; then
+ if [ "${ci_distro%%-*}" = opensuse ]; then
if [ "${ci_host%%-*}" = x86_64 ]; then
export WINEARCH=win64
cmake=mingw64-cmake
# ci_distro:
# OS distribution in which we are testing
-# Typical values: ubuntu, debian; maybe fedora in future
-: "${ci_distro:=ubuntu}"
+# Typical values: auto, ubuntu, debian, ; maybe fedora in future
+: "${ci_distro:=auto}"
# ci_docker:
# If non-empty, this is the name of a Docker image. ci-install.sh will
sudo=sudo
fi
+
+# choose distribution
+if [ "$ci_distro" = "auto" ]; then
+ ci_distro=$(. /etc/os-release; echo ${ID} | sed 's, ,_,g')
+ echo "detected ci_distro as '${ci_distro}'"
+fi
+
if [ -n "$ci_docker" ]; then
sed \
-e "s/@ci_distro@/${ci_distro}/" \
fi
case "$ci_distro" in
- (debian|ubuntu)
+ (debian*|ubuntu*)
# Don't ask questions, just do it
sudo="$sudo env DEBIAN_FRONTEND=noninteractive"
fi
;;
- (opensuse)
+ (opensuse*)
zypper="/usr/bin/zypper --non-interactive"
# system
packages=(
# manual package setup
#
case "$ci_distro" in
- (debian|ubuntu)
+ (debian*|ubuntu*)
# Make sure we have a messagebus user, even if the dbus package
# isn't installed
--disabled-password --group messagebus
;;
- (opensuse)
+ (opensuse*)
# test-bus depends on group 'bin'
$sudo getent group bin >/dev/null || /usr/sbin/groupadd -r bin
;;