Commit Graph

262 Commits

Author SHA1 Message Date
Jacob Boerema 9d133add5b build: openjpeg dependency was missing
Both in our Debian and Windows deps the openjpeg dependency was
missing, so let's add it back.
2024-04-21 12:40:41 -04:00
Bruno Lopes 2dc6f41114 gitlab-ci, build: Use 'bundling' naming instead of 'packaging'
As hinted in d09a2a6f

We now use the word 'bundle' to signify "program files in the same prefix"
(e.g. .appimage, .zip, .app). This is in line with our source and dev-docs
(just take a search in the repo). So, appimage and windows scripts changed.

The word 'package' normally means "program files distributed for install in
the same prefix or not" (e.g. .deb, .msi, .dmg). This is in line with CMake
naming of some commands, but meson prefers to call 'dist', which we use more.

So, this partly reverts some things of GNOME/gimp!1171 and reinforce others
for even more "rationality" in the overall build structure of GIMP.
2024-04-20 22:32:46 -03:00
Bruno Lopes b1c25ca5dc gitlab-ci: Clarify some CI-wide variables 2024-04-20 23:23:39 +00:00
Bruno Lopes 0c32125f1c gitlab-ci: Fix duplicate merge and push pipelines
This is a well know problem documented in GitLab docs that happens when
the CI isn't properly configured that was causing double pipelines in MRs.
Let's fix it, and reduce some redundancy.
2024-04-20 20:50:04 +00:00
Bruno Lopes 6428e51f2a gitlab-ci: Move 'analysis' stage to a more "mainstream" position
I suppose the intention of having this stage at the end was to make clear: no
job depends on it. However, this place is not common or ideal but one of two:
1) before building, which is more linear; or 2) after building (the choosen)
even if this isn't dynamic analysis (tests), since they are both related and
some compilers and build systems do static analysis. Anyway, not after dist.

The new place is a bit  more clear to devs used at "build, test, deploy" praxis
and maybe will be now better noticed by the existing devs before distributing.
It's not perfect, since I explained above that there are two places/approaches.

Obviously, the stage continues to be OPTIONAL to pass, nothing was changed.

---

Also, dropped the deprecated "only:" (in clang-format job) in favor of "rules:"
and made the artifacts paths of clang-format and cppcheck more consistent.
2024-04-20 17:35:45 +00:00
Bruno Lopes 9653e50e5f gitlab-ci, build: Unify Debian jobs and add AppImage artifact
AppImage is pretty fast to make, like the win crossbuild; and portable,
being very appropriate to do quick tests on Linux when pushing to git.

The overall organization of Debian jobs was changed to take advantage
of this and make things less complicated (but less clear at first sight).
I reinforce that this was the most efficent way to make the AppImage.
2024-04-18 20:54:49 -03:00
Jehan df915494d1 gitlab-ci: hack-fix the broken job gimp-flatpak-x64.
This fix doesn't feel right. The whole point of having a generated manifest from
the build was to use it for our flatpak job (through job dependency). Right now,
it has been rendered useless. We must either re-implement the proper job
dependency or find another way to fill the proper "command" with the right
version (maybe just a standalone script to be used in Gitlab CI and which we
could tell about to people who wish to build the nightly flatpak themselves).

Anyway for now, it should do as I don't want to spend too long on this. It
should fix this error in the log generated as artefact of the "gimp-flatpak-x64"
job:

> ../build/flatpak/meson.build:6:2: ERROR: File org.gimp.GIMP-nightly.json.in does not exist.
2024-04-18 23:40:30 +00:00
Bruno Lopes d09a2a6f7a gitlab-ci: Drop 'packaging' stage
This stage was introduced in 076e4d68 and it fulfilled well its purpose. But
the side effects were: more (sometimes slow) uploading and downloading of
packages and artifacts. Even if we have caching, this is far from ideal.

Now, the so-called "packaging" jobs were moved inside in the "build" jobs.
The advantages are: just one pacman install (ideally cached from deps job);
direct packaging without waiting for upload/download; and less confusion,
since "packaging" naming was implying that the .zips are somewhat official,
which isn't totally true, and sometimes overlaps the dist/deploy concept.

---

