Skip to content

CI: fix first-build header ordering and stage libzstd.a for Android - #240

Merged
nmfisher merged 2 commits into
filament-v1.75.0from
asb/fix-ci-builds
Aug 15, 2026
Merged

CI: fix first-build header ordering and stage libzstd.a for Android#240
nmfisher merged 2 commits into
filament-v1.75.0from
asb/fix-ci-builds

Conversation

@nmfisher

@nmfisher nmfisher commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Fixes two CI failures on filament-v1.75.0.

Failure 1 — flutter-builds Linux/Windows: bluevk/BlueVK.h not found

The plugin CMake configure runs before the in-build hook step that extracts the Filament headers from the R2 artifact and writes .dart_tool/generated_headers.cmake. On a fresh checkout the first flutter build windows/flutter build linux therefore configures with an empty DART_PKG_HEADERS and the plugin compile fails on bluevk/BlueVK.h (ninja even reports "File modified during build" because the hook writes the file mid-build).

Fix: fire the build hooks out of band first by running the thermion_flutter unit tests before the Windows/Linux example builds — the macOS job already did this. The artifact header dir and generated_headers.cmake then exist before configure. Also:

  • register generated_headers.cmake as a configure dependency in the Linux plugin CMakeLists (Windows already had it), so cmake auto-reconfigures once the hook writes it
  • add libegl1/libegl1-mesa-dev/libc++-dev/libc++abi-dev to the Linux deps (same set run-dart-tests.yml installs) for the hook link and the previously unreached plugin link stage (-l:libc++.a, -lEGL)

Failure 2 — Android link: unable to find library -lzstd

scripts/build_android.sh skipped *zstd* archives when copying Filament libs, so the R2 android artifact ships without libzstd.a, while thermion_dart links -lzstd explicitly (libfilamat.a has undefined zstd symbols as of Filament 1.75.0 — see the note in zip_android.sh). Removed the skip in both the release and debug copy blocks so libzstd.a is staged.

The Build Filament workflow is triggered on this branch (android only, upload to R2) to rebuild the R2 android artifact with libzstd.a included.

🤖 Generated with Claude Code

Verified status (run 31863717801)

Job Result
flutter-builds Linux ✅ pass
flutter-builds Windows ✅ pass
dart-tests Windows ✅ pass
flutter-builds macOS ❌ fail — expected
dart-tests Linux (golden) ❌ fail — expected

Both remaining failures are unrelated to this PR's code changes:

  • macOS: the job builds the Android example, and the Android link still fails with unable to find library -lzstd. This uses the old R2 android artifact, which predates the libzstd.a staging fix here. The "Build Filament" rebuild (run 31860021416) is currently running and will publish a new R2 android artifact that includes libzstd.a; macOS should pass once it completes and is re-run.
  • dart-tests Linux golden: golden comparison fails because this branch predates the golden pin commit df0389d4 on filament-v1.75.0 — output/golden sets don't match. Will be resolved by rebasing on filament-v1.75.0, not by changes in this PR.

nmfisher and others added 2 commits August 15, 2026 04:55
Failure 1 (flutter-builds Linux/Windows): the plugin CMake configure runs
before the in-build hook step extracts the Filament headers from the R2
artifact and writes generated_headers.cmake, so DART_PKG_HEADERS is empty
and the plugin compile fails on bluevk/BlueVK.h. Fire the build hooks out
of band first by running the thermion_flutter unit tests before the
Windows/Linux example builds (macOS already did this), so the header dir
and generated_headers.cmake exist before configure. Also register
generated_headers.cmake as a configure dependency in the Linux plugin
CMakeLists (Windows already had it) and install the EGL/libc++ dev
packages the hook link and plugin link stage need on Linux.

Failure 2 (Android link): build_android.sh skipped *zstd* libs when copying
Filament archives, so the R2 artifact ships without libzstd.a and
thermion_dart fails to link with 'unable to find library -lzstd'
(libfilamat.a has undefined zstd symbols as of Filament 1.75.0 — see
zip_android.sh). Copy all archives including libzstd.a in both the
release and debug blocks.

Co-Authored-By: Claude <noreply@anthropic.com>
The Ninja generator rejects the build: 'generated_headers.cmake is
defined as an output multiple times' — flutter's linux configure
processes the plugin scope in a way that registers the file twice, so
build.ninja becomes invalid and the configure fails. The out-of-band
hook priming step in run-flutter-builds.yml is the actual ordering fix;
the Windows CMakeLists keeps the property (VS generator, verified green).

Co-Authored-By: Claude <noreply@anthropic.com>
@nmfisher
nmfisher merged commit 185044f into filament-v1.75.0 Aug 15, 2026
9 of 10 checks passed
@nmfisher
nmfisher deleted the asb/fix-ci-builds branch August 15, 2026 06:43
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