Commit Graph

257 Commits

Author SHA1 Message Date
Jehan 342e9b10f6 gitlab-ci: crossroad repository was moved.
Crossroad repo was finally moved to Freedesktop.
See: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/477

This should avoid the too many failures we have lately on TuxFamily
infrastructure (and also gives a proper bug tracker for Crossroad). I am very
thankful to TuxFamily for all these years! :-)
Let's not be said that I moved the repo because I don't like this friendly FLOSS
host anymore. I just needed something different for Crossroad project now.
2023-08-07 15:14:27 +02:00
Jehan 94344bdb46 gitlab-ci: fix the schedule pipeline for our nightly Windows installer.
This should fix:

> 'win-installer-nightly' job needs 'gimp-meson-debian' job, but 'gimp-meson-debian' is not in any previous stage
2023-08-07 14:32:00 +02:00
Jacob Boerema b5be3376a9 ci: remove aalib artifact path
We don't build aalib ourselves anymore since it's now provided by MSYS2,
so this build artifact is obsolete. Let's remove it.
2023-07-31 13:58:26 -04:00
Jehan e1203e9f76 gitlab-ci, build: create Windows installer files with the Linux build.
The creation of the BMP welcome images for the Windows installer (part of
-Dwindows-installer=true build option) fails in the Windows job. After much
debugging, I could run GIMP, yet it was not enough. One of my hypothesis so far
is that the environment variables for DLLs won't work, since all the DLLs must
be in the same directory as the main binary (though with the WSL thing, I am
unsure, maybe it is still supposed to work), which only happens once GIMP is
installed. So GIMP runs successfully but not plug-ins.

Anyway I wasted too much time working on this and without a local Windows, it
just takes too long (mostly testing thanks to the CI) and is frustrating. Let's
just move to building both the localization files and the images on the main
Debian job (gimp-meson-debian), then use these as dependencies of the
win-installer-nightly job, i.e. when building the installer.
2023-06-29 00:21:44 +02:00
Jehan 2fd25fe6bd build: generate the Windows installer welcome images from the splash screen.
After discussion with Jernej, InnoSetup should now work better with rescaling
a big image properly to the window size, yet the ratio should still matter.
Apparently the welcome image is a hack and this is why it requires specific
ratio images. We don't use the big size yet, but since Jernej told me which
dimensions are expected, I already added the code for it to make it easier
later.

So anyway this code would allow us not to have to commit welcome images each
time, which are basically resized copy in BMP of the splash screen, slowly yet
surely filling up our repository with image duplicates.
After all, we develop a scriptable image editor! We should use it to edit images
and export in expected formats!

I only use this script for the devel installer for now, for testing and see how
it goes.
2023-06-27 00:39:17 +02:00
Jehan 01e56545bc devel-docs, gitlab-ci: freeze our requirement updates to Debian 12 bookworm.
While Debian testing is the sensible choice for dependency requirements while we
are in full-dev mode, now we are getting closer to 3.0 release, and Debian 12
"bookworm" barely got out.
If we continue to develop at current pace, GIMP 3.0 should be released before
the next stable Debian, so we should not use dependencies unavailable on the
latest stable (otherwise GIMP 3.0 won't be distributable soon enough on Debian,
nor on Debian derivatives such as Ubuntu, Mint, etc.).

This is why we are now basing GIMP dependency requirement on Debian bookworm.
We'll likely get back to the next "testing" after GIMP 3.0 release.
2023-06-11 00:52:13 +02:00
Jehan 7f70aa0c61 gitlab-ci: one more missing artifact to fix dev-docs job. 2023-06-07 10:24:22 +02:00
Jehan bf96451569 gitlab-ci: add more artifacts to gimp-meson-debian job.
This should hopefully fix the CI jobs "dev-docs" and "source-meson".
2023-06-07 00:43:26 +02:00
Jehan 503324d348 gitlab-ci: switch to meson logs for CI artifacts.
config.log is an autotools artifact.
2023-06-06 20:45:09 +02:00
Jehan f746bfbaf2 gitlab-ci: one-line per installed package for dependency maintenance.
This commit makes no real changes but style.
As discussed, this makes it much easier to compare commit diffs, rather
than an overlong line where you have to search which package may have
been added/removed/changed.
2023-06-06 11:27:05 +02:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Niels De Graef 305b27884d ci: Add gobject-introspection to win64 image 2023-05-24 23:19:20 +02:00
Niels De Graef 2b4bf29553 gitlab-ci: Use JUnit reports from Meson
Meson has been generating Junit XML files of its test results since
0.55, so we can use that to show the test results in the GitLab UI.
2023-05-24 00:38:00 +02:00
Alx Sa d4f420769c plug-ins: Port FITS plug-in to cfitsio library
Switch to NASA-maintained cfitsio library for loading/exporting FITS images.
This allows us to import compressed FITS files (GZIP, HCOMP, PLIO, RICE) in
8/16/32 bit and float/double precision. It also simplifies export code using
the built-in cfitsio APIs.
2023-05-14 15:05:50 +00:00
Jehan fa85eb6565 gitlab-ci: fix the CI.
The flatpak_ci_initiative.yml template we include got changed 2 days ago,
replacing the "only" by a "rules", which broke our CI file.

