Commit Graph

261 Commits

Author SHA1 Message Date
Jehan b5cbe4e9dc gitlab-ci, gimp-data: always test the install phase too.
See: https://gitlab.gnome.org/GNOME/gimp-data/-/issues/3
2024-09-16 12:04:29 +02:00
Bruno 9963543a01 gitlab-ci: Build with detailed stacktraces, maxflow, qoi and lua-lgi
This ensures that the devs who follows Debian instructions at gimp-web-devel
can build a full-featured GIMP and maybe we have a full-featured AppImage.
2024-09-09 10:51:52 +00:00
Bruno a988084a97 build/linux: Refactor AppImage bundling script to easier maintenance
- Simplify three functions into 'bund_usr' (similar to 'bundle' in Win script)
- Add 'wipe_usr' function (similar to 'clean' in Win script)
- Verbose the steps of AppImage making
- Log (go)appimagetool bundling of deps (not only the the .appimage making)
- Change AppRun to be more clear about our .appimage compatibility

This refactoring is not perfect but is good enough to anyone understand
how our AppImage is made just reading the script.
2024-09-09 10:51:52 +00:00
Bruno 23bae9ab42
gitlab-ci, build: Move appimage code out of gitlab-ci and reduce verbosity
This should be enough to not "annoy" developers with repetitive ninja and
not too relevant appimagetool output. This makes easier to devs to look at
the runner log without needing to revert 9653e50e (the revert/split would
make us lose .appimage in some custom Deb pipelines and 50% of ccache hits).
2024-08-30 12:44:40 -03:00
Bruno 76f174f839 build/windows: Simplify installer .PS1 script
This adds a bit more verbosity to the installer script while omitting some.

The version params (e.g. gimp_version) are dropped since now config.h is
mandatory (this is a natural conclusion of the generation of assets).
2024-08-19 23:58:05 +00:00
Bruno 706014eba4
gitlab-ci: Explain why we don't use 'matrix'
'matrix' would save a lot of code and facilitate maintenance but,
according to my tests in a branch that I already deleted, this
doesn't work for our needs considering GitLab CI limitations.
2024-08-15 21:56:32 -03:00
Bruno 89f7ddb2ca gitlab-ci: Change appimage comment following #6798
I and Jehan researched then concluded that reverse naming is NOT
the 'de facto' standard yet so the word "exotic" isn't appropriate.
2024-08-11 10:00:45 +00:00
Bruno c95fe605cd
build/windows: Add verbosity to MSIX script
Now, some basic things will be output on runner and others saved in winsdk.log
2024-08-07 21:53:37 -03:00
Bruno 1f24aa5f7c build/windows: Move splitting script to its right dir
Following 0199faac and 884b05f1

It's clearer than ever that this is an installer-only thing
so let's move the script to the right place.
2024-08-06 17:52:01 +00:00
Bruno 64e44ca490 build/windows: Prevent contributors from bundling GIMP wrongly
This makes the bundling script an "extension" of the building script, similar
to what Cmake-based projects does on Windows. By the way, this is inline with
the recent changes which clarified that bundling is just a finalization of the
building process when a bundle is aimed. See: d09a2a6f, 2dc6f411 and 9d86492b
2024-08-05 15:16:47 +00:00
Bruno 748908aaf0
gitlab-ci, build/windows: Use Universal variables in native gimp-console wrapper 2024-08-03 20:22:42 -03:00
Bruno 75446c4316
gitlab-ci: Clarify a bit better Debian 'build' deps
Clang and others are not GIMP deps 'per se'. GCC also exists.
2024-08-01 19:12:05 -03:00
Bruno 101bcca329
gitlab-ci, build/windows: Separate (again) Debian and Crossroad deps
Despite the good intentions, 4f965557 makes Debian contributors who
follows gimp-web-devel instructions to download more deps than needed
and makes unclear what are the crossroad deps. Let's fix it.
2024-08-01 18:18:34 -03:00
Bruno f73bf7fb07
build/windows: Make sources downloading more neutral
This makes crossroad and msys2 scripts clone without the "_" prefix, which
will improve quality of life of most contributors that just clone them.

Just for consistency, also remove the "_" prefix from other pices of code.
2024-07-30 13:05:09 -03:00
Bruno bd28861785
build/windows: Refactor MSIX .ps1 a bit to not impose strict SDK or .msixbundle
The original script required a specific WinSDK version. Now, it autodetects.
This is useful if we need to move to another runner and welcome locally too.