Also, the flatpak job now uses config.h instead of triggering a GIMP build.
In other words, I'm reverting part of my work in some old commits.
2024-04-16 12:08:07 -03:00
Bruno Lopes c064148a95 gitlab-ci: Make the CI a little more smart
Now, the CI will auto cancel jobs after a new commit is pushed and retry when
the runners fails. The first case is frequent, the last is rare but happened.
2024-04-16 08:57:14 -03:00
Bruno Lopes 876c709a29 gitlab-ci: Move 'image:' from deprecated global to .default 2024-04-14 13:52:29 +00:00
Bruno Lopes 18079e176f gitlab-ci, build/windows: Unify a bit Windows (cross and native) jobs 2024-04-14 10:36:04 +00:00
Bruno Lopes ad132ad0fa gitlab-ci, build/windows: Organize 'git' variables 2024-04-13 20:47:47 -03:00
Bruno Lopes 5202935db7 gitlab-ci: Make use of 'before_script' less unorthodox
Since !1171 the 'before_script' was being used by me for organization, but
this is at least unexpected to "mainstream" .yml pratice and can be wrong.
For example, the universal variables can't be properly used this way.
So, let's use 'before_script' only for the (official) purpose: save code.
2024-04-13 23:12:34 +00:00
Bruno Lopes 28c65b8a5f gitlab-ci: Drop x86 (aka 32-bit) cross builds for Windows
This isn't directly related with #10922 and does NOT affect 32-bit support.

After talk with @Jehan, author of 'crossroad' and main dev of crossbuilds,
we decided that the x86 crossroad builds can be dropped by these reasons:

1) 32-bit crossbuilds weren't being built. They are used since c8ec0ae7 but
after the native 32-bit builds they ended in a state that they are the only
pipeline that isn't automatically triggered in any way, a complete limbo.

2) 32-bit crossbuilds weren't being autonomous. They are not working fine
with wine32 so the win-x64-cross artifact is a 'need' and now debian-x64,
so we were spending way more time fixing than using the 32-bit cross jobs
(sometimes the 32-bit cross jobs are just broken and we even noticed).
We have other jobs not autonomous but they don't have additional bugs
like not being able to build with .mng and .wmf (32-bit cross only bugs).

---

The x64 crossbuilds will continue to be supported. They are very useful to
develop on Linux, and test MRs on Windows. I'm an assiduous user of them :)
2024-04-13 18:25:47 +00:00
Bruno Lopes 694e4f382c gitlab-ci: Remove unnecessary manual _ccache/ folder creation
This was added in a22393a6 and e96b751e, following old 2_build-gimp-msys2.sh.
But, according to my tests (local and in the CI, in both Debian and Windows),
meson creates this in setup time so the manual folder creation is redundant.
2024-04-13 16:44:36 +00:00
Bruno Lopes 28f893293a gitlab-ci: Reduce redundancy on Windows cross jobs (take 3)
Following 2c2e779f and 70886e55.
2024-04-13 15:51:32 +00:00
Bruno Lopes 2c2e779f92 gitlab-ci: Reduce redundancy on Windows cross jobs (take 2)
Following 129c1637a9
2024-04-13 10:00:56 -03:00
Bruno Lopes bc8ef7998c gitlab-ci: Remove paradoxical redundancy on Windows native jobs
a22393a6 introduced redundancy while removing redundancy
2024-04-13 10:40:21 +00:00
Bruno Lopes 129c1637a9 gitlab-ci: Reduce redundancy on Windows cross jobs (take 1)
Our crossroad jobs are too "sensible" and prone to broke so let's go gradually.
2024-04-12 22:02:52 -03:00
Bruno Lopes dcaaf8a48b gitlab-ci: Overall cosmetic change following e96b751e
Also, drops 'apt-cache' caching since after some experimenting with !1171
this proved to be of little use; and reorganize some dist and analysis jobs.
2024-04-12 21:57:29 +00:00
Bruno Lopes e96b751e35 gitlab-ci: Reduce redundancy on Debian native jobs
* Move common things to the new .default section extensible for all jobs
* Reorganize order of job elements to be way more consistent and rational:
  from general (pipeline/rules) to specific (job artifacts) in a liner way