Cf. commit 193f63c20f87d38868c05beee6446b387b73e140 in repository citemplates.

The present commit should (hopefully) fix this error:

> Unable to create pipeline
>   jobs:flatpak-nightly config key may not be used with `rules`: only

(even though the error is a bit cryptic, the problem is apparently that both
rules: and only: keys cannot be used together)
2023-05-13 22:15:20 +02:00
Michael Schumacher 61943ca11b gitlab-ci: Use tee to get flatpak job output on stdout and into a log file. 2023-03-22 18:58:44 +00:00
Michael Schumacher d7216f5e49 gitlab-ci: Add xvfb to win32 and win64 image, because we now attempt to run wine there. 2023-03-11 19:48:47 +01:00
Michael Schumacher c689c41841 gitlab-ci: Install dependencies for ASCII art and PostScript plug-ins. 2023-02-25 11:09:22 +01:00
Michael Schumacher 39f4029bfc gitlab-ci: python3-zstandard is a Debian package. pip3 requires a venv to install packages now. 2023-02-25 10:47:50 +01:00
Michael Schumacher 1f3a2475fc gitlab-ci: gi-docgen is a Debian package, installing it through pip3 seems to fail on some runners 2023-02-25 10:37:55 +01:00
Jehan 4699d9e2ac build, gitlab-ci: using non-ambiguous `meson setup` syntax.
Fixes:

> WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2023-01-24 15:35:30 +01:00
Daniel Novomeský 3533606a13 gitlab-ci: fix win64-nightly
ca-certificates are no longer present in gimp-prefix/ssl
but in gimp-prefix/etc/ssl
2023-01-20 14:39:13 +01:00
Jehan 6378f3af8d gitlab-ci: using the 'posix_local' installation scheme for Python.
Python 3.10 introduced sysconfig.get_default_scheme() and somehow Debian decided
it was a good idea to move from the 'posix_prefix' to the 'posix_local' scheme.
See: https://lists.debian.org/debian-python/2022/03/msg00039.html

The main issue with this scheme is that it adds a local/ subdirectory to the set
--prefix. As a consequence, with --prefix=~/.local/, scripts are installed in
~/.local/local/bin/ (instead of proper ~/.local/bin/), data are now in
~/.local/local/share/ and so on.
As expected, this broke a lot of CIs for a lot of projects, as well as a lot of
custom scripts, usage of Python in virtualenv (this later case seems like it is
fixed by special-casing it in Python 3.11), flatpak, etc.

Setting DEB_PYTHON_INSTALL_LAYOUT environment variable to "deb" solves this by
changing the default scheme.

This URL is also useful to understand the issue:
https://askubuntu.com/questions/1406304/virtualenv-installs-envs-into-local-bin-instead-of-bin

As a side note, Debian is not the only one which made the mistake. Fedora also
did the same thing (and they have also their own different environment variable
to handle this): https://bugzilla.redhat.com/show_bug.cgi?id=2026979
2023-01-06 18:47:52 +01:00
Jehan 5d30089d71 gitlab-ci: fix the CI build.
In the last few days, our deps-win64 job started to fail with:
> $ update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
> update-alternatives: error: no alternatives for x86_64-w64-mingw32-g++

The reason lies in this change in Debian testing 10 days ago:

----
gcc-mingw-w64 (25) unstable; urgency=medium

  * Upgrade to GCC 12. Closes: #1023679. It is no longer possible to tweak
    the installation directory for different thread models, so the -posix
    and -win32 packages are no longer co-installable.
  * Drop “Built-Using” from “Architecture: all” packages.
  * Since the POSIX and Win32 packages are no longer co-installable,
    drop support for alternatives and use symlinks to provide the full
    set of command names.
  * Standards-Version 4.6.1, no change required.

 -- Stephen Kitt <skitt@debian.org>  Mon, 12 Dec 2022 09:00:34 +0100
----

So from now on, we'll only install the posix variant of the cross-compiler.
Hopefully it will work for all packages we build.
2022-12-23 18:28:36 +01:00
Jehan 6e2177bcd2 gitlab-ci: no contents in libexec/ on Windows.
Whatever is here on other platforms is in bin/ on Windows.
2022-10-27 16:23:56 +00:00
Jehan afbb5494fa gitlab-ci: add --output-dll-list option to dll_link.py calls.
I added this option in commit 38d6783299. It makes the script stateful, able to
remember all previously processed DLL, hence making the whole job much faster
and efficient.
2022-10-27 16:23:56 +00:00
Jehan 0b709a99d5 Revert "gitlab-ci: removing win*-nightly jobs."
This reverts commit c11dc69137.
2022-10-27 16:23:56 +00:00
Daniel Novomeský d11e175612 Add libheif-dev and libjxl-dev to Debian container 2022-10-05 16:44:47 +02:00
Jehan cfeedb8736 data, devel-docs, gitlab-ci: improve the docs tarball.
- Use a relative path for GIMP_LOGO_PATH inside the gi-docgen generated
  HTML, and not an absolute path taken from build dir (otherwise this
  would break, for installed docs, but also for the tarball and the
  developer website!).
