Commit graph

32 commits

Author SHA1 Message Date
Thomas Haller
5e024468fa gitlab-ci: use old meson version on Ubuntu 16.04 to work with ninja-1.5.1
Meson 0.54.0 requires ninja-1.7 ([1]).

On Ubuntu 16.04, we now would get meson 0.54.0 via pip3, but ninja-1.5.1 via
apt. That doesn't work anymore.

We could install ninja via pip3, but of course, doing that on other
Debian/Ubuntu versions fails due to ... I don't even want to know.

So, instead use an old meson version on Ubuntu 16.04, which is
known to still work with the ninja provided by the packaging system.

We anyway don't want to test the same meson/ninja versions on all our
Ubuntu/Debian images. The point of having different images is to build
with different software versions. If `pip3 install` gives us the same
everywhere, it isn't very useful.

https://mesonbuild.com/Release-notes-for-0-54-0.html#ninja-version-requirement-bumped-to-17
(cherry picked from commit 5feba97cd1)
(cherry picked from commit b9b00a1cb3)
(cherry picked from commit 3199349196)
2020-04-20 12:29:27 +02:00
Thomas Haller
c4155b6dc3 gitlab-ci: set DEBIAN_FRONTEND=noninteractive for apt-get install
Otherwise, installing a package might prompt for the user to type something,
breaking the CI build.

(cherry picked from commit 571786c211)
(cherry picked from commit b033ab8449)
(cherry picked from commit e79ce721d3)
2020-04-20 12:29:21 +02:00
Thomas Haller
133e7ce703 gitlab-ci: fix deploying documentation after switching to Fedora 31
Fixes: ec8068ec0c ('gitlab-ci: add "t_fedora:32" and by default build on Fedora 31')
(cherry picked from commit f12b830a94)
(cherry picked from commit 5abb14611b)
(cherry picked from commit c553c2ff3f)
2020-04-20 12:29:16 +02:00
Thomas Haller
d71b56ebe7 gitlab-ci: add "t_fedora:32" and by default build on Fedora 31
(cherry picked from commit ec8068ec0c)
(cherry picked from commit f1a4961def)
(cherry picked from commit df61b7b170)
2020-04-20 12:29:11 +02:00
Thomas Haller
ce861e5292 gitlab-ci: fix generating "pages" after switching to Fedora 30 for main build
(cherry picked from commit c15682558c)
(cherry picked from commit 4ea999ac94)
(cherry picked from commit 4587b96cb2)
2020-04-20 12:29:05 +02:00
Thomas Haller
2ba65800f9 gitlab-ci: run tests on extra distributions only manually
For the moment, we use docker images from dockerhub, which require
a lot of extra overhead to prepare and install the test environment.
This should be improved, by using more suitable container images.

Anyway, for now to alleviate the pressure on the freedesktop gitlab
infrastructure, disable most test to only run manually.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/241#note_282521
(cherry picked from commit b733d477e8)
(cherry picked from commit 962297f908)
2020-04-20 12:28:50 +02:00
Thomas Haller
002e10d6b9 gitlab-ci: use Fedora 30 to build documentation and archived tarball
(cherry picked from commit 339df56887)
(cherry picked from commit 725141c07a)
2020-04-20 12:28:41 +02:00
Thomas Haller
67128fe6c0 checkpatch,gitlab-ci: let checkpatch script compare against latest upstream master
When opening a merge request from a fork of NetworkManager, then the
pipeline runs with the a checkout of the fork. That means, checkpatch
would compare the branch against "master" (or "nm-x-y" stable branches)
of the fork, instead of upstream.

That doesn't seem too useful. Instead, also add upstream NetworkManager
as git remote, fetch the branches, and use the branches from there as
base for checkpatch.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/255
(cherry picked from commit 3019648b4b)
(cherry picked from commit 9a37702311)
2019-10-08 15:26:52 +02:00
Thomas Haller
6dde55e22b gitlab-ci: workaround unit test failure for iproute2 bug in "ubuntu:devel"
"ubuntu:devel" ships iproute2 version "5.2.0-1ubuntu1". This has a well known
bug that prevents it from creating IP tunnels during the unit tests.

We already workaround that on Debian. Add the same workaround to match the
Ubuntu package.

(cherry picked from commit 44193d3def)
(cherry picked from commit 27c23b0748)
2019-10-08 15:26:52 +02:00
Thomas Haller
5a32fa961e gitlab-ci: add building on Fedora 31
And don't build Fedora 28 by default. It's aleady end of life.
But for now keep it, so it can be triggered manually.

(cherry picked from commit b40a3aa727)
(cherry picked from commit 6a4129485a)
2019-10-08 15:26:51 +02:00
Thomas Haller
ce79b9a9b5 tests: don't install unnecessary package in gitlab-ci tests
REQUIRED_PACKAGES has two uses:

 - to setup a system for developing NetworkManager. This installs
   convenience packages like "cscope".

 - to install the packages required for unit testing in gitlab-ci.

For gitlab-ci we should only install the packages that we actually
need.

(cherry picked from commit 1a2a5b37b4)
(cherry picked from commit 6ff16a48bb)
2019-10-08 15:26:51 +02:00
Thomas Haller
f19cf354a3 gitlab-ci: workaround build failure in Debian:sid due to iproute2 issue
Our platform unit tests try to add an IP tunnel using iproute2.
That fails with

    "add tunnel "ip6tnl0" failed: File exists"

This is a bug in iproute2-5.2.0, see [1].

Workaround the issue by downgrading the package.

[1] https://www.spinics.net/lists/netdev/msg584916.html

