Commit Graph

77 Commits

Author SHA1 Message Date
Jonas Ådahl
5916a87103 ci: Bump mutter CI image
It's needed to make mutter build again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2132>
2022-03-04 22:05:45 +00:00
Florian Müllner
774f133ab9 build: Bump some dependency versions
Mutter and gnome-shell are released in lock-step, but I forgot to
bump the requirement accordingly.

Likewise the gsettings-desktop-schemas dependency is outdated, there
are a couple of keys we depend on that were added this cycle.

And while building should still be possible with the old gjs version,
we do require a newer version at runtime, so reflect that as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2183>
2022-02-22 13:55:59 +00:00
Florian Müllner
3973c84e97 ci: Stop prohibiting template strings in files with translations
It has been nearly two years since the last regression reported in
https://savannah.gnu.org/bugs/?func=detailitem&item_id=50920 has been
fixed, and no further regressions were reported in the meantime.

It looks therefore safe enough to not restrict ourselves, and start
allowing templates for all non-translatable strings again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2160>
2022-02-12 12:29:52 +00:00
Florian Müllner
b001f18440 ci: Update js image
- switch to F35 base
 - update eslint
 - update mozjs to 91
 - install current gnome-extensions tool instead of ancient tag

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2115>
2022-01-25 15:21:16 +00:00
Florian Müllner
a0c8462170 ci: Bump mutter image
Needed for the new mozjs91-based gjs.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2115>
2022-01-25 15:21:16 +00:00
Florian Müllner
a48fd70e38 ci: Bump mutter image
Mutter itself now depends on a more recent wayland-protocols, so
update to the correct image version to fix the CI build.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2086>
2022-01-05 19:02:12 +01:00
Florian Müllner
ab52ce4591 dateMenu: Port to GWeather 4.0
Besides dropping its GTK dependency (which doesn't affect us),
GWeather 4.0 replaces its own timezone type with GTimeZone.

It's easy enough to adjust to that, so port over to the new
version.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2083>
2022-01-05 04:07:25 +01:00
Jonas Ådahl
7d859fb859 ci: Bump mutter image
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2059>
2021-12-04 17:12:32 +01:00
Carlos Garnacho
4e5ddc5459 ci: Install mutter again on coverity job
This job "needs" the build job and thus gets its artifacts, but
it will not inherit the environment where we already installed
Mutter in /usr. This apparently broke once there was a more
recent mutter-clutter .pc file to look up.

Install Mutter in /usr again in this job, so the new build for
coverity finds all dependencies.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1979>
2021-10-08 16:17:04 +00:00
Florian Müllner
e9d6468609 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/gnome-shell/-/merge_requests/1968>
2021-09-05 01:28:46 +02:00
Florian Müllner
d8b88c24d9 ci: Reindent yaml configuration
Most GNOME projects have settled on a 2-space indentation, so switch
to that. This will ease the ongoing copy+paste between projects :-)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1968>
2021-09-04 23:46:46 +02:00
Evan Welsh
0d8e0025d6 init: Set console log domain
GJS added a console module that extensions may start using. To ensure that
extensions using console.log() and similar functions don't show up as
'Gjs-Console' in users' system logs, we should call setConsoleLogdomain()
with 'GNOME Shell'.

This GJS API addition is only accessible using ECMAScript Modules (ESM),
this commit moves shell startup to a small init.js module and adapts
CI jobs to either handle or ignore it.

We can drop the .jscheckignore file when future versions of SpiderMonkey
allow for compile checks without validating module specifiers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1958>
2021-09-01 14:55:47 +00:00
Florian Müllner
ef70364e81 cleanup: Replace non-standard ByteArray module
gjs landed support for TextDecoder/TextEncoder. Use those instead
of gjs' own ByteArray module.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1946>
2021-09-01 14:49:30 +00:00
Florian Müllner
4bbbee4dd6 ci: Expose meson's Junit test results to gitlab
Turns out meson has been generated Junit XML files of its test
results since 0.55 ...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1937>
2021-08-24 08:18:26 +00:00
Florian Müllner
0cd882697a ci: Use backend-agnostic meson commands
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/gnome-shell/-/merge_requests/1937>
2021-08-24 08:18:26 +00:00
Florian Müllner
a802bfda39 ci: Include eslint-plugin-jsdoc in js image
gjs started to require it in its config, so we need it
if we want to keep our configuration in sync.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1949>
2021-08-24 08:13:19 +00:00
Florian Müllner
b9f38f95e3 ci: Split POTFILES check between C and JS
Regex are a crude tool for analyzing whether some code *calls* a
particular function. Spidermonkey has Reflect.parse() that returns
the AST of the passed in code, which allows for a much more precise
check for javascript.

The old script is still used for C code, where i18n-affecting changes
are much rarer.

Based heavily on Philip Chimento's mozjs migration script at
https://gitlab.gnome.org/ptomato/moz60tool.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>
2021-08-14 18:45:25 +00:00
Florian Müllner
508442cef2 ci: Update mutter image
Mutter now requires a development version of glib, so bump the
image to satisfy the dependency.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1947>
2021-08-12 21:01:01 +02:00
Florian Müllner
8edd6aef64 ci: Update mutter image
It pulls in a new gsettings-desktop-schemas version for
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/687.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1931>
2021-07-29 20:10:58 +02:00
Florian Müllner
da11d8d7ef 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/gnome-shell/-/merge_requests/1922>
2021-07-19 14:15:22 +00:00
Florian Müllner
bc3ae223f1 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/gnome-shell/-/merge_requests/1922>
2021-07-19 14:15:22 +00:00
Florian Müllner
df76c3fd11 Update links to use HEAD instead of master
That way the link will keep working when projects change their
default branch name.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1914>
2021-07-18 21:45:46 +00:00
Carlos Garnacho
6203668b6c ci: Add job for pushing coverity reports
This job does:
1. Download the coverity bundle and untar it in a cached location
2. Build GNOME Shell using clang and the coverity tool
3. Compress the coverity report
4. Upload for analysis

In a similar setup to that of Mutter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1913>
2021-07-16 21:49:19 +00:00
Carlos Garnacho
37a6434a4d ci: Funnel package list to be built correctly
It was on one hand using multi-line piping (`|`) and trying to
compensate with \ to escape multiple lines, this lead to:

  No match for argument: \

Also, the quoting around pkgconfig() arguments would lead to
double quoting at the shell level, thus:

  No match for argument: 'pkgconfig(gio-2.0)'

Fix both by using multi-line-turns-single-line piping (`>`)
and dropping the unnecessary quotes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1913>
2021-07-16 21:49:19 +00:00
Jonas Ådahl
5acab6c300 Port to MetaContext
This ports over gnome-shell and the theme test case to MetaContext,
instead of the various functions that were available before.

The test case is changed to use the special test context, used to
construct contexts for testing. It's part of a shared libary separate
from the main libmutter one.

This enables building mutter tests during CI, as the test framework is
needed by some of gnome-shell's tests.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1840>
2021-07-15 12:42:17 +00:00
Jonas Ådahl
38d9b35ec8 ci: Bump to F34
This bumps both the mutter image to the F34 one, as well as the one used
for review.

This also bumps ci-templates hashes, so that we can use
FDO_DISTRIBUTION_PACKAGES without installing weak dependencies.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1906>
2021-07-07 17:10:17 +02:00
Florian Müllner
ff163a03b9 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/gnome-shell/-/merge_requests/1740>
2021-03-03 20:29:22 +01:00
Florian Müllner
d6a1414a94 extensions-app: Use development profile for nightly build
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>
2021-02-11 17:47:27 +01:00
Florian Müllner
39d5d6ad13 ci: Bump mutter image
Needed for mutter's bumped pipewire dependency.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1650>
2021-02-08 15:21:17 +01:00
Jonas Ådahl
463000d04d 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/gnome-shell/-/merge_requests/1637>
2021-02-04 20:17:04 +01:00
Robert Mader
7462347905 ci: Fix typo
This made us fall back to a normal debug build, not catching certain
warnings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1597>
2021-01-26 20:40:30 +00:00
Florian Müllner
ecf5e3d3ee ci: Bump mutter image
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1570>
2021-01-14 17:16:52 +01:00
Florian Müllner
da09c67600 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/gnome-shell/-/merge_requests/1544>
2021-01-11 14:01:44 +01:00
Florian Müllner
e8893f4fa4 ci: Bump ci-fairy template include
This fixes the check-merge-request job when MR branch and target branch are
on the same repo.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1508>
2020-11-24 18:00:29 +01:00
Jordan Petridis
07fd0d3f2e ci: Replace only/except with rules
only/except keywords where deperecated in favor of rules.

Since we started using GNOME/gnome-shell!1492 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/gnome-shell/-/merge_requests/1503>
2020-11-21 00:24:25 +01:00
Jordan Petridis
b64020f84b 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/gnome-shell/-/merge_requests/1503>
2020-11-21 00:24:22 +01:00
Jonas Ådahl
250bab0115 ci: Check that merge requests have the right settings
This will catch the missing "allow write access for maintainers" check
box being checked.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1506>
2020-11-20 23:24:03 +01:00
Jonas Ådahl
1aa7a23427 ci: Use ci-fairy image for commit log check
It's much much smaller.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1506>
2020-11-20 23:24:03 +01:00
Florian Müllner
e81cab540f ci: Update mutter image
Mutter now produces an image as part of its CI pipeline. Use that
instead of the now outdated manually built image.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1504>
2020-11-20 20:33:56 +01:00
Florian Müllner
1fbf62f0c6 ci: Use the CI image produced by the pipeline
The newly-added eslint_mr job still uses the manually built
extension image instead of the image that is built as part
of the pipeline.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1504>
2020-11-20 20:33:40 +01:00
Jonas Ådahl
2e976cd9bf 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/gnome-shell/-/merge_requests/1505>
2020-11-20 17:34:11 +01:00
Jonas Ådahl
e203278d74 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/gnome-shell/-/merge_requests/1502>
2020-11-20 11:32:12 +01:00
Jonas Ådahl
e026e3bc9f ci: Use ci-templates for building image
This rebuilds the automaticaly whenever the image tag changes. Whenever
something in the image needs to change, alter the installation script
and change the tag to the current date.

This removes the -s (strict) argument from js68, as it doesn't exist in
js78.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1492>
2020-11-17 19:07:42 +00:00
Jonas Ådahl
e2945a525c ci: Wait for 'check-commit-log' before continuing
The check-commit-log is quick, and to get a result early is helpful as
one can then more quickly check for failures via the report provided via
the JUnit report.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1491>
2020-11-17 17:29:56 +00:00
Jonas Ådahl
09a09dd102 ci/check-commit-log: Generate JUnit report
This means the merge request will see the commit log review issues
causing the pipeline to fail without having to dig through CI log files.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1491>
2020-11-17 17:29:56 +00:00
Florian Müllner
25ca8826ed ci: Enforce non-legacy style for new code
We have been transitioning to the new coding style for a while now,
and there has been reasonable progress. So hopefully it is not too
intrusive at this point to enforce non-legacy style for all lines
that are changed in a merge request. If it turns out to be still too
annoying, we can always reconsider and turn off the additional job.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1497
2020-11-13 22:40:45 +01:00
Florian Müllner
4401c8fae7 ci: Use junit output format
Gitlab has built-in support for junit reports, so switch eslint's
output to that format.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1497
2020-11-13 22:32:50 +01:00
Florian Müllner
8c13e3855e ci: Use node-js script for running eslint
This is unnecessary hard in shell when compared to a proper programming
language. It becomes even easier with a node-js script, as that gives us
access to the underlying ESLint module rather than just the CLI interface.

Besides that, node-js has the added benefit that we don't need to add
more dependencies to the CI image.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1497
2020-11-13 22:32:50 +01:00
Florian Müllner
8993de76f0 ci: Remove pot file test
A recent Docker image update broke the test, as xgettext now prints
the following warning:

warning: a fallback ITS rule file '/usr/share/gettext-0.21/its/metainfo.its'
is used; it may not be in sync with the upstream

That is completely unrelated to what the test is meant to catch and
could be fixed by adding appstream to the image, but considering that

 - the test didn't actually catch the last template string regression
 - we no longer allow template strings in files that include translatable
   strings (and enforce that with a CI job)
 - as of gettext 0.20.2, the template handling really really is fixed
   (we'll see)

let's remove the test rather than piling up more stuff in the container
image.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1399
2020-08-07 21:52:00 +02:00
Florian Müllner
a96c8d91b5 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 the flatpak build.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1391
2020-08-04 14:12:11 +00:00