Fix lazbuild-backend CI: propagate defines, GUI toggle, GTK2, dedup - #102
Merged
Conversation
Bring the CI make driver in line so the lazbuild backend behaves like the fpc backend, and so the GUI test project no longer breaks non-Linux jobs. - Propagate MAKE_DEFINES to dependency packages under lazbuild. lazbuild applies --opt only to the top-level project; its --recursive rebuild compiles required packages with their own options, so the defines never reached them. Inject the defines into the fpc.cfg found via `fpc -va` before building and strip it afterwards, so every fpc invocation lazbuild spawns inherits them. Gated on the lazbuild backend with a non-empty MAKE_DEFINES; fail-fast if fpc.cfg cannot be located. The redundant lazbuild --opt define path is removed. No-op on the fpc backend, which already injects -dNAME per compile. - Install GTK2 dev libraries for the GUI link. Under lazbuild the LCL/GUI test project links against the GTK2 widgetset, whose dev libs are not preinstalled on the GitHub runners. Add ci_install_lcl_gui_deps (libgtk2.0-dev), called from native-build.sh and double-gated on the lazbuild backend and Linux. - Add the MAKE_LAZBUILD_GUI toggle (default false). Only meaningful under lazbuild - the fpc backend has no widgetset and always skips GUI projects. When false, GUI projects are skipped under lazbuild too, opting out of the per-platform widgetset toolchain (GTK2/X11 on Unix, cocoa on macOS). Wired through every job like MAKE_BUILD_BACKEND. - Fold the two identical GUI-handling blocks in BuildAllProjects and RunBenchmarkProjects into a single TryHandleGuiProject helper. make.pas compiles clean; make.yml is valid; the fpc backend is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bring the CI make driver in line so the lazbuild backend behaves like the fpc backend, and so the GUI test project no longer breaks non-Linux jobs.
Propagate MAKE_DEFINES to dependency packages under lazbuild. lazbuild applies --opt only to the top-level project; its --recursive rebuild compiles required packages with their own options, so the defines never reached them. Inject the defines into the fpc.cfg found via
fpc -vabefore building and strip it afterwards, so every fpc invocation lazbuild spawns inherits them. Gated on the lazbuild backend with a non-empty MAKE_DEFINES; fail-fast if fpc.cfg cannot be located. The redundant lazbuild --opt define path is removed. No-op on the fpc backend, which already injects -dNAME per compile.Install GTK2 dev libraries for the GUI link. Under lazbuild the LCL/GUI test project links against the GTK2 widgetset, whose dev libs are not preinstalled on the GitHub runners. Add ci_install_lcl_gui_deps (libgtk2.0-dev), called from native-build.sh and double-gated on the lazbuild backend and Linux.
Add the MAKE_LAZBUILD_GUI toggle (default false). Only meaningful under lazbuild - the fpc backend has no widgetset and always skips GUI projects. When false, GUI projects are skipped under lazbuild too, opting out of the per-platform widgetset toolchain (GTK2/X11 on Unix, cocoa on macOS). Wired through every job like MAKE_BUILD_BACKEND.
Fold the two identical GUI-handling blocks in BuildAllProjects and RunBenchmarkProjects into a single TryHandleGuiProject helper.
make.pas compiles clean; make.yml is valid; the fpc backend is unchanged.