(cherry picked from commit be76d8b624)
2019-10-08 15:26:51 +02:00
Thomas Haller
be1a3ffa0e gitlab-ci: add manual build step to test on ubuntu:rolling and ubuntu:devel
Rolling is the latest release (regardless of whether LTS), currently
that would be 19.04.

Devel is the next release, currently that would be 19.10.

Add manual build steps to trigger those builds so we can manually verify
that they pass.

(cherry picked from commit 13b4cad989)
2019-10-08 15:26:51 +02:00
Thomas Haller
24554b6cce gitlab-ci: enable test build on Debian 10 (buster)
(cherry picked from commit bf1cadbdc7)
2019-10-08 15:26:51 +02:00
Thomas Haller
656109c3d0 gitlab-ci: also build on CentOS 7.5 and 7.6
(cherry picked from commit 896dc7d4d9)
2019-10-08 15:26:50 +02:00
Thomas Haller
78d8cde326 gitlab-ci: run "checkpatch" test on Fedora 29 image
Fedora 28 is no longer supported at this point. Run the "checkpatch"
test on a Fedora 29 image instead.

(cherry picked from commit c9873d4273)
2019-10-08 15:26:50 +02:00
Thomas Haller
3c9d9b0f51 gitlab-ci: run unit tests under valgrind in gitlab-ci
On Ubuntu 16.04 (trusty) valgrind fails due to rdrand being advertised
but not implemented.

Work around that by installing valgrind from Ubuntu 18.04 (bionic) via
the "contrib/scripts/nm-ci-install-valgrind-in-ubuntu1604.sh" script.

(cherry picked from commit 6d76a0974e)
2019-10-08 15:26:49 +02:00
Thomas Haller
f43fb59b6d gitlab-ci: install glib2-doc via "contrib/fedora/REQUIRED_PACKAGES"
We also generate a source tarball and artifact it.

Hence, we need proper gtk-doc links. This requires files in
/usr/share/gtk-doc/html for adding cross links. Install glib2-doc
package.

Note that in containers dnf is configured to not install documentation
files. We need to override that.

(cherry picked from commit a0f31e4038)
2019-04-20 21:02:16 +02:00
Thomas Haller
69652d40f7 gitlab-ci: don't use "test && cmd" in build step
We don't want stesp to return an error, which is what
"test && cmd" does, if the test evaluates to false.

Instead, use "! test || cmd" which has more the semantics
that we want.

(cherry picked from commit 2a2c58339b)
2019-04-20 08:56:30 +02:00
Thomas Haller
79ecdb589b gitlab-ci: build release tarball and artifact it
(cherry picked from commit 84e19c6ca9)
2019-04-19 11:31:57 +02:00
Thomas Haller
7973680ca2 gitlab-ci: build on Ubuntu 16.04, 18.04 and Debian stretch (9), testing, sid
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/119
(cherry picked from commit 1ca380f69f)
2019-04-19 08:22:14 +02:00
Thomas Haller
2955d5e69a gitlab-ci: add test on Fedora 30 image
And no longer use "fedora:lastest". While "fedora:rawhide" names the very
latest branch (and we want to test that), for all proper releases we want
name them explicitly.
2019-04-09 18:23:23 +02:00
Thomas Haller
645b195f9c gitlab-ci: print information about test environment in tests
It's just interesting to see in the logs.
2019-04-04 09:54:35 +02:00
Thomas Haller
557271fa6a gitlab-ci: rename build-jobs in gitlab-ci
It just looks nicer.
2019-02-09 07:14:32 +01:00
Thomas Haller
dc4f6f6656 gitlab-ci: fix moving docs-html
Seems .git directory is somehow shared/cached between CI runs.
Use /tmp instead.
2019-02-08 20:14:19 +01:00
Thomas Haller
bba33ba20c gitlab-ci: log timestamp of test steps 2019-02-08 10:35:37 +01:00
Thomas Haller
211ac0ddad gitlab-ci: fix generating pages
Fixes: bdac03fe9a
2019-02-08 08:08:07 +01:00
Thomas Haller
bdac03fe9a gitlab-ci: build with clang and do multiple builds in one test-step
Also, let one docker image do multiple builds. We fetch a fedora docker
image, and then install 250 MB of packages. That alone takes a lot of
time and resources. Instead of running a large number of docker images
that only do one build, let one image do several builds.

Also, install ccache. Hopefully this way we can benefit from
building the same sources multiple times.

Also note that building docs does not work currently with clang,
due to g-ir-scanner. See commit 05568860cce5332977d92b85f7c25b8ed646cd58.
2019-02-07 17:31:37 +01:00
Thomas Haller
b707da27d8 gitlab-ci: add test with Fedora:latest image 2019-01-27 15:36:03 +01:00
Thomas Haller
122aa550d2 gitlab-ci: patch gtk-doc to generate valid documentation
We generate documentation for pages ([1], [2]), hence, we need to patch
gtk-doc [3].

[1] https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/
[2] https://networkmanager.pages.freedesktop.org/NetworkManager/libnm/
[3] https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2
2018-12-01 08:55:44 +01:00
Thomas Haller
763cb8d486 ci: use common script for tests on travis and gitlab
For one, it's not unreasonable that we want to run the same
tests both for gitlab and travis.

Move the actual tests into a script, which is called by both
CI environments.

We still can do something different, based on the environment.
The advantage here is, that the common part will be shared, and
the places where we differ can easily be spot.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/44
2018-11-12 11:29:37 +01:00
Thomas Haller
a0a0824564 gitlab: add .gitlab-ci.yml for gitlab CI
See-also: https://docs.gitlab.com/ee/ci/yaml/
2018-10-22 13:19:15 +02:00