Also, downloading the arm64 artifact was mandatory to get a x64 msix, which
is silly. Now, packagers are free to package to either arm64 or x64 alone.
This is useful locally but could be useful on CI too when some arch fail(?).
2024-07-29 18:45:01 -03:00
Bruno e01973b911 build: Simplify all the arch stuff
The ARTIFACTS_SUFFIX is being dropped on building scripts because:

1) This will make possible to further simplify Installer scripts in other commit

2) There is no script that uses multi-arch _build/_install at same time on CI
   However, there are two use cases: to build Debian and flatpak; and, on Win,
   to build on CLANGARM64 and CLANG64 (?). But probably they are pretty niche.
   I suppose that people who build on Debian (or other dev-oriented distro)
   willn't want to mantain deps in two sys prefixes (pkg and GNOME runtime)
   + two gimp prefixes (out of sandbox and sandbox) due to huge storage use.
   Why someone would want to build with emulation on Win ARM64 I don't know.
   Anyway, people that know how to do this stuff probably can change the .sh.

3) When building locally, the contributor doesn't need to know the arch at all.
   Indeed, without this suffix, the scripts are inline with gimp-web-devel and
   prevent some first-sight confusion when reading them that I've seen on IRC.

4) These arch suffixes can be understood as '_install-*' being distributable
   which is not true. So, without this suffix we could make more clear
   what is a package (when GitLab fix the glob bug in 'expose_as' someday).

---

Despite .gitlab-ci.yml not being a script, it needed to be touched too
because cross scripts depends on Debian jobs due to gimp-data MR.
2024-07-20 21:09:47 +00:00
Michael Schumacher febb2126c9 gitlab-ci: allow gimp-win-x64-cross to fail until we have a fix for #11756 2024-07-15 17:58:39 +02:00
Bruno 9d86492b14 build: Make scripts numbering and storing consistent
The numbering is now inline with actual the order of jobs on CI
to make easier to understand what the numbers represent.
To understand why bundling is number 2 see: d09a2a6f and 2dc6f411

The storing of Windows scripts was changed to make easier to
call them, to better convey that they work outside CI and
to be consistent with other build/ subdirectories.
2024-07-10 00:04:03 +00:00
Bruno 40ecfd40ad Issue #11455: Split flatpak jobs
- Dependencies not present in GNOME runtime are now built in deps stage
  This makes easier to follow the progress of the overall pipeline and
  to know how much time was spent on each stage
  (like crossbuilds, the artifact size is brutal but only lasts 2 hours)

- babl and GEGL build now have output in GitLab runner, unlike others deps
  This makes clearer to spot if something goes wrong in these crucial deps

- GIMP is still built in its stage but now alone, like Debian and Windows
  This makes possible to retrigger only this job when runner errors occours,
  without needing to start monolithically the deps+gimp build from scratch

Also:

- babl, GEGL and GIMP now have meson-log.txt artifact like other builds

- dist job now have all commands self-contained on its script (needs to
  be merged to be tested according to my tests)
2024-07-07 21:46:52 +00:00
Bruno Lopes 3a54c37daa
gitlab-ci, build/linux: Move Flatpak CI code to scripts that works
This will make easier to debug problems locally if needed and
have the potential to reduce the first barrier for Linux newbies.
2024-06-18 14:57:39 -03:00
Bruno 0397132184
gitlab-ci: Restore 'meson-log.txt' as artifact
Restores the build log artifact which was lost partly due to my fault.
The log is very useful in the rare cases of breaking the build system.
So, following our experience, let's save it for, at minimum:
- Native Linux
- Native Linux flatpak: will be adressed later in another commit
- Cross Win
- Native Win (aarch64)
2024-06-15 07:27:31 -03:00
Bruno 0f42555484 gitlab-ci, meson: Enable colored Clang output
This makes easier to spot warnings.
2024-06-15 00:34:54 +00:00
Bruno fa26f20e9f gitlab-ci: Disable CI scripts 'debug mode'
If we were in the first days of our CI (so script bugs are common),
the scripts "debug mode" (bash -x) would be crucial, but we are not.

To be fair, running scripts in "debug mode" is pretty harmful today:
1) the produced logs consume our quota more and more (e.x.: adding a
   bit more complicated .sh function can double the output size); and
2) the long white logs tends to be specially hard to read by the way.
2024-06-15 00:34:54 +00:00
Bruno Lopes 375782fd64 gitlab-ci: Use LLD linker in Debian and Flatpak jobs
Following 55427487 and 85ed2847