* The order of rules was changed to be a bit more easier to understand
- Drops 'dependencies' which is redudant, and 'needs' have more options
- Drop apt-cache which lost use and it is sometimes troublesome to cache
+ First try to boost the use of ccache in all build jobs, when possible
+ Fix the problem of non-failing jobs introduced by GNOME/gimp!1171
2024-04-12 16:05:42 +00:00
Bruno Lopes a22393a67e gitlab-ci: Reduce redundancy on Windows native jobs
This commit uses definitions and references to reduce repetition of CI code.
Some people (like the GitLab devs?) prefer (almost imposes) this to be done in
multiple .yml's using 'worfklow:' but this makes the CI way more complicated
and very slow to read. So, let's just keep simple in one human readable file.

---
Other changes are:
- The custom native arch pipelines now they always generate a .zip package.
  This helps to ensure that everything is in place and facilitate testing;
- The pacman update (-Syyuu) was removed since it is auto done by runners;
- The ccache config was moved to .yml. This does NOT affect local builds
  since meson saves ccache by default for user in '%LocalAppData%/ccache'.
2024-04-11 19:02:49 +00:00
Bruno Lopes 4652022368 gitlab-ci: Expose job artifacts in UI
Makes a bit easier to newcomers download the main artifacts in MRs.
(This feature doesn't support variables or wildcards in paths)
2024-04-11 07:42:13 -03:00
Bruno Lopes 70886e554f Partially reverts 9d279a60 and 4f965557
These commits introduced sensible drawbacks in our CI file organization.
Some of them I already commented in the MR but was "ignored" back then
probably due to the complexity of the MR. So, the let's revert:
- Unecessary repetition of libomp installation (4 times, now 1)
- Unecessary repetition of submodule initialization (6 times, now 4)
- Creation of new variables in the hope of more clarity. But,
  they aren't consistent with the gimp-web-devel instructions
  nor with other systems variables. This is terrible to undestand.
  Please, let's not reinvent the wheel since this is a bad example to
  packagers, since they tends to isolation and overly-engineering.

Also, made some little adjustments that I should have done in previous MR.

---

This MR was splitted. Even more simplification will be done in the future.
2024-04-02 11:55:33 +00:00
Bruno Lopes 2f2027b757 gitlab-ci, build: Unify variables following gimp-web-devel
We should avoid disparity with the build instructions since
contributors will look at the CI files. See:
Infrastructure/gimp-web-devel!54 and Infrastructure/gimp-web-devel!65
2024-04-01 19:01:52 -03:00
Jehan 5c14d937f9 gitlab-ci: fix dist-installer-weekly job.
Since dist-installer-weekly doesn't depend on gimp-debian-x64 anymore, we need
to grab the config.h from one of the other dependencies. Let's use the one from
gimp-win-a64 (though it could have been any other Windows build job).

Fixes:

> Get-Content : Cannot bind argument to parameter 'Path' because it is an empty string.
> At C:\_r\_builds\vJWzEqDv\0\GNOME\gimp\build\windows\gitlab-ci\4_dist-gimp-inno.ps1:13 char:39
> +     $GIMP_VERSION = Get-Content -Path "$CONFIG_PATH"         | Select ...
> +                                       ~~~~~~~~~~~~~~
>     + CategoryInfo          : InvalidData: (:) [Get-Content], ParameterBindingValidationException
>     + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetC
>    ontentCommand
2024-03-28 00:19:10 +01:00
Jehan 8c6177dc1a gitlab-ci: fix cross-builds.
The dependency to libomp apparently came with the move to CLang.

Fixes:

> /builds/GNOME/gimp/_install-debian-x64/bin/gimp-console-2.99: error while loading shared libraries: libomp.so.5: cannot open shared object file: No such file or directory
2024-03-28 00:19:10 +01:00
Jehan 42171503d4 data, plug-ins: logo images moved to gimp-data repository.
Now the development and stable logos will be generated from gimp-data.

In other changes, the gi-docgen logo is installed as a symlink using
install_symlink() which exists since meson 0.61.0 so I bumped our meson
dependency (in practice we were already using this function anyway and Debian
bookworm has meson 1.0.1 so it's all good).

Finally I don't install a wilber.png anymore, which was only used by script-fu
testing, and which was the same as gimp-logo.png (except 256x256 instead of
128x128). Unless mistaken, all script-fu tests loading this image still work
with the change. The only one where I needed further change was buffer.scm
(which was checking the dimensions).

See gimp-data@9aa6e35.
2024-03-28 00:19:10 +01:00
Jehan 4f9655573f build, gitlab-ci: update dependencies.
- With last commit, the Windows installer pipeline doesn't depend on
  "gimp-debian-x64" job anymore since a native Windows build is now able to run
  GIMP (or gimp-console) as a build-time tool as well. It makes the Windows
  installer pipeline (and full custom native builds) self-sufficient.
- On the other hand, "gimp-win-x64-cross" and "gimp-win-x86-cross" now require
  "gimp-debian-x64" since cross-compiling GIMP now requires a native GIMP in
  order to generate some image data (such as the splash image, and probably soon
  logo or icons, etc.). See gimp-data@5a03c71.
- Getting rid of "image-win-x64-cross" and "image-win-x86-cross" in favor of
  "image-debian-x64" for all Debian as well as the cross-compilation jobs. They
  are all based on the same Debian image (it was debian:bookworm for native
  Linux jobs and debian:testing for cross-builds; now it will be debian:bookwork
  for all) and it's just a few more packages (cross-compilation C and C++
  toolchains) for the cross-builds. Moreover now the cross-builds also need the
  native GIMP binary around, therefore native dependencies are needed as well.
  It makes sense to factorize all 3 images into 1.
- Make sure we don't build bindings when cross-compiling since these won't work
  in this case.
2024-03-28 00:19:10 +01:00
Jehan 9d279a60ce meson: moving away from meson subprojects in favor of git submodules.
Meson subprojects just have too many problems and limitations and I can foresee
the maintenance headache and the future incoming false-positive bug reports if
we start using meson subprojects.

Comparing to the simplicity of git submodule which also has much better
notifications to help people understand when the submodule is not in sync and
how to remedy to it.

See commit gimp-data@c364adb explaining the main reasons in detail.
2024-03-28 00:19:10 +01:00
Bruno Lopes 85ed2847a6 gitlab-ci, build: Move to Clang in Flatpak (mostly)
In our efforts to use Clang, now the nightly (in fact weekly) flatpak
is built with Clang too, not only GIMP but also the dependencies.

* However, not aalib. We welcome fixes regarding this cursed lib.

Additionally, updated some build options from some deps.
2024-03-27 11:01:20 -03:00
Bruno Lopes 5de967aae9 gitlab-ci: Drop Windows resource .patch since MSYS2 now have LLVM 18 2024-03-23 20:07:54 -03:00
Bruno Lopes 9691665d52 gitlab-ci: Update jobs order
Following 5542748779
2024-03-16 15:38:51 -03:00
Bruno Lopes e61b7e05ed build/windows: Port Installer script to .ps1
This commit unites two scripts (.sh + .bat) in one .ps1. PS was choosed, since:
1) We don't need MSYS2 to distribute with Inno at first. Now, who wants to
   just distribute GIMP can do it easier natively without a separate environ.
