Commit Graph

64 Commits

Author SHA1 Message Date
Jonas Ådahl
78ba1429c8 tests: Add headless native backend test
It doesn't do anything more than construct and tear down, but it's a
start.

Don't run the test as part of CI yet, as doesn't have the DRM devices
needed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
2021-03-12 15:09:45 +00:00
Florian Müllner
e2a68b5ba1 ci: Update ci-fairy image
Previously the information which commit failed a commit message check
was hidden in parts of the report that don't show up in gitlab's UI.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1753>
2021-03-04 11:13:41 +00:00
Michel Dänzer
91229e824e ci: Drop dependencies: stanzas
Redundant with needs:.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1725>
2021-02-10 09:52:56 +01:00
Georges Basile Stavracas Neto
02610a1d45 build: Bump pipewire dependency
The 0.3.21 release includes busy buffers, which are a requirement
for us to switch to cogl_framebuffer_flush() in the next commit.

Bump pipewire dependency to 0.3.21, and adjust CI to build it from
the corresponding tag.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1701>
2021-02-08 08:37:08 +00:00
Jonas Ådahl
30e1c51b33 Change all g_memdup() to g_memdup2()
Using g_memdup() is dangerous due to the type of the size argument. See
https://gitlab.gnome.org/GNOME/glib/-/issues/2319 and
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1926 for details.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1708>
2021-02-04 19:16:28 +01:00
Jonas Ådahl
e558d6acb9 ci: Install Xwayland from git
This gives us -initfd, thus Xwayland on demand in the CI.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1681>
2021-01-25 15:14:35 +00:00
Carlos Garnacho
5411b892a0 build: Bump gsettings-desktop-schemas dependency
We will depend on new settings there, ensure we build depend on
it, and CI pulls the dependency.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1416>
2021-01-14 13:58:16 +00:00
Florian Müllner
bd15cfc94b ci: Replace custom commit-log script with ci-fairy
ci-fairy now supports checking commit messages for required/disallowed
patterns. Use that to replace our custom commit-log script.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1649>
2021-01-11 14:02:58 +01:00
Michel Dänzer
0a456b4808 ci: Set GIT_STRATEGY: no for some jobs
These jobs don't need the Git tree.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1647>
2020-12-17 15:49:10 +01:00
Jonas Ådahl
5ddf416bc9 ci: Build and test also on aarch64
This adds 64 bit ARM support to parts of the CI pipeline, more
specifically, we now:

  - Build a 64 bit ARM container image alongside the 64 bit x86 one.
  - Build test mutter on 64 bit ARM
  - Run tests on 64 bit ARM
  - Check coverage on 64 bit ARM

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1577>
2020-11-23 17:53:36 +01:00
Jonas Ådahl
aa186193b5 ci: Bump ci-templates to include ci-fairy fix
This should avoid ci-fairy crashing when checking merge requests on the
same repo as the target branch.

See
https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/66.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1587>
2020-11-23 14:27:38 +00:00
Jonas Ådahl
6e27cc0548 ci: Generate junit report if project doesn't enable the registry
The image registry must be enabled for the CI to work, as the container
image from the upstream registry is placed (as a reference, more or
less) in the local registry.

Recently, ci-templates got a bit more helpful if this happened, and will
fail up front and generate a JUnit report with a message describing the
issue.

Update to this version.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1587>
2020-11-23 14:27:38 +00:00
Jonas Ådahl
78f43baa93 ci: Guard pipeline on review stage
The first step is now review, as they use the tiny ci-fairy image, not
our custom ones, so the guards should be on those, not the build step.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1588>
2020-11-20 23:19:49 +00:00
Jonas Ådahl
6b220c9c37 ci: Rename only_default to pipeline_guard
It's the rules that guard the pipelines, deciding when they are allowed
to run or not. The 'only_default' comes from the fact that in the past
they set the only: field.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1588>
2020-11-20 23:19:49 +00:00
Florian Müllner
abd8032fe5 ci: Include gdm in image
gnome-shell depends on gdm's client library at runtime, but the
new pipeline-built image no longer provides it.

