summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-24 12:48:20 +0200
committerThomas Haller <thaller@redhat.com>2019-05-29 09:42:40 +0200
commit896dc7d4d93d1b9a67b1b531168faf358541e75e (patch)
treee520ec7ec2ab32115452b6ce7f73eea4a143b379
parentc9873d42731b7586926ad3a99f93f08490f25abd (diff)
downloadNetworkManager-th/gitlab-ci-centos.tar.gz
gitlab-ci: also build on CentOS 7.5 and 7.6th/gitlab-ci-centos
-rw-r--r--.gitlab-ci.yml38
-rwxr-xr-xcontrib/fedora/REQUIRED_PACKAGES2
-rwxr-xr-xcontrib/scripts/nm-ci-run.sh2
3 files changed, 33 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 13db037e17..f8258e457a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,18 +10,29 @@ stages:
.fedora_install: &fedora_install
before_script:
- - date '+%Y%m%d-%H%M%S'; NM_INSTALL="dnf install -y" ./contrib/fedora/REQUIRED_PACKAGES
- - date '+%Y%m%d-%H%M%S'; dnf install -y glibc-langpack-pl ccache clang
+
+ # enable EPEL on CentOS
+ - date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+
+ - date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || (yum install -y glibc-common && localedef -c -i pl_PL -f UTF-8 pl_PL.UTF-8 && locale -a)
+
+ - date '+%Y%m%d-%H%M%S'; NM_INSTALL="yum install -y" ./contrib/fedora/REQUIRED_PACKAGES
+ - date '+%Y%m%d-%H%M%S'; yum install -y glibc-langpack-pl ccache clang which
# containers have "tsflags=nodocs" in /etc/dnf/dnf.conf. We need /usr/shared/gtk-doc/html
# to generate proper documentation.
- - date '+%Y%m%d-%H%M%S'; dnf reinstall -y --setopt='tsflags=' glib2-doc
+ - date '+%Y%m%d-%H%M%S'; yum reinstall -y --setopt='tsflags=' glib2-doc
- - date '+%Y%m%d-%H%M%S'; dnf install -y python3-dnf-plugins-core
- - date '+%Y%m%d-%H%M%S'; dnf debuginfo-install -y glib2
+ - date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || yum install -y python36-dbus python36-gobject-base
+
+ - date '+%Y%m%d-%H%M%S'; ! which dnf || dnf install -y python3-dnf-plugins-core
+ - date '+%Y%m%d-%H%M%S'; ! which dnf || dnf debuginfo-install -y glib2
+ - date '+%Y%m%d-%H%M%S'; which dnf || debuginfo-install -y glib2
- date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-ci-patch-gtkdoc.sh || true
+ - date '+%Y%m%d-%H%M%S'; test -x /usr/bin/ninja || ! test -x /usr/bin/ninja-build || ln -s /usr/bin/ninja-build /usr/bin/ninja
+
.debian_install: &debian_install
before_script:
- date '+%Y%m%d-%H%M%S'; apt-get update
@@ -39,15 +50,15 @@ stages:
- date '+%Y%m%d-%H%M%S'; locale -a
- date '+%Y%m%d-%H%M%S'; env
- date '+%Y%m%d-%H%M%S'; meson --version
- - date '+%Y%m%d-%H%M%S'; ! which dnf || dnf list --installed
- date '+%Y%m%d-%H%M%S'; ! which dpkg || dpkg -l
+ - date '+%Y%m%d-%H%M%S'; ! which yum || yum list installed
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; rm -rf /tmp/nm-docs-html; mv build/INST/share/gtk-doc/html /tmp/nm-docs-html
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
- - date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=Fedora' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
- - date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=Fedora' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
+ - date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=.*\(Fedora\|CentOS\)' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -W meson
+ - date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=.*\(Fedora\)' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; test "$NM_BUILD_TARBALL" != 1 || ( ./contrib/fedora/rpm/build_clean.sh -r && mv ./NetworkManager-1*.tar.xz /tmp/ && mv ./contrib/fedora/rpm/latest/SRPMS/NetworkManager-1*.src.rpm /tmp/ )
- date '+%Y%m%d-%H%M%S'; git clean -fdx
- date '+%Y%m%d-%H%M%S'; mv /tmp/nm-docs-html ./docs-html
@@ -95,6 +106,17 @@ t_fedora:rawhide:
allow_failure: true
when: manual
+t_centos:7.5.1804:
+ <<: *fedora_install
+ image: centos:7.5.1804
+ <<: *do_build
+ when: manual
+
+t_centos:7.6.1810:
+ <<: *fedora_install
+ image: centos:7.6.1810
+ <<: *do_build
+
t_ubuntu:16.04:
<<: *debian_install
image: ubuntu:16.04
diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES
index 9928cf0000..00164cc669 100755
--- a/contrib/fedora/REQUIRED_PACKAGES
+++ b/contrib/fedora/REQUIRED_PACKAGES
@@ -52,8 +52,10 @@ install \
newt-devel \
nss-devel \
polkit-devel \
+ ppp \
ppp-devel \
pygobject3-base \
+ python-gobject-base \
python3-dbus \
python3-gobject \
qt-devel \
diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh
index 1d4b573439..dd8fd28457 100755
--- a/contrib/scripts/nm-ci-run.sh
+++ b/contrib/scripts/nm-ci-run.sh
@@ -126,7 +126,7 @@ _print_test_logs() {
echo ">>>> PRINT TEST LOGS $1 (done)"
if _with_valgrind; then
echo ">>>> PRINT VALGRIND LOGS $1 (start)"
- find -name '*.valgrind-log' -print0 | xargs -0 grep -H ^
+ find -name '*.valgrind-log' -print0 | xargs -0 grep -H ^ || true
echo ">>>> PRINT VALGRIND LOGS $1 (done)"
fi
}