Skip to content

Fix lazbuild-backend CI: propagate defines, GUI toggle, GTK2, dedup - #102

Merged
Xor-el merged 1 commit into
masterfrom
refactor/ci-fixes
Jul 25, 2026
Merged

Fix lazbuild-backend CI: propagate defines, GUI toggle, GTK2, dedup#102
Xor-el merged 1 commit into
masterfrom
refactor/ci-fixes

Conversation

@Xor-el

@Xor-el Xor-el commented Jul 25, 2026

Copy link
Copy Markdown
Owner

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.

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.
@Xor-el
Xor-el merged commit e4f65a0 into master Jul 25, 2026
28 checks passed
@Xor-el
Xor-el deleted the refactor/ci-fixes branch July 25, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant