Commit Graph

58 Commits

Author SHA1 Message Date
Florian Müllner
cc04f93683 ci: Fallback to HEAD when checking out branch
... instead of hardcoding origin/master as the default branch.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1930>
2021-07-18 23:14:16 +02:00
Carlos Garnacho
5e8c808cfb ci: Add job for pushing coverity reports
This job does:
1. Download the coverity bundle and untar it
2. Build mutter using clang and the coverity tool
3. Compress the coverity report
4. Upload for analysis

Things to note:
- Analysis are throttled, as per https://scan.coverity.com/faq#frequency
  we qualify for 21 weekly builds, 3 daily. Mutter is sometimes a busy
  project, so it seems we'd get often those consumed early in the day.
  This is something we can resign to, but the times we'll try to upload
  a report to have it rejected make the operation kinda pointless and
  probably better throttled by ourselves.
- The task is manual, given the restrictions above.
- The task only applies on master, as the envvar holding the coverity
  token is protected in gitlab.
- I had to use clang as the coverity tool doesn't seem to work ATM with
  gcc as per recent Fedora.
- The coverity tarball is 1.2GB in size, which is a bit too big to have
  it downloaded each time. As per their upload instructions, the tarball
  gets updated twice yearly, so this is cached to minimize downloads.
- The coverity token for mutter is kept private/hidden in gitlab CI
  settings.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1100>
2021-07-13 15:14:21 +00:00
Jonas Ådahl
747dbe2a69 ci: Bump to F34
This drops some custom building of various components that are now up to
date. While at it, start using the FDO_DISTRIBUTION_PACKAGES variable to
install packages, as it with the bumped ci-templates version also
doesn't install weak dependencies.

This also requires tweaking the pipewire dead lock work arounds, as it
changed configuration file paths.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1865>
2021-07-08 13:15:18 +00:00
Jonas Ådahl
3d2d5cd334 ci: Enable native backend and screen cast tests
With the surfaceless mode in the headless backend, it's now possible to
initiate the headless mode without any mode setting devices, or render
nodes, without any special CI runner privileges.

The native backend tests include screen cast tests, so make them
possible to run by starting pipewire. Testing shows that enabling audio
support (pulseaudio & jack compat layers) makes the tests dead lock and
eventually timeout, so disable those features for now.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
2021-03-12 15:09:45 +00:00
Jonas Ådahl
e52fdad3f4 ci/run-tests: Call set -e instead of set +e
We want to fail the script if anything fails, not the other way around.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
2021-03-12 15:09:45 +00:00
Jonas Ådahl
2be09ce045 ci: Run whole run-tests.sh in a D-Bus session
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
2021-03-12 15:09:45 +00: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
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
Florian Müllner
fbe1a16a6b ci: Only fetch history for branch tips
We don't need any history, so we can save a bit of bandwidth by
omitting it, and only fetch the refs we are actually interested in.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
2020-12-11 16:56:41 +00:00
Florian Müllner
afced5b405 ci: Fix checking out gnome-shell for tag pipelines
$CI_COMMIT_REF_NAME can be a branch name or a tag, depending on the
pipeline, but our checkout script only deals with the former at the
moment.

Address this by rather than looking for a remote branch name, just
try to fetch the ref like we do for merge request pipelines.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
2020-12-11 16:56:41 +00:00
Florian Müllner
f335df56b6 ci: Improve checkout script output
We are currently not very good at communicating what's going in,
in particular for non-merge request pipelines where the output
is usually just "Using origin/master instead" (instead of what?).