Add it back, but built it from source instead of using the Fedora
package, so we don't draw in all of gdm's runtime dependencies
(which includes a full GNOME session including gnome-shell).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1590>
2020-11-20 20:19:50 +01:00
Florian Müllner
bfeec27435 ci: Include development files for accountsservice
... needed to build GDM, which we'll do in the next commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1590>
2020-11-20 20:19:50 +01:00
Jonas Ådahl
ce1e7a5afe ci: Check that allow-collaboration is checked for merge requests
This required for merging to be possible, so make the lack of this check
box being checked a discoverable error.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1586>
2020-11-20 17:44:59 +00:00
Jonas Ådahl
07c64ded78 ci: Use ci-fairy image in review and run first
This image is much smaller than the one with all the build dependencies,
thus will finish much faster.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1586>
2020-11-20 17:44:59 +00:00
Jonas Ådahl
efbb798309 ci: Use non-string like list for "need" relationships
Looks more natural, since it refers to another entity, not an arbitrary
string.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1586>
2020-11-20 17:44:59 +00:00
Florian Müllner
abdf467ad9 ci: Include GTK4
... for https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1584>
2020-11-20 14:52:26 +01:00
Jonas Ådahl
e4db49d467 ci: Bump ci-templates to include registry path fix
ci-templates had a bug where it failed to find the ready-built container
images on the upstream repository due to invalid assumptions about the
relationship between upstream repository and image registry. This
resulted in the container image to be rebuilt, wasting valuable CPU
cycles and storage space. Bump the included ci-templates template to
include the fix for this.

See https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/22.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1583>
2020-11-20 11:24:46 +01:00
Jordan Petridis
83f5f7728f ci: Set some sensible defaults
* Allow for all jobs to be cancelled if a newer commit is pushed
* Automatically retry jobs if they fail due to some infrastructure issue

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1578>
2020-11-20 07:12:25 +00:00
Jordan Petridis
6f380114be ci: Replace only/except with rules
only/except keywords where deperecated in favor of rules.

Since we started using GNOME/mutter!1525 it introduced
a second pipeline being run for each commit.

Detached pipelines are the only way to access CI_MERGE_REQUEST_*
variables, and if we disable normal pipelines you will need to
create wip/spam MRs in order to run the tests.

This reworked rules makes it so, the normal pipeline needs manual
interaction to be started, and the detached/MR pipleines is always
run.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1578>
2020-11-20 07:12:25 +00:00
Jonas Ådahl
fddd18cdd2 ci: Use ci-templates
This changes from manual container image building using podman locally
to building the container images as part of the CI pipeline.

It uses the CI templates from
https://gitlab.freedesktop.org/freedesktop/ci-templates.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1525>
2020-11-19 13:24:35 +00:00
Jonas Ådahl
a50a5944a7 gitlab-ci.yml: Removed unnecessary when:
It resulted in failed instead of skipped jobs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1567>
2020-11-16 16:28:45 +00:00
Jonas Ådahl
8da1c192e6 ci: Make check-commit-log run again
It needs 'only: merge_request' to get the necessary env variables.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1567>
2020-11-16 16:28:45 +00:00
Jonas Ådahl
815ed52ca1 ci: Wait for review stage before continuing
If review fails, it'll fail very early in the pipeline, but we won't see
the test case failure until the whole pipeline succeeds, which might be
10 minutes later.

To avoid sitting there wondering why it failed, let the time consuming
jobs wait until the review stage, which tends to take less than 20
seconds, succeeds. This way the review test result will be presented
earlier.

