Commit Graph

64 Commits

Author SHA1 Message Date
Pavlo Solntsev
e95f47c395
CI: Code check formating in CI 2019-11-21 14:03:01 -06:00
Simon McVittie
e5675182f1 Merge branch 'ci-updates-for-1177' into 'master'
CI updates after !1177

See merge request GNOME/glib!1202
2019-11-04 16:43:25 +00:00
Philip Withnall
8ae795ccba ci: Improve Docker building instructions slightly
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-04 15:25:38 +00:00
Simon McVittie
81936ca580 Make ld executable configurable
Tools like this should be configurable in a cross or native file. In
particular, if we are cross-compiling (with an executable wrapper like
qemu-arm), the build system ld is not necessarily able to manipulate
host system objects.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-11-04 15:08:33 +00:00
Simon McVittie
0655eac0ee Merge branch 'ci-libdbus' into 'master'
ci: Add libdbus development files to CI Docker images

See merge request GNOME/glib!1177
2019-10-28 20:39:22 +00:00
Philip Withnall
57aaee76d5 docs: Add objcopy to example cross-compilation file
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1916
2019-10-28 12:11:12 +00:00
Simon McVittie
3e517c0ab2 ci: Add libdbus development files to CI Docker images
We use these to test interoperability between libdbus and GDBus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-10-21 16:45:14 +01:00
Philip Withnall
0cc745f6cb ci: Include stderr output in JUnit XML report
When running tests under valgrind, the valgrind summary is printed in
stderr, and the TAP output is printed in stdout. The valgrind summary is
useful to include in the GitLab test report, so append it to the
textual failure information for failed tests.

I can’t find a better XML element in the [JUnit
schema](https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd)
for representing it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #487
2019-09-02 14:16:33 +01:00
Philip Withnall
197eff3fc8 ci: Add valgrind memcheck support on Fedora
Add a separate CI job which runs memcheck on the unit tests. This is
done as a separate job from the main build, since we don’t want it to
interact with code coverage at all.

Currently, failure of this job is ignored. Issue #333 will eventually
fix that.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #487
2019-09-02 14:16:33 +01:00
Philip Withnall
8d19b95bd8 ci: Add valgrind to fedora Docker image
It will be used in an upcoming commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #487
2019-09-02 14:16:33 +01:00
Emmanuele Bassi
fa6f2d4516 ci: Update the MSYS2 build script 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
772a6e3262 ci: Update the MSVC build script 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
f6b4012c9d ci: Update the MingW Docker image 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
ed7c258996 ci: Update the Android NDK Docker image 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
14d2c4872e ci: Update Fedora's Docker image
Match the version of Meson we install with the one we require.
2019-07-24 13:08:06 +01:00
Emmanuele Bassi
9fdc27657d ci: Update Debian's Docker image
New stable release of Debian is out, and we need to bump the version of
Meson to match our requirements.
2019-07-24 13:08:06 +01:00
Stefan Sauer
77cc96ae88 Update the instructions in .gitlab-ci.
These where a copied, but not adapted. This is similar to a change in the
gtkdoc module.
2019-07-16 21:12:24 -07:00
Christoph Reiter
ab325c24d5 CI/msys2: disable coverage reporting, lcov doesn't support gcc9 yet
https://github.com/linux-test-project/lcov/issues/58
2019-05-29 18:41:23 +02:00
Christoph Reiter
d258bb5be3 CI/msys2: update to lcov 1.14
lconv 1.13 only supports gcc <=7 and lcov 1.14 supports <=8.
msys2 was just updated to gcc9, so this wont help with coverage support, but
it's a start I guess.
2019-05-29 18:18:45 +02:00
Emmanuele Bassi
db849efc2a ci: Keep JUnit report script working on Debian stable
The current Debian stable CI image ships with Python 3.5, so the Meson
log to JUnit report script is failing because it's using an API addition
present in Python 3.6 or later.

Since it's just a cosmetic option for the time stamp, we can get rid of
it.
2019-05-08 12:40:45 +01:00
Emmanuele Bassi
397e44fc8a ci: Update the Android NDK image to Fedora 28
Fedora 27 was EOL'ed on November 2018.

