1
0
Fork 0
Commit graph

195 commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
1d766dfbed ci: Perform MR-checks only in MR-branches only
This avoids even starting some jobs that we don't require

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
b0f35cca4d ci: Do not clone the mutter repo when deploying pages
We don't use any source file

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
3c975f78bc ci: Always perform git cloning as user
We are now building and testing mutter as user, but the clone may happen
as root, before the docker image takes place.

This may create troubles to git, causing errors such as:
 fatal: detected dubious ownership in repository at ...

And we can't fix this using safe.directory option because we have no
control on the system at this scope.

So, let's just handle the cloning manually so that the meta-user is
always the owner of the repository.

This fixes the dist job, but also other jobs that may fail because of
this reason.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
aef3ee4e61 ci: Use named base job to skip git cloning (AKA GIT_STRATEGY: none)
It's not clear what it does, so use some clearer naming

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
c472570194 ci: Use extends to inherit test-setup values
Using the old replace syntax doesn't allow to extend dicts such as
variables or other values, but instead it replaces them.

So use a newer and safer syntax, given we don't need to replace any
parameter where used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
0adf3dcba0 ci: Do not run meson install with sudo
It will happen automatically since we have pkexec calling it implicitly

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
e613ffb5a5 ci: Always run dist job at marge-bot state
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
2ff351cc9b ci: Allow to run dist job manually in non-merge requests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
233fb6b7e6 ci: Disable building introspection when not needed
We can just save few cycles when the build-test doesn't require it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
0b30b2a1d7 ci: Print error logs on failures
Indeed we have more detailed logs, but this allows quicker checks.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
69cc65d15f ci: Run all the pipeline jobs as User
It's just closer to reality of an user session.

