ci: inherit Windows PATH in MSYS2 shell for Wails GUI build#209
Merged
Conversation
Without -linkmode external, Go silently ignored -extldflags=-static, so
the Wails GUI exe still imported libstdc++-6.dll and libwinpthread-1.dll
and failed verify-windows-gui-dlls. The trailing -Wl,-Bdynamic in
CGO_LDFLAGS also reverted later libs to dynamic linking. Run the build
under msys2 {0} so the MINGW64 gcc is unambiguously on PATH, mirroring
the working CLI build.
The msys2 {0} shell uses a clean PATH by default, so wails (installed
via go install into the Windows GOPATH/bin) and go itself were not
visible, breaking the build with 'wails: command not found'. Set
path-type: inherit on setup-msys2 so the Windows PATH is preserved.
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.
Summary
Follow-up to #208. The Wails GUI build now runs under
shell: msys2 {0}, but that shell starts with a clean MSYS2-only PATH by default. Result:wails(installed viago installinto the Windows GOPATH) andgoitself aren't on PATH, so the step fails withwails: command not found.Setting
path-type: inheritonsetup-msys2preserves the Windows PATH inside the msys2 shell, makinggoandwailsvisible while still keeping the MINGW64gccprecedence we need for static linking.Changes
dev-build.ymlbuild-gui-windows: addpath-type: inheritto setup-msys2.release.ymlWindows GUI build: same.Test plan
build-gui-windowsjob in dev-build runswails buildsuccessfully.verify-windows-gui-dllsstill passes (nolibstdc++-6.dll/libwinpthread-1.dll).