We move to Fedora 28 because the Android NDK requires Python 2 and
probably other things, and bumping to Fedora 29 is going to be more
painful.
2019-04-30 18:26:15 +01:00
Emmanuele Bassi
ee9afb33af ci: Remove Android and MingW bits from the fedora Dockerfile
These live in their own Dockerfiles, now.
2019-04-30 18:22:44 +01:00
Emmanuele Bassi
15d13d1e97 ci: Add a MinGW Docker image
The Fedora image we use contains MinGW bits that ought to go into
their own Docker container. This avoids having a massive Docker image
that gloms everything and is harder to update.

While we're splitting off, we can also update to Fedora 29, as we can
rely on Fedora packagers doing their job and ensuring that the MinGW
cross-compilation toolchain still works.
2019-04-30 18:21:15 +01:00
Emmanuele Bassi
92fbdb5730 ci: Add an Android NDK Docker image
The Fedora image we use contains Android bits that ought to go into
their own Docker container. This avoids having a massive Docker image
that gloms everything and is harder to update.

We reuse the same Docker image we used for Fedora, to avoid regressing.
2019-04-30 18:18:38 +01:00
Emmanuele Bassi
b4d920f60c ci: Beef up run-docker.sh
Add argument validation and split the build/run/push phases into
commands.
2019-04-30 15:37:31 +01:00
Emmanuele Bassi
d42a551e3e ci: Rename the Fedora Dockerfile
We're going to add more, so let's avoid collisions.
2019-04-30 15:37:31 +01:00
Emmanuele Bassi
2515015a67 ci: Add Debian stable Docker image
Does everything the Fedora image does, only with an older toolchain and
older dependencies.
2019-04-30 15:37:31 +01:00
Emmanuele Bassi
99d068fb90 ci: Add clang and scan-build
We want to run the Clang-based build analysis tool in our CI pipeline,
taking advantage of its native support in Meson.
2019-04-30 14:49:00 +01:00
Emmanuele Bassi
7875f34433 ci: Update the Docker image for Fedora
Use Fedora 29, soon to be old-stable.
2019-04-30 14:49:00 +01:00
Emmanuele Bassi
02f18de051 Add copyright and licensing terms to test report generator
So that other projects can use it.
2019-04-16 11:45:43 +01:00
Chun-wei Fan
b1e6e7fb18 .gitlab-ci/test-msvc.bat: Generate cover report for tests
...for Visual Studio builds in the CI.
2019-04-08 14:06:22 +08:00
Emmanuele Bassi
95b7a8ab10 ci: Run test coverage for MSYS2 job 2019-04-06 15:31:41 +01:00
Emmanuele Bassi
ed65996300 ci: Generate a cover report for the test suite
GitLab can show the results of a CI pipeline if the pipeline generates a
report using the JUnit XML format.

Since Meson provides a machine parseable output for `meson test`, we can
take that and turn it into XML soup.
2019-04-06 14:19:20 +01:00
Philip Withnall
7058efb390 ci: Don’t run tests tagged as ‘flaky’ on the CI machines
This effectively renders those tests useless (since realistically nobody
runs tests locally), but it’s better than every other CI run failing for
unrelated reasons. The idea is that the ‘flaky’ tag can be temporarily
applied to a test while a problem is being investigated or fixed, and
then removed later.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-09 10:47:24 +00:00
Tomasz Miąsko
521eba94b9 ci: Install additional locales used during tests
Note that this intentionally does not use glibc-all-langpacks
package since its contents is currently incomplete.
https://bugzilla.redhat.com/show_bug.cgi?id=1624528
2018-12-03 11:40:09 +01:00
Will Thompson
1520afb451
ci: document how to update the Docker image
By making run-docker.sh to `cd` to the correct directory, we don't need to
document that step.
2018-11-13 10:40:44 +00:00
Will Thompson
ab892acf11
ci: add bindfs and fuse to Fedora CI image
Without `bindfs` and `fusermount`, all tests in
g-file-info-filesystem-readonly.c are skipped.
2018-11-13 10:37:46 +00:00
Philip Withnall
304f84ba46 ci: Fix Docker image version
Someone uploaded a v9 image to the registry without updating the CI
YAML.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-29 13:30:28 +00:00
Christoph Reiter
bf032e3e04 ci/msys2: fix path to the lcov config file
It was using a relative path to the source directory but we run lcov
in the build directory.
2018-10-17 18:12:40 +02:00
Philip Withnall
8efe28c570 ci: Add lcov configuration to ignore g_return_*if_fail()/g_assert*()
While we can’t add markers to the macro implementations to cause lcov to
ignore them automatically, we can change our lcov configuration to
ignore all calls to them.

