Cache actually contains all files from bindings directory (both source
and object ones) and is extracted after checkout, so it overwrites
checked out sources, and thus prevents correct cache update.
Note that sources should be kept in cache, as removing them will cause
bindings to be always recomiled (both in bindings and IDE compile jobs).
It takes long time and thus undesirable.
So now a separate cache clearing job is automatically run if (and only
if) any file in bindings is changed.
Such two-job architecture allows to automatically update cache and at
the same time populate it in case of its absence (e. g. in new merge
requests).
Note that simply doing full cache rebuild if any file in bindings is
changed is not enough as this job will not be triggered e. g. for a new
merge request (if it does not modify bindings) and will cause IDE
compile jobs for it to fail. GitLab CI currently does not support
conditions for triggering a job if a cache is missing.
The reason Qt widgetset was not enabled: high build times (24-25 min). Other targets take 4-5 min each and updating build environment image process takes 19 min.
1. Added Dockerfile.buildenv to generate build environment image. It is based on Debian 11 x86_64 (contains GTK2, GTK3, Qt5 libraries and FPC (versions 3.2.0, 3.2.2) for x86_64-linux with x86_64-win64 and i386-win32 cross-compilers.
2. New CI configuration with jobs to build Lazarus with both FPC versions for x86_64-gtk2, x86_64-qt5, x86_64-win64, i386-win32. Also there is a job to update build environment image, which should be only run when Dockerfile.buildenv and/or FPC version constants in .gitlab-ci.yml file were updated.
All jobs were set to manual (don't trigger automatically) mode for now.