Repository navigation
Conversation
Native-asset build hooks (e.g. window_manager 0.6 -> cnativeapi) compile C++ during `flutter test`, which failed on the bare runner for lack of GTK/X11/Xi headers. Move the apt package list to setup/scripts/install-linux-deps.sh, shared by the build action's Linux target and a new `linux-native-deps` input on setup, which ci.yml's test job enables. Add libx11-dev and libxi-dev.
Flutter coverage✅ Patch coverage is 100.00% (no changed executable lines found; target 80%). Flags (1)
Generated by Coverage Action |
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.
Problem
Dart build hooks (native assets) also run during
flutter test.window_manager0.6.0 →nativeapi→cnativeapicompiles C++ and callspkg-config --cflags gtk+-3.0 x11 xi, so thetestjob inci.ymlfails on the bareubuntu-latestrunner. Linux builds passed only becausebuild/action.ymlinstalled the apt packages itself.Change
setup/scripts/install-linux-deps.sh, and addlibx11-devandlibxi-devto it.setup: new inputlinux-native-deps(default"false"). It is skipped on runners that aren't Linux.build: the Linux target runs the same script throughgithub.action_path/../setup/scripts/, the same way it already reachesresolve-version.sh.ci.ymltestjob: passeslinux-native-deps: true.analyzeis unchanged, so it doesn't pay the install time.internal-test.yml: newtest-setup-linux-native-depsjob. It asserts thatpkg-config --cflags gtk+-3.0 x11 xiandclang++both succeed after./setup.New input, default off. Not a breaking change.
cd.ymlcd.ymldoes not run tests. Its Linux build callsdotactions/flutter/build@main, which now runs the shared script, so it uses the same package list. No separate fix is needed there.Notes
test-ciininternal-test.ymlruns main'ssetup@main. Until this PR is merged and released, that job passes an input main doesn't know yet. GitHub warns about it and does not fail. The newtest-setup-linux-native-depsjob covers the actual install from this branch.actionlintis clean.zizmor's only new findings came from the new test job:artipacked(fixed withpersist-credentials: false) andself-repositoryon./setup. I left the second one so the job matches the existing./<action>convention.