This changes the pipeline to run the check-commit-log job also for
non-merge requests, with the difference being that it will pass
immediately if it's not a merge request.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
2020-11-16 14:13:07 +01:00
Jonas Ådahl
0c9f7c7735 ci/check-commit-log: Generate JUnit report
This will make it less horrible when commit message doesn't pass the
compliance checks.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
2020-11-16 14:12:53 +01:00
Carlos Garnacho
232dcad64f ci: Run coverage target by default
We're just a "ninja coverage" away from getting the full report,
it is not that much extra to the pipeline. Also, fix bugs that
accumulated since the manual task was added, e.g. let the full
built+tested tree available on the coverity stage.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1535
2020-10-28 14:07:56 +00:00
Niels De Graef
3bc15ade04 ci: Generate a cover report for the test suite
Based on @ebassi's work from https://gitlab.gnome.org/GNOME/glib/merge_requests/769

This MR allows us to see the succeeded/failed tests each time the CI
pipeline is run.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/528
2020-10-15 10:18:44 +02:00
Florian Müllner
769997b0bc ci: Explicitly specify job dependencies
We can speed up CI a bit by allowing build jobs to run in parallel
with review jobs, and don't have test jobs wait for non-default
build configuration builds.

See https://gitlab.gnome.org/help/ci/yaml/README.md#needs for details.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1398
2020-08-04 18:00:04 +02:00
Marco Trevisan (Treviño)
132060db21 ci: Save built artifacts only for the test build
We only test the meson-build job, so there's no point to save artifacts for
the other test-build only builds.

So, only save meson logs artifacts (with a default gitlab expiration time)
for the other build-without-* jobs

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1236
2020-05-07 22:08:44 +00:00
Marco Trevisan (Treviño)
24a0e72ae9 ci: Remove the MALLOC_PERTURB_ definition
meson already provides one by default [1].

[1] https://github.com/mesonbuild/meson/blob/master/docs/markdown/Unit-tests.md#malloc_perturb_

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1236
2020-05-07 22:08:44 +00:00
Marco Trevisan (Treviño)
5c4938e479 ci: Enable coverage reports in test build
While we don't have an high number of tests, we still have some code
coverage and so we can track this via gitlab CI, given that it supports it
natively.

So add gcovr to the DockerFile dependency, build with -Db_coverage=true
meson native parameter, and add another manual job to make ninja to generate
the coverage reports on requests or in any master or tag ref.

Keep the artifacts around to be able to browse the generated HTML files and
eventually print the text reports so that they can be parsed by gitlab.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1236
2020-05-07 22:08:44 +00:00
Florian Müllner
ce64ab5449 ci: Rebase docker image to F32
We have branched now, time for a shiny new CI image.

Update the Dockerfile to:

 - switch to F32
 - use a single shared copr
 - drop dependencies that are now covered by builddep
 - do not include weak deps

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1176
2020-04-07 13:57:31 +00:00
Georges Basile Stavracas Neto
51cd8aed96 ci: Add a new 'build-without-opengl-and-glx' step
To make sure we don't regress with this specific set of flags.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1151
2020-03-26 18:24:54 -03:00
Florian Müllner
40a76590dd ci: Update docker image to v3
It's this time of the cycle again: Rebase the docker image to the
upcoming Fedora release, so we can drop a fair bit of the custom
dependencies that have piled up.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/894
2019-10-29 02:11:02 +01:00
Jonas Ådahl
2a56de80a2 ci: Change the without-native-backend to not build with Wayland too
There are two common ways of building mutter: With both the native
backend and Wayland support (most common, used by most Linux distributions), and
without the native backend and Wayland support (as is done by some
BSD*s).

To catch compilation errors in both these common build configurations,
change the no-native-backend build phase to also not build with Wayland
support.