Improve this by consistently communicate what we are looking for,
whether we found it, and what we end up doing.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
2020-12-11 16:56:41 +00:00
Niels De Graef
494c9bb729 ci: Fix echo stderr redirection
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1622>
2020-12-04 00:01:03 +01: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
Jonas Ådahl
4b32c92ec6 ci/check-commit-log: Fix test failure count value
It grepped for an older version of the failure XML tag.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1585>
2020-11-20 16:37:01 +01: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
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
Jonas Ådahl
369e2ac9b5 ci/check-commit-log: Check capitalization
To avoid commit messages such as 'window: don't capitalize title', and
instead enforce 'window: Capitalize title'.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
2020-11-16 14:12:48 +01:00
Jonas Ådahl
e7b126eb59 ci/check-commit-log: Inverse merge request URL check
It's from now on the responsibility of marge-bot to append merge request
urls to commit messages, so they should not be part of the commit
message itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
2020-11-16 14:12:48 +01:00
Jonas Ådahl
86f02c758b ci/check-commit-log: Ensure valid cogl and clutter prefixes
Clutter is a "scope", so everything under should be its own
"sub-prefix", e.g. changes to ClutterActor should be prefixed
'clutter/actor', ClutterFrameClock with 'clutter/frame-clock',
CoglFramebuffer with 'cogl/framebuffer' etc.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
2020-11-16 14:12:45 +01:00
Jonas Ådahl
e8ace922a2 ci: Run tests with 10 Hz dummy monitors
This decreases flakyness of some tests when runners are under heavy
load.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1555
2020-11-09 16:12:35 +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
2611ee14b5 ci: Add gnome-shell runtime dependencies
In order to run gnome-shell as part of the CI pipeline, we need
an additional runtime dependency plus python3 modules to mock
required system services and run gnome-shell-perf-tool.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1401
2020-08-07 16:49:59 +02: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
Florian Müllner
38954de11c ci: Adjust URL check
While the old merge request URLs still work, gitlab recently started
including an additional /- for merge requests.

Adjust the regex to account for that, so that simply copying the URL
from gitlab works again.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1090
2020-02-26 06:28:46 +00:00
Wim Taymans
c5d2fc856a screen-cast: Update to PipeWire 0.3 API
Update to 0.3 API

[jadahl: update Dockerfile to include new enough pipewire]

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/1051

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1062
2020-02-20 18:45:31 +01:00
Benjamin Berg
2e97ba316d ci: Change instructions to use podman
Podman can also be used to create the image. The only thing to keep in
mind with podman is to add --format docker, so that the image will be
compatible with all CI runners.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/966
2019-12-11 12:56:28 +01:00
Florian Müllner
9172901458 ci: Fix checkout out gnome-shell on stable branches
For stable branches, we currently only check out the correct shell
branch for merge requests. For the regular pipeline, our code to
determine the current mutter branch fails because CI runs on a
temporary "pipeline/12345" branch that doesn't exist for gnome-shell.

Switching to the correct gitlab environment variable fixes that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/811
2019-11-07 00:06:25 +01:00
Florian Müllner
46aeb9634f ci: Add gnome-control-center
Since 3.34, the gnome-shell package was cleaned up to only depend
on gnome-control-center-filesystem at build-time. However one of
the gnome-shell tests needs the gettext ITS file for keybindings
provided by the main gnome-control-center package (in fact, the
COPR package is stripped down to just that file), so install that
explicitly.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/901
2019-10-29 18:34:36 +00: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
Bastien Nocera
b622a8b55d ci: Print all the commits that need bug references
Rather than just the latest one, otherwise it might leave the patch
submitter to iterate over every commit, if they didn't know every patch
needed a reference.

Closes: #1809
2019-10-23 10:58:07 +02:00
Bastien Nocera
b6170dbe7b ci: Phrase error in a way that gives a hint on how to fix problem
The passive phrasing makes it sound like there's something inherently
broken with the commit, rather than simply being missing an annotation
that the author can add.

Closes: #1809
2019-10-23 10:56:35 +02:00
Georges Basile Stavracas Neto
cada2b54fe Add Graphene dependency
Graphene is a small library with data types and APIs
specially crafted to computer graphics. It contains
performant implementations of matrices, vectors, points
and rotation tools. It is performance because, among
other reasons, it uses vectorized processor commands
to compute various operations.