- Also use either gimp-logo.png or gimp-devel-logo.png depending on
  whether we are on a stable or unstable branch.
- Install these in images/ inside the GIMP docs folder, which
  corresponds to the relative path given to GIMP_LOGO_PATH.
- The installed root dir will be $datadir/doc/gimp-2.99/, e.g.
  /usr/share/doc/gimp-2.99/
- Inside this folder, the library references will be in libgimp-3.0/ and
  libgimpui-3.0/ (instead of weird Gimp-3.0/ and GimpUi-3.0/). Note that
  the root dir uses the application version (2.99) whereas the library
  folder use the API versions. These are different in development phase.
- Archive the gi-docgen installed files, not taken from the build dir,
  to avoid packaging temp files, such as the .toml files. Note that
  `g-ir-docs` files are still taken from the build dir, as we don't
  install them yet.
- Finally package all this in a directory before archiving in a tar.xz,
  named the same as the directory (e.g. gimp-api-docs-2.99.13/ inside
  gimp-api-docs-2.99.13.tar.xz).
2022-09-09 20:32:27 +02:00
Jehan faff5d00b5 gitlab-ci: generate tarball for GIMP documentation. 2022-09-09 16:54:28 +02:00
Jehan 0cc2dedeb3 gitlab-ci: try to fix the CI for releases (and other CI pipelines). 2022-08-20 11:17:44 +02:00
Jehan af6218fb53 gitlab-ci: rename autotools/meson tarballs.
If we want to encourage packagers to test the meson tarball (better to
do this now with development releases than later on stable releases!),
we should name it prominently. Therefore I will rename the autotools
tarball as gimp-*-autotools.tar.bz2 whereas the meson tarball will be
named gimp-*.tar.xz.

Also renaming `sources` CI job to `sources-autotools`.
2022-08-08 18:15:33 +02:00
Jehan 8d489b2ef3 gitlab-ci: make gimp-meson-debian more robust to source updates.
The `ninja dist` step fails with:

> ERROR: Repository has uncommitted changes that will not be included in the dist tarball
> Use --allow-dirty to ignore the warning and proceed anyway
> FAILED: meson-dist
> /usr/bin/meson dist

Astonishingly if I run a `git diff` (or git status) in the CI, I saw no
changes and the dist suddenly succeeded. When I remove it, it fails
again. And of course, locally it's alright. No way to diagnose!

Anyway it's not a bad idea to leave some diagnostic logs in the CI so
here we go, properly outputting the diff and exiting the job with an
error when there is a diff. Because anyway, there should be none. It
would mean that there is likely some issue in versionned generated
files.
2022-08-02 00:02:44 +02:00
Jehan e6ce33e2d1 gitlab-ci: distribute the meson-generated tarball as well.
Maybe let's try to distribute the meson tarball next to the autotools
tarball for our next dev release, and announce that packagers are
invited to test the meson build from tarball and report back.
2022-08-01 23:34:50 +02:00
Jehan c11dc69137 gitlab-ci: removing win*-nightly jobs.
These were originally to distribute cross-built binaries. Nowadays, we
just use the native-made installer, which is also closer to what people
will really get for release versions.
So let's just remove these. I keep the crossroad builds as these are
still useful to detect Windows build bugs quickly, but we don't need
these distribution steps.

This also takes care of failures in the job, but since it's mostly a
useless job nowadays, rather than wasting my time investigating this, I
simplify the CI.
2022-07-28 15:55:19 +02:00
Bartłomiej Piotrowski 7c7008a9c6 Update (or drop) the Docker image used by Flatpak job
The gnome-runtime-images have been recently migrated to Quay. This is already reflected in the template.

Please note this MR has been created semi-automatically. If it doesn't make sense, feel free to close it.
2022-07-27 12:06:56 +00:00
Niels De Graef f663d26ab5 Migrate from intltool to gettext
intltool has long been dead upstream. Let's not poke the dead corpse,
please.

This commit is quite large, but that's mostly since trying to support a
hybrid of both gettext and intltool with both Meson and Autotools was
really hard, so I stopped trying.

Due to gettext relying on quite some things being at the exactly right
place in the autotools build (like `ABOUT-NLS` and `config.rpath`) we
really needed to cleanup the `autogen.sh` to only call `aclocal` and
`autoreconf`. No more strange magic; I tried to do it without changing
too much in the file, and things just broke. If people want to do
something more custom, they can just change the script directly. This
change also uncovered some problems in our `configure.ac`, like using
deprecated macros.

The following major changes happened:

* meson: Changed `custom_target()` to `i18n.merge_file()` for all
  supported file types