See https://github.com/linux-test-project/lcov/issues/44.

This causes all the un-takeable branches and un-reachable assertions to
be ignored by our code coverage, which bumps our statistics:
 • Lines: 74.9% → 74.8%
 • Functions: 82.3% → 82.3%
 • Branches: 53.3% → 64.2%

The rationale is that nobody should be testing programmer error
handling, as g_return_*if_fail() are used to guard against — so it’s not
reasonable to count missed branches like that in code coverage
statistics.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-06 00:19:20 +01:00
Xavier Claessens
4b983e5122 ci: Upgrade meson to 0.48.0 and use --fatal-meson-warnings 2018-09-27 16:00:53 -04:00
Christoph Reiter
856f7ebe2b ci: Add an autotools job 2018-08-24 18:12:22 +02:00
Christoph Reiter
70ad484508 gresource-tool: fix build in case libelf is available on Windows. Fixes #1466
The gresource code uses libelf if available but that also depends on mmap but isn't
guarded with HAVE_MMAP. This can make the build fail under MSYS2 where a mingw version
of libelf exists but there is no mmap.

Instead of guarting the libelf code with HAVE_LIBELF add a new macro named USE_LIBELF
which is only defined if libelf and mmap support are available.

Also install the mingw libelf version for CI so we catch similar errors in the future.
2018-08-01 19:08:39 +02:00
Philip Withnall
7c8aaa7e0d Merge branch 'ci-coverage-include-baseline' into 'master'
CI: Include coverage data of code which isn't executed by the test suite.

See merge request GNOME/glib!152
2018-07-06 12:28:52 +00:00
Christoph Reiter
69ae2f4242 CI: Include coverage data of code which isn't executed by the test suite.
See comment in !151. Using the "--initial" option of lcov we collect
the coverage of all compiled files and merge them later into the final
report. This way we can see which files are built but never executed
by the test suite.

Because the --initial switch also collects files in the ccache directory
we have to point it to the build directory instead, which in turn breaks
--no-external. Instead of using --no-external in the collection step,
filter out any files not in the source tree in the final coverage job
through a path filter.
2018-07-06 09:36:01 +02:00
Xavier Claessens
ed8c74461f ci: Install meson 0.47.0 on Windows envs 2018-07-03 16:01:55 -04:00
Xavier Claessens
9d73ea8975 ci: Update meson to 0.47.0 in docker image 2018-07-03 11:00:54 -04:00
Xavier Claessens
cf9613056c ci: Add latest Android API level 28
- Split the download part into a separate script to so docker keeps that
step in cache and avoid redownloading it.

- With API level >= 28 libiconv is not needed anymore because it's part
of Android's libc.

- Generate standalone toolchains to reduce the docker image size. It's
also easier because it doesn't need to pass sysroot args.

- Use clang compiler because gcc is deprecated in this Android NDK and
will be removed in the next release.
2018-06-27 09:23:13 -04:00
Xavier Claessens
ca2fc30dea ci: Add "--push" argument to run-docker.sh help script
Also there is no need to run docker as root, the user just needs to be
in the "docker" group.
2018-06-22 11:49:08 -04:00
Xavier Claessens
9a76e08ae1 ci: Update Android NDK to r17b
We should be testing latest NDK release but keep using API level 21 to
ensure GLib does not start using newer APIs. We could also later add a
runner for latest API level 28 which includes iconv API in Android's
libc so we don't need GNU libiconv anymore.
2018-06-22 11:49:08 -04:00