From 68e9f92a816ffa887528c41a11c69c1c8145519b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 2 Jun 2022 12:21:02 +0200 Subject: gitlab-ci: test build with python2 on Centos7 Currently, for all tests we have python3 installed. So effectively, even on CentOS 7, we would test the build with python3 only. The package build on CentOS7/epel7 however uses python2. This happens for example for our copr builds. Also test that configuration in gitlab-ci. --- .gitlab-ci/run-test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh index c8c26f0815..be725133f6 100755 --- a/.gitlab-ci/run-test.sh +++ b/.gitlab-ci/run-test.sh @@ -11,6 +11,13 @@ grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1 grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1 grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1 +IS_CENTOS_7=0 +if [ $IS_CENTOS = 1 ]; then + if grep -q '^VERSION_ID=.*\<7\>' /etc/os-release ; then + IS_CENTOS_7=1 + fi +fi + do_clean() { git clean -fdx } @@ -36,6 +43,8 @@ do_clean; BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scri do_clean; BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh do_clean; BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh +do_clean; test $IS_CENTOS_7 = 1 && PYTHON=python2 BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh + do_clean; test $IS_FEDORA = 1 -o $IS_CENTOS = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -W meson do_clean; test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson -- cgit v1.2.1