* Added `.its` and `.loc`  files for the GIMP-specific XML formats, so
  that gettext understands them
* For the `.isl` (Window installer stuff) file, there's no easy way to
  do this in gettext, so instead we start from an XML file (again with
  its own ITS rules etc), translate that with gettext, and then use
  `xsltproc` with a bit of magic to output the .isl file for each
  language
* the `po*/Makefile.in.in` files are migrated to `Makevars` files,
  which gettext natively understands.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8028
2022-06-25 10:25:49 +02:00
Daniel Novomeský 0897ce91c4 win64-nightly: exclude files used by older GIMP only 2022-06-10 14:59:46 +02:00
Jehan 0e5ce8b217 .gitlab-ci: add appstream package to the CI Debian testing image.
This should make the AppStream file testing work on the CI.
2022-05-03 21:57:02 +02:00
Bartłomiej Piotrowski a86040b176 gitlab-ci: Set container explicitly to docker
Since the latest release of Kaniko, it fails to detect the container
runtime it runs within.
2022-04-01 14:43:33 +02:00
Jehan c302d2d52a gitlab-ci: new job for dev docs.
Instead of building it on the meson, build it on the autotools build.
Also generate a new distribution job specifically for this.
2022-03-27 16:20:20 +02:00
Jehan 3d983728b0 gitlab-ci: build the specific Python and gjs doc with g-ir-doc. 2022-03-27 15:00:08 +02:00
Jehan f465209f03 gitlab-ci: build and test `meson dist`. 2022-03-19 14:26:57 +01:00
Jehan 38d6783299 .gitlab-ci, build: avoid same DLL dependencies from previous runs.
We were already avoiding re-processing a same DLL within the same run
(this can happen when 2 dependencies have themselves a common
dependency). But the dll_link.py script was stateless regarding previous
runs so we might be checking again the same DLLs multiple times (even
though we were not copying them again).

Let's make the script stateful with a new parameter to give a file where
all the previously processed DLL names are stored. I am hoping it would
improve the efficiency of the packaging-win32-native which is suddenly
extra slow (it always times out, even after raising the max job time;
now we time out after 2h30! The 64-bit packaging job just takes 1h,
which is too much already, but still much more reasonable).
2022-02-21 13:36:57 +01:00
Jehan 960a239366 gitlab-ci: install native librsvg in a cross-build environment.
Needed to construct the icons.
2022-01-31 23:06:34 +01:00
Jehan f3702a7ec9 gitlab-ci: add a new GIMP_CI_RASTER_ICONS to test raster icon build.
Since this is probably much less tested than the default vector icon
case, any bug there might go unseen for some time. So let's add a new
pipeline to check this. I make so this pipeline is not actually run on
every commit (i.e. manually only), then I'll just add a scheduled
pipeline to check the non-vector icon case at regular intervals.

This pipeline also test the icon-list.mk files are not outdated.
2022-01-27 17:06:56 +01:00
Asa 9385a6405a .gitlab-ci.yml: add clang-format rules and pipeline
Fixes #950

