gitlab-ci: build on Ubuntu 16.04, 18.04 and Debian stretch (9), testing, sid
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/119
This commit is contained in:
@@ -12,21 +12,33 @@ stages:
|
|||||||
before_script:
|
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'; 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'; 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
|
- 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
|
stage: test
|
||||||
script:
|
script:
|
||||||
- date '+%Y%m%d-%H%M%S'; uname -a
|
- 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'; locale -a
|
||||||
- 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'; 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'; 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 ; 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 ; 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'; git clean -fdx ; 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'; 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'; ./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'; 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
|
- date '+%Y%m%d-%H%M%S'; mv /tmp/nm-docs-html ./docs-html
|
||||||
|
|
||||||
checkpatch:
|
checkpatch:
|
||||||
@@ -41,35 +53,62 @@ checkpatch:
|
|||||||
paths:
|
paths:
|
||||||
- checkpatch-out.txt
|
- checkpatch-out.txt
|
||||||
|
|
||||||
build_f28:
|
t_fedora:28:
|
||||||
<<: *fedora_install
|
<<: *fedora_install
|
||||||
image: fedora:28
|
image: fedora:28
|
||||||
<<: *fedora_script
|
<<: *do_build
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- docs-html
|
- docs-html
|
||||||
|
|
||||||
build_f29:
|
t_fedora:29:
|
||||||
<<: *fedora_install
|
<<: *fedora_install
|
||||||
image: fedora:29
|
image: fedora:29
|
||||||
<<: *fedora_script
|
<<: *do_build
|
||||||
|
|
||||||
build_f30:
|
t_fedora:30:
|
||||||
<<: *fedora_install
|
<<: *fedora_install
|
||||||
image: fedora:30
|
image: fedora:30
|
||||||
<<: *fedora_script
|
<<: *do_build
|
||||||
|
|
||||||
build_frawhide:
|
t_fedora:rawhide:
|
||||||
<<: *fedora_install
|
<<: *fedora_install
|
||||||
image: fedora:rawhide
|
image: fedora:rawhide
|
||||||
<<: *fedora_script
|
<<: *do_build
|
||||||
allow_failure: true
|
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:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
dependencies:
|
dependencies:
|
||||||
- build_f28
|
- t_fedora:29
|
||||||
script:
|
script:
|
||||||
- mv docs-html public
|
- mv docs-html public
|
||||||
artifacts:
|
artifacts:
|
||||||
|
73
contrib/debian/REQUIRED_PACKAGES
Executable file
73
contrib/debian/REQUIRED_PACKAGES
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
#!/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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
USE_CCACHE=0
|
||||||
if which ccache &>/dev/null; then
|
if which ccache &>/dev/null; then
|
||||||
|
USE_CCACHE=1
|
||||||
export PATH="/usr/lib64/ccache:/usr/lib/ccache${PATH:+:${PATH}}"
|
export PATH="/usr/lib64/ccache:/usr/lib/ccache${PATH:+:${PATH}}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -50,16 +52,21 @@ _WITH_LIBTEAM="$_TRUE"
|
|||||||
_WITH_DOCS="$_TRUE"
|
_WITH_DOCS="$_TRUE"
|
||||||
_WITH_SYSTEMD_LOGIND="$_TRUE"
|
_WITH_SYSTEMD_LOGIND="$_TRUE"
|
||||||
|
|
||||||
if [ "$CI" == travis ]; then
|
case "$CI" in
|
||||||
_WITH_WERROR=0
|
""|"true"|"default"|"gitlab")
|
||||||
_WITH_LIBTEAM="$_FALSE"
|
CI=default
|
||||||
_WITH_DOCS="$_FALSE"
|
;;
|
||||||
_WITH_SYSTEMD_LOGIND="$_FALSE"
|
"travis")
|
||||||
elif [ "$CI" == gitlab ]; then
|
_WITH_WERROR=0
|
||||||
:
|
_WITH_LIBTEAM="$_FALSE"
|
||||||
else
|
_WITH_DOCS="$_FALSE"
|
||||||
die "invalid \$CI \"$CI\""
|
_WITH_SYSTEMD_LOGIND="$_FALSE"
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
die "invalid \$CI \"$CI\""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ "$CC" != gcc ]; then
|
if [ "$CC" != gcc ]; then
|
||||||
_WITH_CRYPTO=nss
|
_WITH_CRYPTO=nss
|
||||||
fi
|
fi
|
||||||
@@ -198,3 +205,8 @@ if [ "$BUILD_TYPE" == autotools ]; then
|
|||||||
elif [ "$BUILD_TYPE" == meson ]; then
|
elif [ "$BUILD_TYPE" == meson ]; then
|
||||||
run_meson
|
run_meson
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$USE_CCACHE" = 1 ]; then
|
||||||
|
echo "ccache statistics:"
|
||||||
|
ccache -s
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user