This also disables building mutter tests, as tests depend on Wayland to
run.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/837
2019-10-10 22:51:00 +00:00
Florian Müllner
9d4e4e2bd4 ci: Don't build gnome-shell's man pages
One of the man pages is now generated using asciidoc, which is missing
from the CI image. But given that this doesn't depend on mutter in any
way, just disable man pages in the gnome-shell build instead of updating
the Dockerfile.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/740
2019-08-21 22:46:41 +02:00
Florian Müllner
06a7c22bcd ci: Test building without native backend support
Nobody from the core team tests that configuration, so some non-guarded
includes regularly sneak in. Avoid those build breakages by adding a
corresponding job to the CI pipeline.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/637
2019-06-27 15:50:11 +00:00
Marco Trevisan (Treviño)
e3d3df985f gitlab-ci: Use G_SLICE=always-malloc in tests
This allows to catch errors better, as per MALLOC_CHECK_'s definition

https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
2019-05-27 17:23:55 -05:00
Marco Trevisan (Treviño)
86ff3dfb3c gitlab-ci: Print error logs on failures
https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
2019-05-27 17:23:54 -05:00
Jonas Ådahl
e8bca5052a ci: Make MALLOC_PERTURB_ less random
The point is to not initialize to some non-zero value to find places
incorrectly relying on blocks being zero initialized. Thus, there is no
reason to have a different random number each time, and by having it the
same, we have slightly more reproducable triggers, would we ever trigger
anything due to this.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/591
2019-05-24 10:57:46 +02:00
Jonas Ådahl
468882ecec ci: Run dconf update before running tests
Otherwise tests will fail due to the following warning:

(mutter-test-runner:3700): dconf-WARNING **: 06:39:42.124: unable to
open file '/etc/dconf/db/local': Failed to open file
“/etc/dconf/db/local”: open() failed: No such file or directory; expect
degraded performance

https://gitlab.gnome.org/GNOME/mutter/merge_requests/591
2019-05-24 09:23:22 +02:00
Florian Müllner
9c2fdcdbb2 ci: Update Dockerfile to :v2
This commit is a bit deceitful: The main change in the image is *not* the
more recent Fedora base, but an updated (and not backward-compatible)
evolution-data-server package from the fmuellner/gnome-shell-ci copr.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/501 ports
gnome-shell to the new API, so to keep mutter and gnome-shell CI
working after that change, we need to build against the correct
EDS version.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/582
2019-05-20 19:44:57 +02:00
Florian Müllner
d4a0893d76 ci: Disable a11y bus for tests
While the regular session bus is provided by `dbus-run-session`, the
a11y bus is spawn by the "normal" D-Bus daemon (that is, dbus-broker
in F30). This currently fails, either due to a bug or some missing
dependencies in the container environment. But as we don't actually
need the additional bus, just disable it via the environment to make
not break tests when updating the base image to F30.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/582
2019-05-20 19:44:09 +02:00
Marco Trevisan (Treviño)
e96136e418 gitlab-ci: Use MALLOC_CHECK_ and MALLOC_PERTURB_ env variables in tests
Linux glibc supports a malloc implementation that is allows to be tunable using
environment variables, to check allocation issues.

When MALLOC_CHECK_ is set to 3, a diagnostic message is printed on stderr and
the program is aborted.

Setting the MALLOC_PERTURB_ environment variable causes the malloc functions in
to return memory which has been wiped and initialized with the byte value of the
environment variable.

So use this features when running tests in order to catch better memory errors.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/578
2019-05-16 21:30:36 +00:00
Georges Basile Stavracas Neto
3ffc4f8876
ci: Use mutter image to build GNOME Shell
https://gitlab.gnome.org/GNOME/mutter/merge_requests/548
2019-05-03 14:15:31 -03:00
Georges Basile Stavracas Neto
160d2d56d9
ci: Install to Mutter and GNOME Shell to /usr
So GNOME Shell can find the pkg-config files properly.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/548
2019-05-03 14:15:30 -03:00
Georges Basile Stavracas Neto
3468144847
ci: Build GNOME Shell at the test stage
Hopefully this will allow us prevent merging branches
that accidentally break GNOME Shell.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/548
2019-05-03 14:15:30 -03:00