`.gitlab/search-common-ancestor.sh`'s original authors are
Philip Withnall and Frederic Martinsons.
(Jehan/reviewer's note: script further improved by Asalle)
2022-01-19 20:44:45 +00:00
Daniel Novomeský 68ad641583 crossroad gimp-win64 build: update gi-docgen feature setting 2021-12-29 12:55:09 +01:00
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +01:00
Stanislav Grinkov dd02503cf8
gitlab-ci: Remove extra ninja call in crossroads Win builds
This workaround was placed to mitigate race condition.
It was useful for the time being, but not anymore.
Better solution will be introduced in following commit.

Reverting changes introduced in 9c6776fb.
2021-09-30 01:07:31 +06:00
Daniel Novomesky 0236308d69 Build libjxl in crossroad Win64 CI 2021-09-29 09:43:39 +02:00
Jehan fb7a9954b4 gitlab-ci: do not make the flatpak job interruptible.
Commit-triggered pipelines on `master` branch are apparently canceling
flatpak pipelines even though the flatpak jobs are not even in the
triggered ones.
In any case, these flatpak pipelines are not triggered often (only
through weekly schedule or manually triggered) so there is no need to
have such a flag.

See: https://gitlab.com/gitlab-org/gitlab/-/issues/340147
2021-09-05 20:06:51 +02:00
Jehan 44f72c5d77 gitlab-ci: flatpak artifacts must always be uploaded.
artifacts:when is set to on_success by default. Yet we clearly need the
build logs in failure case too in order to debug.

See: https://docs.gitlab.com/ee/ci/yaml/#artifactswhen
2021-09-05 17:03:34 +02:00
Jehan 34748af7a7 gitlab-ci, build: compute the checksums of installer in bash script.
I completely forgot that since the installer is built on a Windows
runner, I cannot expect a standard Linux shell syntax.
As a consequence, commit de9a171a19 broke the "win-installer-nightly"
job with the following error:

> The token '&&' is not a valid statement separator in this version.

Rather than trying to find the equivalent command to run on powershell
or whatever, let's just compute the checksum at the end of our installer
creation script.
2021-08-01 17:11:58 +02:00
Jehan de9a171a19 gitlab-ci: generate SHA* checksums for generated Windows installers. 2021-07-27 13:12:45 +02:00
Jehan b824abc113 gitlab-ci: do not run `meson test` anymore inside the flatpak job.
Somehow the test part of the flatpak job stopped working. The last
instance which worked was 3 weeks ago, but after a lot of debugging I
realized that it is not because of any code change on our side. The
exact same commit which worked 3 weeks ago won't anymore!

The standalone bundle is actually built and works fine when tested
independently. What fails is the `meson test` inside the flatpak
environment. Somehow when GIMP is rebuilt inside the test flatpak
environment, it doesn't build the plug-ins yet one of our tests
(save-and-export) requires plug-ins to open some file formats. Note that
I double-checked, the plug-ins were well built and loading any format
works fine in the standalone flatpak, just not in this specific step.

I am completely unsure what broke, yet it is apparently outside GIMP
code. So for now, I just copy-paste the whole flatpak job which we were
including from another repository and remove the `meson test` part.
2021-07-26 01:25:43 +02:00
Jehan 97ae281162 Revert "gitlab-ci: install GIMP before running `make check`."
This reverts commit fe329adcf5.
`make check` is meant to be working even without `make install`. Also
this didn't fix anything anyway.
2021-07-06 18:51:16 +02:00
Jehan fe329adcf5 gitlab-ci: install GIMP before running `make check`.
Since GIMP looks for its icons at runtime and would output warnings if
it doesn't find them, it's better to install first. Not really sure it's
ideal though, but it will do for now. Maybe I should just g_printerr()
instead of g_warning().
2021-07-06 15:54:37 +02:00
Jehan 9572cb43bd gitlab-ci: keep the Windows native builds' config.log.
This helps debugging the builds when needed.
2021-06-28 14:48:16 +02:00
Jehan 0e4263d800 build, gitlab-ci: generated files should be in the build dir.
Also update the CI script to copy the generated language files before
creating the installer so that the gimp3264.iss script finds them.
2021-06-18 20:40:04 +02:00
Jehan 16fd4ae7f4 gitlab-ci: make sure the normal commit jobs are also run on MR.
In particular the autotools, meson Linux jobs and the Win64 crossroad
job.
2021-05-28 17:27:50 +02:00
Jehan 20fa78dcfb gitlab-ci: add support for flatpak and Windows installer jobs in MR…
… based on set labels.

If the label "5. Windows Installer" is set, the MR pipeline should
trigger the Windows installer pipeline as well.

If the label "5. Flatpak package" is set, it should generate the flatpak
(not publish it obviously, yet it can be downloaded and installed
manually).

This will allow us to easily test MRs and allow people to test our code
before we merge it to the main branches.
2021-05-28 13:35:40 +02:00
Jehan 85dd69dc88 gitlab-ci: expire the Windows installer artifact after a week.
Currently we run the job on a weekly schedule. If we keep a retention
period of 2 days, it means that people will not have access to a nightly
Windows installer 5 days out of 7, which is not useful.

Gitlab has a retention policy not to delete artifacts for last jobs, but
it apparently actually bases this check on being the last pipeline, not
being actually the last job of a given name. Since we have pipelines
running all the time, this retention policy just won't apply to our
installer job which will get deleted.
Cf. https://gitlab.com/gitlab-org/gitlab/-/issues/332142
2021-05-28 13:11:04 +02:00
Jehan eeb7b6315a gitlab-ci: store flatpak-build output into a log file.
Without this, the flatpak build is just too long and Gitlab CI just
stops logging it. So we end up with a log saying the quite useless (at
the end):

> Job's log exceeded limit of 16777216 bytes.
> Job execution will continue but no more output will be collected.

We don't even reach babl/GEGL/GIMP builds, which are the most important.
With this little trick, I am redirecting output to a log file and simply
including said log into the artifacts, hence allowing to debug the full
build.
2021-05-26 22:31:54 +02:00
Jehan f2c73f2840 gitlab-ci: fix (again!) the gitlab-ci.
Argh! So it turns out that .publish_nightly template uses already an
only: key so we cannot use rules: (on the other hand I guess using only:
ourselves is alright and concatenate ours and the one in the template).

Fixes:
> jobs:flatpak-nightly config key may not be used with `rules`: only
2021-05-26 20:03:19 +02:00
Jehan e6d3e898d8 gitlab-ci: remove "when: always" in flatpak job.
This clashes with the usage of "rules:" and is even more useless as it
is about checking success of earlier stages (yet this job doesn't need
to wait for any other job).
Fixes CI error:

> jobs:flatpak config key may not be used with `rules`: when
2021-05-26 19:51:31 +02:00
Jehan 434ef403fb gitlab-ci: create a GIMP_CI_FLATPAK Gitlab variable to trigger the…
… flatpak build and publishing.

Same as we are doing for other build pipelines. This allows finer manual
builds (not just "on schedules").
2021-05-26 19:41:34 +02:00
Ondřej Míchal 83f5698fe2 ci: Enable nightly flatpak builds
To get a nightly flatpak, GNOME project offers a CI template[0] that can
be extended instead of having to define everything from scratch.

At the core is the "flatpak" job that tries to build the flatpak. If the
build finishes succesfully, the result should be available as a CI
artifact as a flatpak bundle. The app id is the same as on Flathub.

Another part is the "flatpak-nightly" job that publishes the flatpak if
the build succeeded. Without this job, the bundle stays only temporarily.
This job can and should only be run on the "master" branch. This jobs is
started only when the "flatpak" job finishes successfully.

Both jobs can be triggered only thorugh schedules[1]. To finish the
flatpak nightlies setup, a schedule needs to be set.

[0] https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/DevOps-with-Flatpak
[1] https://docs.gitlab.com/ee/ci/pipelines/schedules.html
2021-05-25 11:18:57 +00:00
Jehan 7a4f0a6f2b gitlab-ci: redirect installer logs to a file.
The logs are just too long for gitlab and ends with:

> Job's log exceeded limit of 4194304 bytes.

This doesn't prevent the job from actually finish successfully. Yet the
day when we will have a build issue, we won't have a way to debug if it
happens close to the end of the installer creation. So let's redirect
both stderr and stdout to a log file and include it in the artifacts.
2021-05-23 00:52:21 +02:00
Jehan 076e4d687b gitlab-ci: add a new "packaging" stage.
Unlike what I said in my previous commit, it still just takes too long
to build the installer, whether I move some of the substeps around or
whether I increase the max duration. So rather than increasing max
duration a lot more, let's just add an intermediate stage.
2021-05-22 10:35:06 +02:00
Jehan 7c4f12ee63 gitlab-ci: move the dependency moving step into the build stage.
The last stage (installer creation) takes just too much time, and it
exceeded the max execution time (80 min) in my last test build. Instead
of increasing this max execution time, let's move the run of
package-gimp-msys2.sh script in the same step as the build one. Maybe
adding an intermediate stage would have been better conceptually, but
every stage also takes some preparation and finalization time (setting
up the runner, loading, cleaning the uploading the cache, etc.) and our
installer pipeline is already long enough.
So let's just go like this for now.

As a side effect, the last job's log limit was exceeded too since I
added the Python option, which should hopefully also be fixed by moving
steps out of the installer job.
2021-05-22 10:35:06 +02:00
Jehan 9c6776fbe4 Issue #6257: Race condition bug in meson build.
Argh! My previous commit logics was right, but should have been applied
to the Windows builds (where the issue happens). That's what happens
when I hack too late at night!
2021-05-20 04:34:57 +02:00
Jehan 11a891b314 Issue #6257: Race condition bug in meson build.
This is not a fix, only a workaround for the CI to at least not fail
randomly, for the time being.

Basically since meson is running parallel jobs, even when the build
fails because git-version.h doesn't exist yet, while a depending file is
being built, it will still be built immediately after, despite the
failure. As a consequence, re-running `ninja` immediately after (i.e.
running `ninja || ninja`) will make the second build work. If it doesn't
then it's another issue which has to be fixed. But at least we work
around this known race condition in the meson build for the time being.

It's very ugly, but better than current situation. :-/
2021-05-20 04:26:24 +02:00
Jehan b815bca8d3 gitlab-ci, build: --enable-windows-installer also on Linux.
By enabling this option on Linux, not only will the installer language
file be generated, but the `make check` will also now validate that the
lang list is consistent with existing gettext files (see commit
8a42c6ccc2). So it's useful information to know this for instance as
soon as some translators add a new localization.

Also oppositely remove the option on the MSYS2 native Windows 32-bit
build. For Windows, we only need this option once, as we use the
language files generated by the 64-bit build.
2021-05-20 02:55:54 +02:00
Jehan c5b05b6e03 build: separate debug symbols from binaries in the Windows installer.
The shell script was given to me by ender. This is an additional step he
runs after building.
2021-05-19 21:59:00 +02:00
Jehan 5a366ee0d2 gitlab-ci: reorganize pipeline rules.
The goal is to make it easier to understand which pipeline is run when,
for future maintenance, and also to make it easy to trigger a specific
pipeline through Gitlab pipeline interface.
2021-05-17 14:34:29 +02:00
Jehan 62ae32123a build: add aalib dependency for ASCII Art support.
- Adding a patch sent to me by Sylvie Alexandre meant to help aalib
  build on MSYS2 for Windows 32 and 64-bit.
- Additionally, add an additional patch from myself because it was still
  not building properly.
- Also update the config.guess|sub files because the original ones (from
  2001!) were just too old and not properly recognizing the host mingw
  system (especially the 64-bit one apparently) in the MSYS2 CI jobs of
  GIMP.
- Finally regenerate the whole aclocal/libtoolize/autoconf/automake
  build system because these old files just don't play nice with recent
  autotools though the source files still regenerate fine (despite with
  some warnings, but nothing blocking).
- Add crt-git dependency because libws2_32 is in there.
2021-05-17 13:15:31 +02:00
Jehan de31d65daa gitlab-ci: gimp-distcheck-debian and gimp-autotools-debian redundant.
We had an autotools build stopping at `make check` and a separate one
for `make distcheck`. This just seems very redundant hence a waste of
resources.
So let's drop the job gimp-autotools-debian then add a `make check` step
to gimp-distcheck-debian.

Also as a side change, I move the cppcheck to being a scheduled job.
It's not such resource intensive job, nor did it take much time, yet
it's not like we use this information constantly. Moreover it never
fails anyway (so it's not like it gives much information on a per-commit
basis, unless we explicitly look into the resulting files) and with the
ability to run custom jobs whenever we want, this is far enough if
sometimes we need to generate the cppcheck analysis more frequently.
The rest of the time, having 2 jobs of this a week (our current
schedule) is far enough.
2021-05-14 19:56:55 +02:00
Jehan 1d03258797 gitlab-ci, build: construct the Windows installer from CI.
Run InnoSetup in the Windows CI to build the installer from both the 32
and 64-bit builds.

Current limitations:
- No installer signature yet.
- Dependencies will have to be checked more thoroughly.
- Apart from babl and GEGL, we may want to make custom builds of any
  package which has a patch in build/windows/patches/ (Windows-specific
  patches) and build/patches/ (all platform patches).
- Plug-in interpreters (Python, Lua…) don't work. This will need to be
  looked at in detail.

Globally this first automated installer build works fine though, as I
could install it in a Windows 10 VM and GIMP ran fine! So it's a first
step towards fully automated releases for Windows.
2021-05-14 19:27:30 +02:00
Jehan 004749158d gitlab-ci: native (MSYS2) Win32 32/64 builds only on schedules.
Having them at each commit is counter-productive, first because these
builds take so long and second because there seems to be quite few
Windows runners. So we end up constantly waiting for CI jobs from
previous commits (so we are just constantly waiting).

This is resource over-usage. So instead, I'll just set this in scheduled
jobs. For release preparation though, we'll have to set up a workflow
later to trigger these jobs off-schedule/on-demand (I can see there is a
Gitlab interface to do this), but this can wait for when the installer
is fully generated by the CI anyway.
2021-05-13 17:47:03 +02:00
Jehan eb3c42fda5 Add a distribution job with Win 32-bit! 2021-05-10 19:08:41 +02:00
Jehan a04eff326f gitlab-ci: add native Windows 32-bit build with MSYS2.
Note: Vala API doesn't build well on the 32-bit build. Not sure why (the
meson logs for GObject Introspection build are just as empty as ever),
but it won't generate the VAPI. So I disabled the option on 32-bit.
2021-05-10 19:07:31 +02:00
Jehan 419892c3bd gitlab-ci, build: CI job to package GIMP on Windows from MSYS2 build.
This new job resulted in a package which allows to run GIMP on Windows
(as tested in a VM; at least it starts, I can create a new canvas and
paint). Of course I think this will need to be tweaked a little bit
more, as I'm sure we miss things here and there.