It is a bit unusual to use 'clang' + 'GNU ld' combo.
Also, lld is advertised to be way faster.
2024-06-01 11:28:21 +00:00
Bruno Lopes 884b05f168 gitlab-ci, build/windows: Move back split of 32-bit symbols to gimp job
Following 0199faac

We use arm64 runners for the installer job to avoid queues, but...
llvm-objcopy is well know to lack parity and one sympthom is the
'invalid SymbolTableIndex' warning when handling x86 debug symbols.
2024-06-01 10:57:24 +00:00
Bruno Lopes 3ad39c3866 gitlab-ci: Expose .flatpak as artifact from the distribution job
Completing d09a2a6f, since the dist job wasn't added to MR pipelines that time

Note: this doesn't change the actual behavior. The job will upload to nightly
repo only when triggered from schedule pipelines. I repeat, nothing changed.

What is new is that the .flatpak bundle now is an artifact from dist job, since:
- Despite the name, it isn't a real bundle, so no need to be only in gimp stage
- In dist, it reduces storage use because only the .flatpak file lasts 8 days,
  not the .tar and other files from gimp job which lasts 2 days (5495483c)
2024-05-26 13:48:28 -03:00
Bruno Lopes 445def2109 gitlab-ci: Align again the logical operator '&&' in dev-docs 2024-05-26 10:50:32 -03:00
Bruno Lopes 0199faac2c gitlab-ci, build: Make DWARF (.debug) symbols splitting an Installer only script
Splitted .debug are not needed by crossbuilds, and breaks .msix certification.
2024-05-24 13:11:18 +00:00
Bruno Lopes edddb83784 build/windows: Fixes and cleanup to native scripts
Previous changes broken local building courtesy and probably DirectInput too.
Noticed that the universal variables can not work in some contexts, fixed.

Also, done some little cleanups.
2024-05-21 22:59:44 +00:00
Bruno Lopes 75f59c7602 gitlab-ci: Remove unnoticed keyword by fdc2f080 2024-05-16 14:00:46 -03:00
Bruno Lopes fdc2f080a8 gitlab-ci, build/windows: Make crossroad scripts self-contained
This make them easier to understand and to run local, as we do with native ones