2) PS is actually pretty solid and have a good number of cmdlets, unlike the
   ancient CMD, which barely supported more than 9 parameters in .bat files.
   Consequently, some redundant variable checks have been removed from the .ISS.

Also, changes the name of the job and script for better consistency with the
upcoming MS Store job.
2024-03-16 15:24:45 +00:00
Bruno Lopes e89bca35c7 gitlab-ci, build: Move to Clang in Windows (native)
This makes possible to use the Universal C library provided by Microsoft.
2024-03-15 17:08:31 +00:00
Bruno Lopes 5542748779 gitlab-ci: Move to Clang in Debian
This makes the GEGL code execution a bit faster in Linux.
2024-03-15 17:08:31 +00:00
Jehan 341ab7212b build: remove a LLVM patch.
It was only used for the gimp-win-a64 job and was coming from MSYS2 repository
which already dropped it:
a98352b2ba

The first patch is still needed as the upstream fix is meant to appear in clang
18 according to bug report, yet our CI still uses clang 17.0.6. See:
https://github.com/llvm/llvm-project/issues/51286
2024-02-26 19:56:53 +00:00
Jehan d63a94dedc gitlab-ci: use the last tagged releases of babl and GEGL for deps-debian-x64 too.
This is similar code to what I added for the Windows builds, except that here
it's because deps-debian-x64 will also end up feeding dev-docs job too.