At the very least, even though I add the Python and Luajit binaries,
GIMP on Windows didn't find them. This will need to be investigated.

Also it looks like opening from a remote location may not work. Not sure
if this about a missing GIO module or maybe something which works
differently on Windows (I was not even able to drag'n drop from the
browser!). Anyway this needs to be looked at as well.

Note that gdk-pixbuf-query-loaders is apparently unneeded when GIMP is
built this way (unlike with our crossroad build).

All this to say that this is still an early attempt to full CI build for
Windows.
It doesn't invalidate the crossroad build, because cross-compilation
builds from Linux will always stay very important for Linux developers
to be able to easily fix Windows bugs too; yet the crossroad build has 2
major issues:
1. We haven't figured out yet how to run GObject Introspection tools for
   cross-builds, so the crossroad builds are not full-featured (and this
   is quite a major feature we are missing!).
2. Also I will want to run the installer in the CI at some point and the
   one we use can only run on Windows itself AFAIK. We could try to run
   it through Wine, but still anyway the point 1. is already quite a
   blocker, let's do the simple thing.

Note that we will likely want to move to meson for this build, because
autotools is very slow on Windows. But as long as the few blocker meson
bugs are not fixed, let's stick to the slow yet good build.
2021-05-07 20:04:03 +02:00
Jehan 2ad349106a gitlab-ci: add Win 32-bit and Linux Clang builds to schedules.
These are interesting and may find very specific bugs from time to time,
but the usefulness is rare enough not to warrant to run at each commits.
This is just a waste of resources.