Add Graphene dependency to Mutter.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Florian Müllner
220e4caf36 ci: Add gnome-autoar to Dockerfile
It is a dependency of the newly added gnome-extensions tool.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/738
2019-08-21 15:10:44 +00:00
Jonas Ådahl
07de258f48 ci/Dockerfile: Pass --no-cache in build example
Using the cache means we don't get updates from Fedora or copr.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/726
2019-08-15 19:59:09 +02:00
Jonas Ådahl
ee3e195b79 ci/Dockerfile: Upgrade after adding copr repos
So that we make sure to upgrade to the packages in the copr repos.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/726
2019-08-15 19:59:09 +02:00
Jonas Ådahl
54fe0d311d ci/Dockerfile: Add mesa crash fix
This applies 'egl/x11: calloc dri2_surf so it's properly zeroed' to
mesa-19.0.7, as it fixes a crash introduced by 'egl/dri: flesh out and
use dri2_create_drawable()' included in 19.0.6.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/648
2019-06-26 18:26:52 +02:00
Jonas Ådahl
fefac75e96 ci/Dockerfile: Add commands for regenerating
Instead of either figuring out themself, or looking at the commit that
added the file, just make life easier by providing the commands for
rebuilding and pushing as a comment in the Dockerfile itself.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/648
2019-06-26 18:26:50 +02:00
Florian Müllner
5e46940332 ci: Drop old gsettings-desktop-schemas package versions
Since we switched to F30, the base system provides newer versions than
the ones specified (although since 3.33.3 not new enough).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/648
2019-06-25 17:43:34 +02:00
Florian Müllner
bd0743a421 ci: Install sysprof dependency from copr
The currently used package links are outdated. Instead of updating them
to the current release number, rely on copr repos having a higher priority
than system repos and simply specify the package name.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/644
2019-06-24 14:35:46 +00:00
Georges Basile Stavracas Neto
04b240b50c
ci: Add sysprof3 to the Docker image
It is now a dependency that we want to build against,
even if optional.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/197
2019-05-31 11:57:09 -03: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
Georges Basile Stavracas Neto
b4d973fbe4
ci: Update gsettings-desktop-schema URLs
Copr keeps changing them.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/548
2019-05-03 14:15:31 -03:00
Georges Basile Stavracas Neto
da1e917b38
ci: Add GNOME Shell dependencies to Dockerfile
Embrace, extend and (soon) extinguish GNOME Shell's CI
image.

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
Jonas Ådahl
72aeeb8c37 ci: Blacklist .c and .h in the commit message subject prefix
`boxes.c: Do that` should be just `boxes: Do that`.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/519
2019-04-02 11:42:44 +00:00
Jonas Ådahl
7b3dee2d97 ci: Nag about invalid commit message subject prefixes
Prefixes use an abbreviated form of the module or section being changed.
For example, changes to MetaBackend/meta-backend.c are prefixed with
`backend:` and generic changes to src/x11/ are prefixed `x11:`.

This extra nit picking check is meant to avoid using non-abbreviated
prefixes, e.g. `MetaBackend:`, or `meta-backend:`, other prefixes are
Currently consisting of only a "blacklist".

https://gitlab.gnome.org/GNOME/mutter/merge_requests/519
2019-04-02 11:42:44 +00:00
Jonas Ådahl
b70c0eb9a5 gitlab-ci.yml: Add check for issue or MR URL
This adds a pipeline stage for merge requests that checks that the
commit message contains an URL to either a issue or a merge request.
This means that for merge requests without corresponding issues will
always fail initially, as the merge request URL is not known until after
it is created. This is still arguably better than accidentally merging
merge requests without URLs.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/440
2019-02-14 17:10:32 +01:00
Jonas Ådahl
c57ae7fc9c cogl/path: Don't depend on GL/glu.h
It's not needed for anything, and we can get rid of the dependency we
just added.

Also remove the installation step from Dockerfile.
2019-01-22 19:06:14 +01:00