Right now our tagged build of GIMP produces docs for unstable versions of babl
and GEGL.
2024-02-19 12:28:53 +01:00
Jehan 979900fcdf gitlab-ci, build: BUILD_TYPE not set for packaging-win-a64 job.
Aaaargh! I think this was the main issue which would explain why the problem was
mostly happening on the packaging job. In this job, we were still consistently
calling `pacman --noconfirm -Suy` (i.e.g "Synchronizing package databases")
which we had stopped to do for the CI builds as that was highly increasing
chances of locking pacman's process.
2024-02-08 21:00:07 +00:00
Jehan a3d8f65946 gitlab-ci: terminate all msys2 related processes before Windows/Aarch64 jobs.
This is the command suggest by MSYS2 developers here:
https://github.com/msys2/MSYS2-packages/issues/4340#issuecomment-1887695290

They also say to run it outside the MSYS2 environment, which is why it's in the
CI rules, not in the shell script.

Honestly at this point, it feels like we are just stacking weird workaround to
get it to fail not too often. ;-(
2024-02-08 21:00:07 +00:00
Jehan 1bf506abc6 gitlab-ci: clarify multi-command shell block.
Two shell commands got merged as one line. This seems to work fine on
hmartinez82's runner, unlike on our new runners. Anyway it is likely good
practice to clearly separate the commands.

Fixing:

$ if ($stuck -eq "True") { Remove-Item -Force -Path "C:\msys64\var\lib\pacman\db.lck" Write-Output "Cleaned previous stuck pacman" }
Remove-Item : A positional parameter cannot be found that accepts argument 'Write-Output'.
At line:279 char:26
+ ... q "True") { Remove-Item -Force -Path "C:\msys64\var\lib\pacman\db.lck ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
2024-02-07 22:48:37 +01:00
Bruno Lopes c60604a535 Partially revert "build/flatpak: Drop 'gimp_app_version' hardcoding"
As suggested by Jehan, the manifest will be configured by meson.
Of course, for CI compliance, this pushes the job to a further stage:
'packaging', which is what Flatpak is about, after all.

The distribution job name has also been changed, because when Store job
is merged, this will be the new nomenclature of the distribution jobs,
which was not changed since !1171 by lack of time.
2024-01-21 14:04:35 +00:00
Bruno Lopes 107887f929 build/flatpak: Drop 'gimp_app_version' hardcoding
Now, the script reads the major.minor version automatically from the main
meson.build file, reducing maintenance work, which is already especially
high regarding flatpak because of the natural hashes updates etc.

Also, a small organization made to make the code more humanly readable.
2024-01-18 15:59:45 +00:00
Bruno Lopes c239d522c8 gitlab-ci: Tweak CI to avoid stuck win-a64 jobs
'clangarm64' pacman is getting stuck and killing it is the only "solution"
before any patch by the MSYS2 folks.
2024-01-16 13:11:56 +00:00
Bruno Lopes 2c1c7aae03 gitlab-ci, build/windows: Fix .patch and improve a little pacman upgrade
* Fixes an ARM .patch that stop to working after !1171, causing job fail
* Changes the logic of system upgrade (pacman -Syyuu) to be less redundant
  This also improves consistency with the Debian jobs
2024-01-15 15:04:30 -03:00
Bruno Lopes af79bbe028 gitlab-ci, build/windows: Make Packaging scripts compatible with CI-Cross job
The CI crossbuild job now use the same main script (and the same
sub-scripts of linking and debug generation) of the native CI for
packaging. These unified scripts greatly facilitates maintenance.

The crossbuild deps script is now more consistent in relation to the
native one. As this is polished, the cross one is now polished too.

A crossroad gimp build script was created with a more clear code.

Also, finally make the script for packaging only, removing build step
stuff that shoudn't be here (glib-schemas generation) since this causes
disparity with the Local native build; and adding some packaging
decisions that shoudn't be in the installer scripts (eg. specific
folders of ghostscript, glib; no share/themes), which also facillitates
INNO (and future MSIX) maintenance.
2024-01-02 10:49:31 +00:00
Bruno Lopes 8b9aa1e7ca gitlab-ci, build/windows: Make Build script compatible with Local-Native build
The local builds now can use the same script of CI for sake of time.
The compatibility layer is very simple and makes the script more
used/tested, therefore more reliable.
2024-01-02 10:49:31 +00:00
Bruno Lopes 5ecf228019 gitlab-ci, build/windows: Make Deps script compatible with Local-Native build
The local builds now can use the same script of CI for sake of time.
The compatibility layer is very simple and makes the script more
used/tested, therefore more reliable.