For scheduling finesse (in case we want to separate these in separate
scheduling), also rely on the existence of variables during scheduling.

Finally make sure that the non-scheduled builds are not run in schedule
pipelines (they are already run far enough).
2021-05-07 20:03:56 +02:00
Jehan 6c91e7f964 build, gitlab-ci: break the native Windows build into 2 jobs.
One for dependencies, one for GIMP.
2021-05-06 02:29:41 +02:00
Jehan ffd732c444 build: do not build Windows dependencies with ccache.
The build rules were highly inspired by other projects on GNOME's
Gitlab. All of them used to build with ccache. It worked fine for the
main build, but completely broke GObject Introspection build on both
babl and GEGL. And the worse thing is that meson was absolutely not
displaying the error, just saying it failed (even in verbose mode). A
lot of time wasted trying to debug.

Therefore let's get rid of ccache, but only for babl and GEGL. Keep it
for GIMP itself as it works fine there.

Other minor changes:

* Build from the build dir, rather than source. The other way around
  works too, but I actually find commands simpler this way.
* Adding artifacts.
2021-05-06 02:29:40 +02:00
Jehan 1858aac4c3 gitlab-ci, build: testing native Windows build.
Just an initial test to get a hang of the thing, mostly inspired from
GTK gitlab-ci rules adapted to our build.