As per this:
 - We need to bump the required CI template to use this feature.
 - Use sudo in the actions that require it
 - Replace pkexec with sudo (it wouldn't work otherwise)
 - Ensure we don't rebuild during install not to break build dir
 - Give permission to use /dev/kvm to our user (we do this during the
   image creation because we don't have an user when $FDO_DISTRIBUTION_EXEC
   happens)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
0c56b143a2 ci: Use dry-run install during the build test
We already test install as part of other jobs (such as
can-build-gnome-shell) and in general that's wrong because we may
add to the final install path artifacts that are required during tests,
hiding potential issues with meson test when those files are not
installed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
4540284c06 ci: Avoid using trailing && in FDO_DISTRIBUTION_EXEC
It's not required and makes things hard to maintain, we can just rely on
the fact we're in a shell and just use `set -e` to prevent any
unexpected failure to go unnoticed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Florian Müllner
e49e9ed59e ci: Rebase image to F38
By now F38 is stable enough to use it as the base of our CI image,
so do that.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2913>
2023-05-19 13:39:10 +00:00
Florian Müllner
b76a9100ea ci: Do not clean caches while building image
The template already does this at the end, so this step is
pointless in the best case.

When building the x86-64 image, we install additional packages
afterwards, so the repo metadata is downloaded again.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3010>
2023-05-18 19:02:29 +02:00
Florian Müllner
73ac37e751 ci: Stop running meson without subcommand
Invoking meson with no command is deprecated in favor of
`meson setup`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3010>
2023-05-18 19:02:11 +02:00
Carlos Garnacho
ae2ceeda0b ci,tests: Pass GTK_A11Y=none to tests
Same rationale applies than NO_AT_BRIDGE, but for GTK4 bits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2864>
2023-03-03 20:17:01 +00:00
Carlos Garnacho
53cf1a2878 ci: Update image with new/future dependencies
gnome-desktop4 will be used from both Mutter and GNOME Shell,
and libnma-gtk4 only from GNOME Shell.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2864>
2023-03-03 20:17:00 +00:00
Jonas Ådahl
f34c6da956 build: Depend on glib 2.75
This allows us to use g_clear_fd().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2806>
2023-01-30 15:11:26 +00:00
Bilal Elmoussaoui
6ea70600af ci: Add a Wayland only target
To ensure a Wayland only job without Xwayland and in the future
without x11 server works as expected

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2399>
2023-01-03 20:45:04 +00:00
Bilal Elmoussaoui
f7c55d478a ci: Disable xwayland when wayland is disabled
As we error out if wayland is disabled and xwayland is enabled

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2399>
2023-01-03 20:45:04 +00:00
Robert Mader
02d35309e6 ci: Bump base image to F37
And clean up custom installs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2769>
2022-12-19 14:25:35 +00:00
Hunor Csomortáni
88a53cc9ce ci: Fix the expected name of the junit report
Tests are run with '--setup plain', expect testlog-plain.junit.xml as an
artifact name.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2733>
2022-12-06 14:08:37 +01:00
Jonas Ådahl
4e3450ea4e ci: Upgrade python-dbusmock
This is needed for running GNOME Shell, as the older version has an
incorrect PowerProfiles property type.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2719>
2022-11-25 21:32:06 +01:00
Jonas Ådahl
1b65fedc9b ci: Only launch a single mocked D-Bus environment for all tests
This cuts away a lot of time wasted on spawning and tearing down D-Bus
daemons and mocked service for every test case.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2678>
2022-11-01 21:04:21 +00:00
Marco Trevisan (Treviño)
0a234f320b ci: Enable coverage report using cobertura format
This will allow to integrate coverage information with MR's diffs.

See https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2515>
2022-09-27 17:13:32 +02:00
Marco Trevisan (Treviño)
0cb6a9e41a ci: Expose Coverage report and Documentation artifacts to PRs
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2515>
2022-09-27 17:13:01 +02:00
Jonas Ådahl
3faf1f15d7 ci: Install colord and lcms2 devel packages
Needed for colord integration and color management.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2141>
2022-09-01 14:31:40 +00:00
Jonas Ådahl
d9030e02d1 ci: Enable 'catch' backtrace generation
catch needs to be able to use ptrace(); asan builders allow this, so tag
the test steps with asan and asan-aarch64 to make them run on capable
runners.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2561>
2022-08-19 15:39:57 +02:00
Jonas Ådahl
530d296a0c ci: Don't use common build configuration in dist
In the dist job, use the default configuration, instead of the one used
elsewhere in CI that aims to enable as many code paths as possible.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2561>
2022-08-19 15:39:57 +02:00
Florian Müllner
d70b0c78e0 ci: Bump base image to F36
It's this time of the year again ...

The glibc update means that we finally run into the catchsegv removal
issue in our CI image. At least for now, solve this by including the
glibc-tools project, which aims at keeping those tools alive.

[jadahl]: Bumped virtme to include https://github.com/amluto/virtme/pull/77

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2430>
2022-08-18 15:02:12 +00:00
Florian Müllner
c6dc12cdc5 ci: Drop distro version from image name
We are unlikely to ever use multiple fedora versions, so all the
versioned name does is being annoying when updating to a newer
base image.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2430>
2022-08-18 15:02:12 +00:00
Jordan Petridis
5d81f6d89d ci: Avoid duplicate pipelines vol 2
This is a followup to GNOME/mutter!1578

This commit does a couple of things to avoid creating multiple
pipelines per commit.

First, it avoid catch all `when: manual` rules, which might
end up matching custom variables set which might potentially
not be handled.

Secondly it reworks the `workflow:rules:` and the pipeline guard
rules to avoid duplicate pipelines as the gitlab documentation
suggests.

Last, it switches from yaml anchors to the new `reference` gitlab
keyword which is more flexible.

https://docs.gitlab.com/ee/ci/jobs/job_control.html#avoid-duplicate-pipelines

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2534>
2022-08-17 11:46:45 +00:00
Jonas Ådahl
a4e71361b6 ci: Always retry the image build step
The image build step is prone to race conditions, e.g. token changes. It
also tends to hit sporadic connection errors to FDO's gitlab. To
minimize the risk of these types of issues block pipelines, always retry
the image building step if it failed.

This has the unwanted consequence that changes to the image building
that results in the script actually failing, but right now there doesn't
appear to be a way to distinguish between actual build errors, and the
mentioned race conditions, as both cause the script to fail.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2564>
2022-08-10 12:54:33 +00:00
Florian Müllner
d3a7e9a7b5 ci: Include gcr4 in image
Needed in order to port gnome-shell to the new major version
(https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2386)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2547>
2022-08-02 16:26:15 +02:00
Robert Mader
823e3a5c72 Bump required wayland-protocols version
For `wp_single_pixel_buffer_v1`

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2246>
2022-08-02 12:19:42 +00:00
Florian Müllner
588e4e88f5 ci: Update gjs
Allow gnome-shell to depend on recent improvements in gjs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2523>
2022-07-26 21:06:15 +00:00
José Expósito
cddf30c1df ci: Update Wayland to v1.21.0
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1962>
2022-07-14 22:29:56 +00:00
Jonas Ådahl
973b94ae46 ci: Bump the container image
This will include gtk+ 3.24.34, which contains a fix avoiding errors
when querying RANDR after Xwayland terminated.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2484>
2022-07-01 15:46:25 +00:00
Jonas Ådahl
3ee28bc336 ci: Fix Xwayland build config
Some of the options doesn't exist anymore, and warnings are now fatal.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2484>
2022-07-01 15:46:25 +00:00
Bilal Elmoussaoui
d1a85c34cc ci: Build and deploy documentations
A first step towards better documentations of Mutter
and it internal libraries

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2427>
2022-06-03 16:56:49 +00:00
Jonas Ådahl
5c5e30638d ci: Run KVM tests
This commit makes the KVM tests run in special VM runners tagged with
the 'kvm' tag. In order to avoid building the kernel image used for
running the tests each pipeline, it's built as part of the CI image
building.

For now, KVM tests are only run on the x86_64 architecture. The reasons
for this are two that the kernel image building script doesn't yet handle
any other architecture than x86_64 due to differences in how the image
is built and handled, as well as the fact that there only exists a kvm
tagged runner for x86_64.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152>
2022-03-28 16:17:21 +00:00
Jonas Ådahl
3650cb941f ci: Break up some long meson lines
Placing one configuration option per line makes it easier to see what is
enabled or not.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152>
2022-03-28 16:17:21 +00:00
Jonas Ådahl
11ae4c2084 ci: Put wild cards in single quotes
To not expand coverage-* into actual coverage files, put the argument
in quotes, so that all files are added.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2324>
2022-03-07 09:54:43 +00:00
Jonas Ådahl
cccf133f55 ci: Increase warnlevel from 1 to 2
This will hopefully catch more things than -Wall.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2319>
2022-03-04 23:12:24 +00:00
Carlos Garnacho
40627f88cf ci: Run coverage in all tests, and merge results
Instead of having different coverage outputs for different architectures
and compilation flags, have each of those tests run coverage in order
to generate a JSON report, and have that merged at a final common job.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2315>
2022-03-04 22:47:04 +00:00
Jonas Ådahl
370de58868 wayland/surface: Add support for wl_surface.offset
This aims to replace the x,y arguments in wl_surface.attach(); meaning
it can be used more sanely together with EGL, and at all when using
Vulkan.

The most common use case for the offset is setting the hotspot of DND
surfaces.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1905>
2022-03-04 17:38:30 +01:00
Jonas Ådahl
f9d6bccf0c Bump required wayland-protocols version
Once in meson.build to declare the build requirement, then again in the
CI description to build an image a new enough version.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167>
2022-03-04 14:48:25 +00:00
Florian Müllner
7734d6f56b ci: Rebuild image with newer dependencies
gjs and gsettings-desktop-schema have seen releases. Include them
in the image to allow gnome-shell to depend on the versions it
actually needs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2300>
2022-02-22 13:46:28 +01:00
Jonas Ådahl
9b8f0f9c7c ci: Install xwayland from tag directly
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2300>
2022-02-22 13:46:28 +01:00
Olivier Fourdan
ffa5fd776d ci: Build Xserver from git
This is to get support for the “-terminate delay” option in Xwayland
with libXfixes 6.0.

libXfixes 6.0 provides the new ClientDisconnectMode that clients can
use to declare themselves as to-be-terminated.

This can be used to let Xwayland terminate itself automatically when no
other (“non-terminatable”) X11 client is left.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
2022-01-26 14:42:22 +01:00
Florian Müllner
3b400f9a5b ci: Update gjs
gjs recently updated its mozjs dependency. Include it in the image
to allow gnome-shell to make use of new JS features.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2245>
2022-01-25 14:04:21 +01:00
Marco Trevisan (Treviño)
4e10324a80 CI: Bump the required desktop-schemas hash that includes privacy-screen
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1952>
2022-01-25 07:31:19 +00:00
Jonas Ådahl
fc358e1306 ci: Upgrade wayland-protocols to 1.24
This release include the DMA buffer feedback addition.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1959>
2022-01-05 16:36:48 +00:00
Florian Müllner
db0d7202c3 ci: Build libgweather from git
GWeather bumped API in its main branch, and we need the new version
in the CI image in order to port gnome-shell.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2205>
2022-01-05 04:21:28 +01:00
Jonas Ådahl
b0b45b0570 ci: Make run-tests.sh usable for the dist job too
We can't just run a single 'meson' command in the script as we need to
launch multiple long running processes inside the D-Bus session:

 * The meson test invokation itself
 * wireplumber

This was handled for the 'test' stages, but not for the 'dist' stage,
which as a result would fail due to wireplumber not being launched
causing any test using pipewire to timeout.

Address this by making run-tests.sh a more generic run-meson.sh that
launches wireplumber before running the actual meson command.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2204>
2022-01-04 12:07:06 +01:00
Jonas Ådahl
1dcdb551a7 ci/dist: Don't expose artifacts
The tarball job adds artifacts, lets not interfere with that. Also it
didn't work, even after fixing the path.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2204>
2022-01-04 12:05:35 +01:00
Jonas Ådahl
34063dad79 ci/dist: Store meson logs in artifacts
This helps when debugging test failures during the dist job that doesn't
reproduce in the regular test job.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2203>
2022-01-04 09:14:15 +01:00
Jonas Ådahl
e90ab531bb ci: Fix gsettings-desktop-schemas branch name
It's still called 'master' not 'main'. It wasn't noticed since the
commit introducing it didn't bump the tag, thus the image was never
rebuilt.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2202>
2022-01-03 19:54:25 +01:00
Alexander Mikhaylenko
9fb2a2a373 ci: Build newer gsettings-desktop-schemas
gnome-shell will need to depend on a yet unreleased version.

See https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2069

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2173>
2021-12-21 00:08:26 +05:00
Jonas Ådahl
f5f59ad6e6 ci: Bump to F35
Needs a couple of changes to make tests pass again:

  * mesa-dri-drivers needs explicit installation to install swrast dri
    driver
  * wireplumber needs to be started inside the D-Bus session

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2142>
2021-12-19 16:20:49 +00:00
José Expósito
c3087dae7d ci: Install libinput and wayland-protocols from git
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1830>
2021-12-02 20:48:24 +00:00
Jonas Ådahl
1f9af12e5a ci: Fix junit artifact file name
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1796>
2021-10-26 17:53:50 +02:00
Florian Müllner
08a3fc99a2 ci: Add dist job
So far, releases are done locally by invoking `meson dist`.

We can do better and leverage the existing CI infrastructure, to get
to the following release workflow:

 - bump version in meson.build, update NEWS etc.
 - open merge request for the release
 - merge when the pipeline (including dist check) succeeds
 - tag the release
 - wait for the tag pipeline to spit out the tarball artifact

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1980>
2021-09-05 00:15:56 +02:00
Florian Müllner
4bbe61d47e ci: Move test setup into template job
This will allow sharing the setup between test jobs and a future
dist job.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1980>
2021-09-05 00:15:56 +02:00
Florian Müllner
f41b165f9c ci: Add asciidoc to image
gnome-shell uses it to pre-generate man pages at dist time.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1980>
2021-09-05 00:15:56 +02:00
Marco Trevisan (Treviño)
bf54a16f92 tests: Add MetaOrientationManager tests via SensorsProxy mock
Create a test system bus and use it to run all the tests, add a mock
SensorsProxy (via dbusmock template) server that implements the
net.hadess.SensorProxy interface.

To make testing easier, the service is created on request of a proxy for
it, whose lifetime controls the mock service lifetime as well.
This is done using a further mock service that is used to manage the
others, using python-dbusmock to simplify the handling.

Add basic tests for the orientation manager.

As per the usage dbusmock, we're now launching all the tests under such
wrapper, so that local dbus environment won't ever considered, and
there's no risk that it may affect the tests results both locally and in
CI.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
2021-09-04 10:04:00 +02:00
Florian Müllner
0f8ae7c507 ci: Build gjs from git
... to allow gnome-shell to bump its dependency for
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1958

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1975>
2021-08-30 20:11:57 +00:00
Robert Mader
5a25f2f62b ci: Use target branch from target project for code-style check
Merge requests from forked projects run pipelines in their context,
not the target projects one. Thus we have to fetch the target
branch from the target repository.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1977>
2021-08-27 12:48:36 +02:00
Robert Mader
264c625b79 ci: Fetch the right target branch
And remove a superfluous fallback to the default branch - we already
check that the target branch is defined.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1973>
2021-08-24 12:00:38 +02:00
Carlos Garnacho
117027d9fd ci: Add job to check code style
At the moment, allow the task to fail, while we smooth out the
uncrustify configuration.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1924>
2021-08-22 21:27:35 +02:00
Florian Müllner
b17f27416d ci: Switch to meson's generated Junit report
... instead of generating it ourselves from the regular meson logs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1957>
2021-08-22 17:32:12 +00:00
Florian Müllner
7eb68b43a9 ci: Use backend-agnostic meson command to build
There's no alternative backend in sight for us, but it's nice to
only deal with a single build tool.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1957>
2021-08-22 17:32:12 +00:00
Jonas Ådahl
23bebf3385 xwayland-grab-keyboard: Switch to g_pattern_spec_match_string()
The g_pattern_match_string() variant is deprecated, switch to the
properly namespaced one.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1941>
2021-08-12 13:11:31 +00:00
Florian Müllner
6c19d39d8b ci: Build settings-desktop-schemas from git
We need a newer version for
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/687.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1938>
2021-07-27 14:17:40 +00:00
Florian Müllner
035527cdcb ci: Move FDO_UPSTREAM_REPO to global scope
ci-fairy also uses the variable to set the upstream remote that is used
to build the commit range to check.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1936>
2021-07-19 15:14:04 +02:00
Florian Müllner
221331a1db ci: Bump ci-templates image
Before building a container image, the code checks that the
repository's container registry is enabled. That check was
broken a while ago, update the image to pull in the fix.

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

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1935>
2021-07-19 13:40:42 +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
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
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