Commit 1ca380f6 authored by Thomas Haller's avatar Thomas Haller

gitlab-ci: build on Ubuntu 16.04, 18.04 and Debian stretch (9), testing, sid

!119
parent 7d62f81e
Pipeline #31861 failed with stages
in 25 minutes and 11 seconds
......@@ -12,21 +12,33 @@ stages:
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
- date '+%Y%m%d-%H%M%S'; locale -a
- date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-ci-patch-gtkdoc.sh || true
.fedora_script: &fedora_script
.debian_install: &debian_install
before_script:
- date '+%Y%m%d-%H%M%S'; apt-get update
- date '+%Y%m%d-%H%M%S'; NM_INSTALL="apt-get -qq install -y" ./contrib/debian/REQUIRED_PACKAGES
- date '+%Y%m%d-%H%M%S'; dbus-uuidgen --ensure
- date '+%Y%m%d-%H%M%S'; sed -i 's/^# \(pl_PL.UTF-8 .*\)$/\1/p' /etc/locale.gen ; true
- date '+%Y%m%d-%H%M%S'; locale-gen pl_PL.UTF-8
- date '+%Y%m%d-%H%M%S'; pip3 install meson
.do_build: &do_build
stage: test
script:
- date '+%Y%m%d-%H%M%S'; uname -a
- date '+%Y%m%d-%H%M%S'; dnf list --installed
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
- 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'; git clean -fdx ; BUILD_TYPE=autotools CC=gcc WITH_DOCS=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 ; CI=gitlab BUILD_TYPE=meson CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
- date '+%Y%m%d-%H%M%S'; ./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 ; BUILD_TYPE=meson CC=gcc WITH_DOCS=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'; 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'; 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'; mv /tmp/nm-docs-html ./docs-html
checkpatch:
......@@ -41,35 +53,62 @@ checkpatch:
paths:
- checkpatch-out.txt
build_f28:
t_fedora:28:
<<: *fedora_install
image: fedora:28
<<: *fedora_script
<<: *do_build
artifacts:
expire_in: 1 day
paths:
- docs-html
build_f29:
t_fedora:29:
<<: *fedora_install
image: fedora:29
<<: *fedora_script
<<: *do_build
build_f30:
t_fedora:30:
<<: *fedora_install
image: fedora:30
<<: *fedora_script
<<: *do_build
build_frawhide:
t_fedora:rawhide:
<<: *fedora_install
image: fedora:rawhide
<<: *fedora_script
<<: *do_build
allow_failure: true
when: manual
t_ubuntu:16.04:
<<: *debian_install
image: ubuntu:16.04
<<: *do_build
t_ubuntu:18.04:
<<: *debian_install
image: ubuntu:18.04
<<: *do_build
t_debian:9:
<<: *debian_install
image: debian:stretch
<<: *do_build
t_debian:testing:
<<: *debian_install
image: debian:testing
<<: *do_build
when: manual
t_debian:sid:
<<: *debian_install
image: debian:sid
<<: *do_build
pages:
stage: deploy
dependencies:
- build_f28
- t_fedora:29
script:
- mv docs-html public
artifacts:
......
#!/bin/bash
# A list of packages useful/needed to build and develop
# NetworkManager on Debian and Ubuntu.
#
# Not all of these packages are available, depending
# on your distribution/release. But the script will happily
# skip them.
#
# Not all of these packages are strictly speaking necessary.
# This is a generous list of related packages.
install() {
for p in "$@"; do
if [ "$NM_INSTALL" != "" ]; then
$NM_INSTALL "$p" || :
else
sudo apt-get install -y "$p" || :
fi
done
}
install \
\
autoconf \
automake \
autopoint \
clang \
dbus \
dbus-x11 \
dnsmasq \
git \
gobject-introspection \
gtk-doc-tools \
intltool \
iproute2 \
iptables \
libcurl4-gnutls-dev \
libdbus-1-dev \
libgcrypt11-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libglib2.0-doc \
libgnutls-dev \
libgnutls28-dev \
libiw-dev \
libjansson-dev \
libjansson4 \
libmm-glib-dev \
libndp-dev \
libnewt-dev \
libnss3-dev \
libpolkit-gobject-1-dev \
libreadline-dev \
libsystemd-dev \
libteam-dev \
libtool \
libudev-dev \
locales \
make \
meson \
pkg-config \
ppp \
ppp-dev \
python-dbus \
python-gi \
python-software-properties \
python3-dbus \
python3-gi \
python3-pip \
uuid-dev \
\
#end
......@@ -28,7 +28,9 @@ _is_true() {
esac
}
USE_CCACHE=0
if which ccache &>/dev/null; then
USE_CCACHE=1
export PATH="/usr/lib64/ccache:/usr/lib/ccache${PATH:+:${PATH}}"
fi
......@@ -50,16 +52,21 @@ _WITH_LIBTEAM="$_TRUE"
_WITH_DOCS="$_TRUE"
_WITH_SYSTEMD_LOGIND="$_TRUE"
if [ "$CI" == travis ]; then
_WITH_WERROR=0
_WITH_LIBTEAM="$_FALSE"
_WITH_DOCS="$_FALSE"
_WITH_SYSTEMD_LOGIND="$_FALSE"
elif [ "$CI" == gitlab ]; then
:
else
die "invalid \$CI \"$CI\""
fi
case "$CI" in
""|"true"|"default"|"gitlab")
CI=default
;;
"travis")
_WITH_WERROR=0
_WITH_LIBTEAM="$_FALSE"
_WITH_DOCS="$_FALSE"
_WITH_SYSTEMD_LOGIND="$_FALSE"
;;
*)
die "invalid \$CI \"$CI\""
;;
esac
if [ "$CC" != gcc ]; then
_WITH_CRYPTO=nss
fi
......@@ -198,3 +205,8 @@ if [ "$BUILD_TYPE" == autotools ]; then
elif [ "$BUILD_TYPE" == meson ]; then
run_meson
fi
if [ "$USE_CCACHE" = 1 ]; then
echo "ccache statistics:"
ccache -s
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment