Commit Graph

261 Commits

Author SHA1 Message Date
Jehan 6f4155ee34 gitlab-ci: name the distribution artifacts and small build-deps.sh fix.
This should give a nice name to distribution archives so that they are
not all called `artifacts.zip`. Names will better describe their
contents (target OS or source and short commit hash, because for CI
builds, it's important to know which commit is being tested).

Also replace CI_COMMIT_REF_NAME in other artifact names by
CI_COMMIT_REF_SLUG. Otherwise if a branch has a slash (quite common in
branch names), only the part after the last slash is used for archive
naming.

Finally immediately exits from dependency build with error code (!= 0)
if `crossroad install` command failed.
2020-10-03 22:07:56 +02:00
Jehan 42e25e5b6f gitlab-ci: "needs" jobs have to be in a prior stage. 2020-10-03 13:22:56 +02:00
Jehan 6eab32c71a build: (Windows) glib-compile-schemas and gdk-pixbuf-query-loaders in…
… the CI.
There are 2 finale steps before finale binary distribution on Windows.
We must compile the GSettings XML schema files and register GdkPixbuf
loaders (for file format support in the GUI).

I used to provide a wrapper to be run inside Windows before first GIMP
run. Never did I realize that I can compile the distributed GSettings
schemas with the native `glib-compile-schemas` (works fine in my tests).
As for the GdkPixbuf loaders, we inspect DLL libraries, hence we do
require the target `gdk-pixbuf-query-loaders` which is unfortunately a
Windows executable. Yet it seems to work fine with Wine, so let's be
done with it in the CI instead of requiring manual steps from testers of
the CI builds. Then a few `sed` calls are enough to make the path in the
produced text file relative instead of absolute (which works fine, again
in my tests at least).

This means that I don't have to distribute the 2 binaries and the DLLs
they depend on anymore. Moreover let's remove the wrapper (but still
generate one which just calls GIMP so that we call it from the tree
root, where it's much less messy).

Note: I failed to install wine32 (32-bit Wine) on the Gitlab runner.
After following all instructions, I encountered weird errors. So
instead, I just make the win32-nightly job depend on win64-nightly and
copy `loaders.cache` from one to another, as it is a
platform-independent text file (as long as we provide the same GdkPixbuf
loaders on both of course, which we do).
2020-10-02 13:00:12 +02:00
Jehan cdb61d829e build: dll_link.py improved to handle both i686 and x86-64 Windows…
… executable formats inspection.
2020-10-02 03:18:23 +02:00
Jehan 8f8f7e497a gitlab, build: Win32 distribution jobs for our CI.
The main purpose of these jobs is to only package the strict necessary
for a working GIMP under Windows, i.e. getting rid of all unnecessary
executables, and inspecting binary dependencies recursively to only
package used DLLs.

The dll_link.py script is taken from Siril codebase (see commit a86e82a8
on Siril repository, by FlorianBen). This was a very nice idea, and
makes for much smaller test archive (Siril is also GPLv3 so licensing is
ok for the reuse, also anyway it's just a small independent build
script).
Moreover having it as a separate job allows to have artifacts with only
the finale distribution (artifacts on the build job also have the build
directory and the whole prefix, which we want to keep in order to debug
when needed).

Hopefully I am not missing anything. Siril seems to package more, like
various gdk-pixbuf-*.exe, gspawn-*.exe and gdbus.exe. I am wondering if
these are actually necessary. I could run GIMP fine without these in
quick tests, but I guess I'll have to investigate a bit more to figure
this out. That's what nightly builds are for, after all, so hopefully
people will report if we miss some runtime dependencies.
2020-10-02 03:17:47 +02:00
Michael Schumacher 3801c79372 gitlab-ci: update dependencies to add libraw20 2020-08-31 00:21:31 +02:00
Jehan 96073ae1b0 gitlab-ci: add a distribution step.
I don't add this at the end of the distcheck job to make the interface
clearer, and also because the distcheck job will have full build
artifacts (allowing to debug a failing distcheck if necessary), whereas
the `sources` job will just publish tarballs and SHA256 sums generated
from these tarballs. Simple, clean.
2020-08-07 17:30:36 +02:00
Jehan 63dddb5eb7 gitlab-ci: run distcheck with multi-jobs. 2020-08-07 16:01:45 +02:00
Jehan bd6abe0654 gitlab-ci: rename the CI jobs.
The Linux CI job names are too long and are not recognizable on the web
GUI unless you hover the widgets with the mouse to read tooltips. Remove
the "/testing" part (if people want to know exactly which Debian we use
for our builds, they can always look at the script) and move left the
differenciating parts (i.e. autotools/meson/clang/distcheck) so that
these are visible in a glance, even when ellipsing long job names.
2020-08-06 13:24:52 +02:00
Jehan 596bf1dbc3 gitlab-ci: add a distcheck step on master too.
Similar to the distcheck step only contributed by schumaml on gimp-2-10.
2020-08-03 02:38:53 +02:00
Michael Schumacher fdca56c94a CI: use custom docker images for dependencies and GIMP builds 2020-05-29 22:41:22 +00:00
Niels De Graef 30ad5cad68 ci: Remove some unused deps 2020-05-29 21:25:04 +00:00
Jehan e1aebbac3b app: CI cache now configured in GNOME gitlab.
Let's reimplement some caching of packages for Debian apt and crossroad.
Hopefully it should speed up subsequent builds.
2020-05-28 22:30:34 +02:00
Niels De Graef acf50009f8 Allow building vala plugins 2020-05-26 17:52:52 +00:00
Michael Schumacher 30be314465 .gitlab-ci.yml: expire all dependencies in 2 hours, and all builds in 1 day 2020-05-09 13:19:18 +02:00
Jehan 6cf9badefd gitlab-ci: cppcheck does not need to wait for previous stages to occur. 2020-05-05 16:21:43 +02:00
Jehan 2baf8a3be1 gitlab-ci: babl requires now vapigen for Vala binding. 2020-05-05 16:18:54 +02:00
Michael Schumacher f428667fff .gitlab-ci.yml: set artifact expiry time for Linux builds to 2 days 2020-05-04 18:57:44 +02:00
Michael Schumacher f6c7bb997d .gitlab-ci.yml: change artifact expiry to 2 hours for dependencies and 1 day for MS Windows builds 2020-05-03 18:29:43 +02:00
Jehan 43b538bf1b gitlab-ci: ignore a bunch of directories.
Problem with the CI is that the source is straight in our base directory
and therefore installed dependency files as well as cache or built files
are in subfolders.
Let's try to ignore as much as I can see. This should avoid a bunch of
warning and errors during report generation.
2020-04-29 13:16:38 +00:00
Jehan 5ecc36891b gitlab-ci: add an analysis stage with cppcheck code analysis stage.
As contributed by Rafał @qarmin in a Gitlab comment. See #5002.
2020-04-28 19:32:25 +02:00
Jehan a1fc6144da gitlab-ci: fix Windows CI builds.
Seems that msys2 packages can sometimes be compressed as `.tar.zst`
instead of `.tar.xz`. I updated crossroad to handle this case. It now
requires the additional pypi `zstandard` package.
2020-04-27 15:12:18 +02:00
Jehan 3a43e05936 gitlab-ci: porting the Windows cross-build CI to a Debian image.
As all other builds, let's use Debian/testing.
2020-04-18 14:13:32 +02:00
Jehan e1a11504cd gitlab-ci: remove useless build dependencies. 2020-04-17 01:40:15 +02:00
Jehan 8398c83c23 build: use msys2 packages as source for the Windows CI.
This is a new feature I implemented in the crossroad cross-compilation
tool. Msys2 repository has more packages and they are more up-to-date
compared to Fedora and Suse cross-built packages (the 2 other available
sources for pre-built Windows packages).
This allows to simplify a lot the dependency preparation for the Windows
CI, and speed things up.
2020-04-17 01:39:58 +02:00
Jehan 60854c8668 gitlab-ci: libspiro is needed to run `gegl`.
`gegl` binary is being run for icon generations on gimp-2-10.

(cherry picked from commit 97549081fd)

Note: this commit is so far not needed on master as we don't call gegl
during build time unlike in gimp-2-10. But we could at some point.
Better to be thorough.
2020-04-13 14:55:10 +02:00
Jehan 92fd5675b1 gitlab-ci: enabling make check on master CI.
Also install missing xauth (required by xvfb-run).
`make check` was broken on CI, but got fixed by commits 707d3c6f64,
f6e9c6ee6f, 2c1efdedf0 and of course the present one.
2020-03-19 17:44:24 +01:00
Jehan f6e9c6ee6f gitlab-ci: add missing dependencies.
Dependencies must be reinstalled on different jobs, even when related.
Fixes these CI errors on unit testing:

> GEGL-Message: 22:30:35.867: Module '/builds/GNOME/gimp/_install/lib/x86_64-linux-gnu/gegl-0.4/matting-levin.so' load error: libumfpack.so.5: cannot open shared object file: No such file or directory
> GEGL-MESSAGE: Module '/builds/GNOME/gimp/_install/lib/x86_64-linux-gnu/gegl-0.4/raw-load.so' load error: libraw.so.19: cannot open shared object file: No such file or directory

(cherry picked from commit a90d547cc0)
2020-03-19 11:07:18 +01:00
Jehan 505967c4d2 gitlab-ci: fix recently broken CLang compilation.
Fixes:
> /usr/bin/ld: cannot find -lomp
2020-03-15 22:43:17 +01:00
Jehan 39f7dd269d gitlab-ci: run unit tests for meson builds.
Not because they are working better than the ones in autotools, but
rather because it seems they are simply barely implemented! So of
course, the few tests currently there work.
2020-01-04 00:55:37 +01:00
Jehan 109ad86db2 gitlab-ci: test a CLang build. 2020-01-03 13:16:21 +01:00
Jehan df492fa898 gitlab-ci: port our main CI to Debian testing.
The old custom ArchLinux got broken (apparently by some package
signature verification which fails, and obviously we don't want to
bypass these for security reasons).

I took the opportunity to port to Debian testing because this is GIMP's
base distribution for support (basically dependency versions must be in
Debian testing) so it makes sense that our CI is based off it as well.

Note though that I am not against additional CI tests so if someone
absolutely wants to get the Archlinux-based CI back and thinks it gets
us some additional worthy test, feel free to fix whatever was broken
then we may add it back (having both Debian testing and Archlinux CI).
2020-01-02 02:46:21 +01:00
Jehan 39e6670c7c gitlab-ci: job renaming. 2019-11-26 20:31:39 +01:00
Jehan c8ec0ae7fa gitlab-ci: add a Windows 32-bit CI.
Some issues may happen only for 32-bit builds. So it may be worth make a
Windows 32-bit build too.
Issue #2794 triggered this reasonning, though in this issue's case,
simply the build would not have discovered the bug since it was only a
build warning + run-time bug. Still long-term if we manage to get a
no-warning build, it could become relevant to discover more errors at
build time. So preparing the ground work here.
2019-11-26 20:31:39 +01:00
Jehan a76012991b gitlab-ci: do not wait for all jobs from "dependencies" stage.
The GNU/Linux builds should start as soon as the Linux dependencies are
built. There is no need to wait for the Windows dependencies (and
reciprocally of course).
This should make for much faster CI total duration (with current
configuration).

Note: this "needs" keyword is quite a recent feature since gitlab 12.2,
3 months ago: https://docs.gitlab.com/ee/ci/yaml/#needs
2019-11-24 21:19:03 +01:00
Jehan d48dcc1252 gitlab-ci: move to Fedora 31 image for the Win32 CI build. 2019-11-24 20:52:22 +01:00
Jehan dbd1bb1f90 gitlab-ci: no need to specify explicitly -Dbuildtype=debugoptimized.
This has now been changed to be the default meson build by Ell in the
previous commit.
2019-10-26 13:00:46 +02:00
Jehan 010a4fe058 gitlab-ci: move the prefix to root for simpler paths in artefacts. 2019-10-24 22:14:41 +00:00
Jehan 7fdd78c6ea gitlab-ci, build: add a wrapper for GIMP binary to Win32 CI result.
A few commands need to be performed the first time for glib to work
properly, and gdk-pixbuf loaders to be found. I add them in a wrapper
script so that it's easy to ask people to test the dev builds (even
though it's not necessary to run these commands each time, but who
cares!).
2019-10-24 22:14:41 +00:00
Jehan 2baeb87b3a gitlab-ci: use debugoptimized built type for the Win32 CI build. 2019-10-24 17:04:15 +00:00
Jehan 126a2352cd gitlab-ci: (Win32) add install prefix to artifacts.
This would allow us to propose people to test CI builds.
2019-10-24 14:18:06 +00:00
Jehan 90591dc7ed gitlab-ci: new build organization.
Rather than having the whole Win32 cross-build into the 'gimp' stage,
break the dependencies and GIMP-only builds in 2 stages.

Since apparently we need to keep the same structure for the native and
cross build (otherwise we don't get parallel builds; in other words, I
didn't find the possibility to set separate pipelines up), I move babl
and GEGL into the same 'dependencies' stage.

Finally I remove the -base rules extended into actual jobs, except for
`.gimp-base` (this is the only which makes sense as it is actually
common to the meson and autotools build).
2019-10-03 20:43:20 +00:00
Jehan aa611bea84 gitlab-ci: set GIT_DEPTH to 1.
We don't need to pull 5 commits of history. Only the HEAD of the
selected branch is needed.
Also define it globally rather than re-defining it in every job to the
same value.
2019-10-03 20:43:20 +00:00
Jehan 5c7f1ce571 gitlab-ci: improve artifacts settings.
First replace the "when: on_failure" rule by a "when: always". We indeed
always want to get log artifact so that we can study a build if
necessary (neither only on failure nor on success; really on all cases,
since even an apparently successful build may have issues we might want
to diagnose).

Also expire all artifacts at 1 week (it seems the default on GNOME's
Gitlab is 4 weeks; we don't need to keep these so long. Even a few days
might be enough actually).

As for the artifacts contents, keep the build dirs rather than the
install dirs. Build dirs allow to check configuration logs and other
kind of logs which are the most useful when diagnosing a failed build.
Now install dirs are also interesting. Maybe we should provide them
again at some point. We'll see. For now I comment them out.
Still keep the install dir for dependencies though, since it seems this
is how data are passed from one job to another.
Note that ideally we would like to provide different artifacts depending
on failure or success but apparently this is currently not possible.
See: https://gitlab.com/gitlab-org/gitlab/issues/18744

Also not sure why for GIMP, the CI was only keeping the build app/tests/
directory. We should really keep the whole dir.
2019-10-03 20:43:20 +00:00
Jehan d27b7a27e0 gitlab-ci: do not export SHELL env variable before crossroad.
This will simply default to bash.
2019-10-03 20:43:20 +00:00
Jehan 2963933695 gitlab-ci: fix crossroad and dnf caching.
This should hopefully speed up successive builds as most packages don't
need to be re-downloaded.
2019-10-03 20:43:20 +00:00
Jehan 203509fe46 gitlab-ci: run gdk-pixbuf-query-loaders.
It was not necessary when I was only running the cross-build job. Not
sure why it is needed now. What do the parallel jobs share exactly in
this CI system? Anyway…
2019-09-30 23:05:01 +02:00
Jehan e17efb7a07 build, gitlab-ci: add a script to cross-build GIMP with Gitlab CI.
It looks like Arch does not have mingw64 cross-compilers in core package
repository. It does have some package in the user repository (AUR), but
I assume that such a repository cannot be deemed as safe.

Anyway I still tried, but apparently these AUR packages have to be built
and when I tried, I got this error:
>  ERROR: Running makepkg as root is not allowed as it can cause
> permanent, catastrophic damage to your system.

Anyway it's all a big mess. Then I tried to move the cross-CI to Debian
testing, which is anyway our base compatibility system. Unfortunately I
encountered like what looked like some glibc++ macro problem on some
packages (most likely because the pre-built packages I use are Fedora
ones which likely uses a cross-compiler differently built from the
Debian one).

So in the end, for simplicity, I use a Fedora image, then I am sure to
get a good match between the system cross-compiler and the pre-built
dependencies.
2019-09-30 23:05:01 +02:00
Jehan 035802c5a6 gitlab-ci: our CI base system (Arch) fixed their libmypaint package.
See: https://bugs.archlinux.org/task/62468
2019-09-11 17:23:40 +02:00
Félix Piédallu 1f20b72a45 Fix gitlab-ci : Archlinux fixed the bug upstream. 2019-09-11 17:11:38 +02:00
Félix Piédallu a97bad1cbe Update gitlab-ci 2019-09-11 16:42:04 +02:00
Jehan b194ce1e07 Issue #3840: Arch added a mypaint-brushes1 package.
This is the base system for our CI, and the former mypaint-brushes
package got bumped to v2, which broke the build. Instead of rolling
back, they added a mypaint-brushes1 package. Let's rely on it instead of
installing it ourselves now.
2019-08-24 19:20:56 +00:00
Jehan 3b5bc9f0b7 gitlab-ci: don't use mypaint-brushes from Archlinux.
If I get it correctly, archlinux bumped the mypaint-brushes package to
v2, which broke our CI. The v1 and v2 brushes are not the same, and they
are not even compatible (GIMP only supports v1 brushes so far). These
should be different packages, hence the incremented major versionning.
For the archlinux change, see also:
https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/mypaint-brushes&id=dfd032b3aab40a46c751bd47713fb82bf11bd984

Let's just install the brushes ourselves from the correct branch.

With this kind of changes, as well as the weird patches they do when
they rename the pkg-config file of libmypaint, I think we should
consider not rely on this distribution for our CI.
2019-08-22 17:22:38 +02:00
Félix Piédallu 699b3c5c02 refactoring of the gitlab-ci.yml 2019-08-21 14:18:49 +02:00
Michael Schumacher d6b33f9951 build: .gitlab-ci.yml: GEGL is switching to meson exclusively 2019-08-16 19:30:57 +00:00
Jehan 4900dde0dc gitlab-ci: build with --with-lua=force.
Same as with JS and Python, Lua dependencies are not a build blocker.
It's mostly a packager warning.
2019-08-16 20:33:09 +02:00
Jehan ba5a583a5d gitlab-ci: configure with --with-javascript=force.
We don't actually need the GJS dependency at build-time. This is really
more of a packager warning.
2019-08-09 19:01:34 +02:00
Jehan 96a33277d4 gitlab-ci: configure GIMP with --with-python=force.
We don't actually need any of the Python dependencies at runtime. We
only check for these to make packagers aware of the runtime need. Force
the build to go forward even with these deps.
2019-08-09 17:08:53 +02:00
Øyvind Kolås baf3bfee49 gitlab-ci: add gobject-introspection dep for babl and gegl 2019-08-08 14:15:36 +02:00
Michael Schumacher a001ce29a5 build: .gitlab-ci.yml: change babl build to meson 2019-07-30 19:08:16 +02:00
Michael Schumacher 732852a471 build: adding a .gitlab-ci.yml file for automated GitLab pipeline builds 2019-07-29 01:11:44 +02:00