(They can't be run local yet, further changes will try to acomplish this a bit)
2024-05-16 10:05:38 -03:00
Bruno Lopes b42b18de24 gitlab-ci: Re-enable pkg caching for deps-*cross job
Reintroduce pkg caching for crossroad. The possibility of using it is one
in thousands since we don't have distributed cache, but it's better than
rely totally on MSYS2 mirrors, which can be be extremely sick sometimes.
2024-05-15 19:29:07 -03:00
Jacob Boerema 64b9a00484 plug-ins, ci: add basic support for junit reports for...
file plug-in testing.
The name and location of the xml results will be the same as for the
log file, but with the extension replaced by .xml.

Just some basic support is added which adds failed testcases when
a plug-in has a failure result, which should be the most common
case of failures.
Not all cases where we make errors in our test setup will generate
failed testcases yet, although they should show up in the number of
failures.
Disabled tests won't show up as skipped tests.
We also don't track time.
2024-05-04 19:06:38 +00:00
Bruno Lopes e96494d5a3 build/linux: Re-enable ccache in Flatpak builds
The move to Clang in 85ed2847 didn't take into account caching,
Now, this is fixed or, better saying, reintroduced(?): e545116b

Also, flatpak-builder output was confined to the .log file to make
possible checking the end of the CI output, which was being cut.
2024-05-02 08:58:29 -03:00
Bruno Lopes 17ae809fd6 gitlab-ci: Fix Installer job using cache 2024-04-30 18:01:29 +00:00
Bruno Lopes 91811c4638 gitlab-ci: Improve the order of beginning of .yml
Pure cosmetical change to more linear reading. This makes related Keywords
more closer to each other.
2024-04-30 18:01:29 +00:00
Bruno Lopes aef0348229 gitlab-ci: More little fixes regarding 'file-plug-in-tests' 2024-04-30 18:01:29 +00:00
Bruno Lopes e2b77df5a2 gitlab-ci: Update cppcheck exclude dirs
To follow the latest changes (e.g. cross 32-bit drop).
2024-04-30 18:01:29 +00:00
Bruno Lopes b080180955 gitlab-ci: Little changes in 'file-plug-in-tests' for consistency
Some details went unnoticed by me when reviewing the MR,
so Jacob authorized me to fix them separately.
2024-04-28 23:34:06 +00:00
Jacob Boerema 3478e1c00f plug-ins: add file-plug-in testing framework
Copied over from the original separate work in:
https://gitlab.gnome.org/Wormnest/gimp-file-plugin-tests
After that further improved and changed and added more file format
tests.

Added meson.build files to integrate it in our build, but we do not
install it for releases.
2024-04-26 12:28:47 -04:00
Bruno Lopes ab4267d620 gitlab-ci: Fix custom builds being interrupted
This regression was added by c064148a and it's similar to fb7a9954. Now, that
we are using 'interruptible: false' in custom rules, this is probably fixed.

Also, organize a bit better some pipelines with official GitLab .yml wizardy.
I was hesitating to use "<<: *" since this creates a new layer of complexity,
but this was the better way and the trick have a distinct marking by the way.
2024-04-25 19:03:12 +00:00
Bruno Lopes 5495483c76 gitlab-ci: Unify artifacts 'expire_in' time a bit more rationally
For our two "development" sub-stages, the expiration is as follows:
The 'dependencies' stage artifacts continues to expire in 2 hours.
Now, all 'gimp' ones expires in 2 days (to avoid time zone limbo).

For "stage"/tests and "production"/dist, the expire time depends
on the source of the CI pipeline. If the artifact is oriented to a
'short-span' source (e.g. MRs and commits), it expires in 2 days.
If is oriented to a 'LONG-span' one (e.g. web, schedule), 8 days
(we choose 8 to have a +1 day artifact just in case if something
goes wrong in the weekly schedule day, which isn't rare actually).
2024-04-24 18:35:56 +00:00
Bruno Lopes f40ecca648 gitlab-ci, build: Enable ccache for win crossbuilds
Due to design, crossroad install everything in the same prefix. So, let's
drop the pkg caching (.cache) and reuse ccache path inherited from .default.
2024-04-23 14:08:55 +00:00
Bruno Lopes bffe62d43e gitlab-ci, build: Drop custom "CI_*" variables
Let's figure out what job is running using the predefined GitLab variables.
2024-04-23 13:20:29 +00:00
Bruno Lopes 42356db4b4 gitlab-ci, build: Clarify DWARF debug symbols "extraction"
Partially reverts af79bbe0 (regarding .debug "extraction" in cross builds)

Now, we call the split debug script from the main bundling script, which makes
similar to our macOS .app bundling script. This cleans a bit of code in .yml
and make things clearer to the mere mortals in the scripts.
2024-04-23 07:53:48 -03:00
Bruno Lopes 8ef4b40c8c build/windows: Fix Installer after native x64 and arm64 TWAIN drop
Native arm64 and x64 TWAIN binaries are not built anymore. No need to
discard at dist time what doesn't exist. (32-bit TWAIN not affected)

Also, start to using our own ARM64 runners to do the dist. This is more
reliable since the shared x64 runners can (and indeed) cause long queue.
2024-04-22 18:52:25 +00:00
Bruno Lopes 28ba5d6918 gitlab-ci: Silence universal variables
They were generating a distracting output in CLANG* shells, as noted by
@lillolollo in a comment from MR: Infrastructure/gimp-web-devel!65

In the process, make AppImage and Windows (native) scripts use these
variables, without hardcoding the same variables from .yml anymore.
2024-04-22 13:22:31 +00:00
Jehan 2f9881c03f build, tools, gimp-data: removing gimp_exe_config_dir from the root meson.build.
Creating a temporary config directory for the in-build GIMP (run as a tool or
for unit-testing) is not done as a build target anymore, but in the
in-build-gimp.sh script as a unique temp directory, then cleaned out on exit.
This has a few advantages:

- It is properly cleaned out once the build ends (instead of leaving a full
  config dir as trash inside the build dir).
- It is not reused from one build to another (with risk of carrying bugs and
  issues over).
- Every use of the in-build GIMP will have its own config directory, and in
  particular when they are called in parallel.

As a side update, make sure that all `gimp_exe` runs depend on
`gimp_exe_depends`.
2024-04-21 20:43:29 -03:00
Bruno Lopes 37045e477b gitlab-ci, build/windows: Add MS Store job to CI
The new dist job can produce two artifacts: a *.msixupload file
ready for submission and/or a *.msixbundle only for testing.

See the commit about the script for more details.
2024-04-21 18:15:18 -03:00
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