1
0
Fork 0
Commit graph

86 commits

Author SHA1 Message Date
Florian Müllner
40773765df ci: Fix install-common-dependencies.sh -h
The option is advertised as alternative to --help, but doesn't
actually work. While not super important for a script that isn't
user facing, it's a trivial fix and doesn't hurt.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4074>
2024-10-09 00:57:31 +02:00
Florian Müllner
f452d38731 ci: Improve install-common-dependencies usage output
Indicate when options require a parameter, like in the previous
commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4074>
2024-10-09 00:57:31 +02:00
Florian Müllner
01bab71256 ci: Improve install-meson-project usage output
Most of the options require a parameter, indicate that in the
usage output.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4074>
2024-10-08 21:51:27 +02:00
Florian Müllner
625965d956 ci: Rebase image to F41
Fedora has branched, so we can use the newer F41 as base of our
CI image to reduce the number of custom built components.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4040>
2024-09-20 18:06:26 +00:00
Florian Müllner
519ec32ac8 ci: Restrict use of "Fixes #123"
Our convention is to use "Fixes" lines for references commits
(like belated "fixups") and use "closes" for issues.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4017>
2024-09-11 00:44:52 +02:00
Florian Müllner
90d36b8821 ci: Extend "closes" rule
Gitlab also recognizes variants like "close #123" or "Closed #123".

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4017>
2024-09-11 00:44:52 +02:00
Peter Hutterer
ed15460526 ci: Deny a plain "Closes: #123" message in the commit message
We need the full link so let's warn contributors about this instead of
having reviewers pointing this out.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4013>
2024-09-09 08:22:23 +00:00
Michel Dänzer
60161bec38 Bump pipewire requirement to >= 1.2.0
Build upstream version 1.2.0 for the CI image if needed.

v2:
* Build upstream 1.2.0 tag instead of 1.2.2.
v3:
* Build upstream 1.2.3 tag for CI, it has a needed fix.
v4:
* Enable systemd support in pipewire build. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3876>
2024-08-30 21:07:16 +00:00
Florian Müllner
b67afb6fd5 ci: Update gsettings-desktop-schemas check
`accent-color` is no longer the most recent setting
we require, but the tablet tool settings for
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3794.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3918>
2024-08-09 08:29:21 +00:00
Martin Abente Lahaye
1b5766b5a1 ci: Sync install-meson-project.sh with its gnome-shell version
This is not strictly needed as the copy in mutter is always run as
root, but make sense to sync both just for consistency.

See bdbad8ca85

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3883>
2024-07-13 12:49:50 -04:00
Martin Abente Lahaye
9e39175df5 ci: Build and publish system extensions
Use gnomeos-build-sysext CI/CD component to build a system
extension out of mutter branches and MRs.

Use the common script for installing dependencies, but keep
a separate gnomeos script for exclusive dependencies.

See https://discourse.gnome.org/t/towards-a-better-way-to-hack-and-test-your-system-components/21075
See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/837

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3843>
2024-07-12 15:02:42 -04:00
Martin Abente Lahaye
0d647bb1d6 ci: Move installation of common dependencies to a separate script
Since we would be building custom images and system extensions, having
a centralize script has the following advantages:

1. Provides a single place to add/bump dependencies.
2. Allows us to automatically stop building dependencies for
   GNOME OS that has been updated to a recent-enough version.

See https://discourse.gnome.org/t/towards-a-better-way-to-hack-and-test-your-system-components/21075
See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/837

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3843>
2024-07-12 15:02:42 -04:00
Martin Abente Lahaye
8aeb6dc864 ci: Support additional destdir in install-meson-project.sh
To build a system extension we need to:

1. Add dependencies to the container (to build it), and also
2. Add dependencies to the extension (to run it, later).

So there's effectively two locations where we need to install
those dependencies.

See https://discourse.gnome.org/t/towards-a-better-way-to-hack-and-test-your-system-components/21075
See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/837

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3843>
2024-07-12 14:37:34 -04:00
Martin Abente Lahaye
20385dd7b9 ci: Support setting libdir in install-meson-project.sh
Besides building custom fedora images,  we will build
system extensions for GNOME OS. Since GNOME OS uses a
a different libdir compared to what meson defaults to,
we must allow setting libdir in this script.

See https://discourse.gnome.org/t/towards-a-better-way-to-hack-and-test-your-system-components/21075
See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/837

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3843>
2024-07-12 14:35:50 -04:00
Florian Müllner
bcfbc7fa17 ci: Use meson introspect to generate artifact path
We currently assume that the `CI_COMMIT_TAG` variable matches the
version component of the generated dist tarball.

That is usually correct, but sometimes errors happen and a wrong
tag is pushed, and the real release uses something like "46.0-real".

Account for that by building the artifact path from `meson introspect`
and exporting it as environment variable.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3775>
2024-05-24 20:55:23 +00:00
Carlos Garnacho
3207b9d8c5 ci: Check repo sanity
Check that the container registry in user repositories is
enabled, and issue a more descriptive error around it. Lifted
from Tracker.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3681>
2024-04-02 11:16:31 +02:00
Carlos Garnacho
c45a64be7a ci: Look for matching ref in user remote for branch pipeline
Same reasoning than gnome-shell@dbc9ebc6abc8 applies, it may be
useful to run a pipeline with matching branches in the other
project, without necessarily opening a merge request.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:11:13 +02:00
Marco Trevisan (Treviño)
a383917b23 ci: Use improved version of install-meson-project
Copied from
  https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/.gitlab-ci/install-meson-project.sh

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Simon McVittie
d6af73ba68 tests: Use a more interoperable path to bash
On systems that have undergone the /usr merge, /bin/bash and
/usr/bin/bash can be used interchangeably, but on systems where /bin and
/usr/bin are separate (such as Debian 11 or older), bash was traditionally
in /bin and there is no bash in /usr/bin.

Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/2385
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2900>
2023-03-22 15:16:06 +00: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
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
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
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
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
Marco Trevisan (Treviño)
58fb865a7c build: Add CI test setup to run tests as the CI would do
This allows to just use meson test _build --setup=CI to run tests with
the same environment of CI, plus allows to handle wrappers better for
debugging purposes.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
2021-09-04 10:01:29 +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
Florian Müllner
3b49ecea9f Rename the master branch to main
It's a more inclusive name, has the same tab-completion prefix, and is
the default choice for new repositories created locally by git, and on
GitHub and GitLab.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1930>
2021-07-18 23:14:16 +02:00
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