Commit graph

28 commits

Author SHA1 Message Date
Thomas Haller
4ea999ac94 gitlab-ci: fix generating "pages" after switching to Fedora 30 for main build
(cherry picked from commit c15682558c)
2019-12-13 11:48:25 +01:00
Thomas Haller
b733d477e8 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
2019-11-22 13:46:22 +01:00
Thomas Haller
339df56887 gitlab-ci: use Fedora 30 to build documentation and archived tarball 2019-11-22 13:46:22 +01:00
Thomas Haller
3019648b4b 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
2019-10-02 18:46:36 +02:00
Thomas Haller
44193d3def 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.
2019-10-01 09:55:39 +02:00
Thomas Haller
b40a3aa727 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.
2019-09-25 15:48:08 +02:00
Thomas Haller
1a2a5b37b4 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.
2019-09-25 15:47:39 +02:00
Thomas Haller
be76d8b624 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
2019-07-12 10:45:36 +02:00
Thomas Haller
13b4cad989 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.
2019-07-12 10:25:12 +02:00
Thomas Haller
bf1cadbdc7 gitlab-ci: enable test build on Debian 10 (buster) 2019-07-10 12:29:48 +02:00
Thomas Haller
896dc7d4d9 gitlab-ci: also build on CentOS 7.5 and 7.6 2019-05-29 09:42:40 +02:00
Thomas Haller
c9873d4273 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.
2019-05-29 09:42:40 +02:00
Thomas Haller
6d76a0974e 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.
2019-05-18 09:58:52 +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