All in one job (deps, babl, GEGL, GIMP itself) for now, for simplicity
of debugging. We'll see later to break this into CI sub-jobs.
2021-05-06 02:29:40 +02:00
Jehan 88898dad95 gitlab-ci: improve the CI for releases.
- Only publish the bz2 tarball because that's what we currently provide
  on download.gimp.org (let's see in the future for the xz tarball).
- Generate also a sha512 checksum. It's better to do it on the CI rather
  than on the download server, otherwise it wouldn't protect against
  transfer errors (from gitlab to download server).
- Rename the checksum files to ${filename}.SHA256SUMS (512 respectively)
  for easy download without name clash with the global files listing all
  the previous releases.
- Disable all meson jobs for tagged releases. They are currently not
  reliable and may fail randomly (see issue #6257), even though without
  code problems (this is also one of the reasons why autotools is still
  our official build system and meson is still deemed experimental).
  It's ok for regular builds, but not for tagged builds, which we need
  as reliable as possible. The really important job is the distcheck one
  for tags.
2021-04-26 20:56:31 +02:00
Jehan 8336147bdf Revert "gitlab-ci: testing gtk!1563 for Windows Ink support."
This reverts commit 32434d9fc3.
Argh sorry. I was planning on making a branch for this (not directly on
master!) and also the patch should obviously have been applied on a GTK
tree, not GIMP's. I'm probably tired! Reverting.
2021-03-03 13:21:51 +01:00
Jehan 32434d9fc3 gitlab-ci: testing gtk!1563 for Windows Ink support. 2021-03-03 12:36:45 +01:00
Jehan fc4fedeb68 gitlab-ci: disable building file-mng for gimp-win32 explicitly.
We were not building it by not installing libmng until now. But graphviz
must have pulled libmng. So disable explicitly the option in GIMP
configure step.
2020-12-05 21:43:27 +01:00
Jehan 7df9bf1396 gitlab-ci: graphviz (for the `dot` tool) is now a dependency for GEGL. 2020-12-05 20:58:15 +01:00
Michael Schumacher abdea8a4cf gitlab-ci: expire distribution stage artifacts after 2 days 2020-11-30 23:31:30 +01:00
Jehan 81f9ea457c Revert "gitlab-ci: temporary allow distcheck job failure."
This reverts commit e869a11270.

Mitch could reproduce the issue and made each .actions file into
respective CLEANFILES in commit 0052803313. At least now the distcheck
job works, so let's just make its failure forbidden again.
2020-10-26 17:12:47 +01:00
Jehan e869a11270 gitlab-ci: temporary allow distcheck job failure.
I really don't like to flag the distcheck job as allowed to fail, but
the issue we have with it right now (#5790) is very annoying and I have
no idea where the weird uncleaned files come from. I can't reproduce
this locally and these files are seemingly never created here during a
distcheck.
Since it makes all our pipelines fail, this makes it harder to diagnose
and find real other bugs, so let's allow failure until we figure this
out.
2020-10-22 18:44:27 +02:00
Jehan e77d9517f7 meson, autotools, CI: simplify plug-in binding build options.
For Python, Lua and Javascript, make the option boolean (with 'yes'
being the default). No need of a warning when not installing the
plug-ins as this would have been disabled explicitly anyway. When
installing the plug-ins, only make interpreter checks as precautionnary
verifications which don't actually change anything (except outputting
some warnings if interpreters are not found). Basically for these 3
bindings, the interpreters are only runtime dependencies anyway. So it
doesn't matter if they are not available at build time. In particular,
we get rid of the 'force' option.

Vala rules do not change as the vala compiler is indeed needed at build
time and current checks work correctly. I just add a "Vala plug-ins"
line in the summary message of the meson configuration, as it was
missing.
2020-10-12 22:10:17 +02:00
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