Also, remove some redundacy on the code for better maintenance.
2024-01-02 10:49:31 +00:00
Bruno Lopes 271ba85770 gitlab-ci, build/windows: Unify CI jobs wording
Debian changes:
- Since autotools has gone, we don't need to specify 'meson' in the
debian job and others.
- The "INSTALL_PREFIX" was renamed for the more usual "GIMP_PREFIX" and
the meson sintax of Debian jobs was also updated.

Windows changes:
- Then, clarify that the win64-nightly and win32-nightly jobs are, in
fact, in the 'packaging' step, since we don't really "distribute" GIMP
in .zip and the commands are almost the same of the packaging .SH
script, without scripted optimizations for Inno Installer (or future
.MSIX), crucial for distribution.
- We don't need to specify "native" sufix in any build since they are
the rule and cross builds are the exception.

General changes:
- The job names was changed to be more consistent and in accordance
with the folders present in the artifacts.
- The 'nightly' sufix was removed from the Inno Windows Installer job
and others, since this doesn't reflect the real build frequency.
- The scripts filenames are altered to stay "in order". This is not
essential but ultra convenient since it is easy to view and search.
(The -uni suffix is explained in a further commit)
- All artifacts names now have the commit to avoid apparently duplicate
files when downloading same step artifacts from different projects.
- Finally, rearrange the order of jobs rationally: first the OSes and
archs (from the most free and modern to the most closed and legacy),
then the stages (from 'prepare' to 'analysis'), ending with the
frequency of jobs (from the most frequent, called at each push, to
the least/weekly).

Overall, this changes, although difficult to review at the first
sight, will avoid in the future quite "dumb" issues like:
GNOME/gimp#10195
2024-01-02 10:49:31 +00:00
Jehan 7a34282fa5 gitlab-ci, build: add Aarch64 build in our universal installer.
This is in part a port of commit 6f921b27bb from gimp-2-10 branch, except that I
could not easily cherry-pick because too much had changed already in the master
branch.
There are also a bunch of additional changes in some other glue scripts.

Also some rules which were in the 2.10 branch don't apply to the main one, such
as Python being copied from the x86 binaries, since clang-aarch64 has Python3
(unlike Python2).
2023-10-15 11:53:27 +00:00
Jehan 17688ffa3a build, gitlab-ci: taking one more patch from MSYS2 project.
This should hopefully fix this error in the CI:

> llvm-rc: Error in ICON statement (ID 1):

See: https://github.com/llvm/llvm-project/issues/51286
2023-10-15 11:53:27 +00:00
Jehan 823f24c401 build, gitlab-ci: temporary patch for the Windows/Aarch64 build.
See discussion in #9170 and !1091. It looks like this soon won't be a problem
with a recent llvm-windres (which is now patched). But until then, let's patch
upstream GIMP but only for this build.
2023-10-15 11:53:27 +00:00
Jehan b4a06737c0 build: testing a Windows/Aarch64 build.
Note: the additional `rm` call was done for this error:

> + mv _install-arm64 /home/SYSTEM
> mv: cannot move '_install-arm64' to '/home/SYSTEM/_install-arm64': Directory not empty

I guess the home directory is not properly wiped-out between runs, which is not
a huge problem as long as the runner is private to our project. Let's clean
things ourselves.
2023-10-15 11:53:27 +00:00
Jehan 661009d950 gitlab-ci: generating tarballs for babl and GEGL API reference documentation. 2023-08-12 17:33:54 +02:00
Jehan 99bb342037 gitlab-ci: further fix the Windows nightly installer.
Continuation of commit 94344bdb46 which was not enough. I just need the full
pipeline from image to Debian GIMP, with dep job too.
2023-08-09 15:25:34 +02:00
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