Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static wxwidgets to mac installation in github actions #476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EdwinB12
Copy link

This PR adds WXWidgets as a static library for the MacOS build with github actions.

Three files are changed:

  • tools.yml : Following instructions on wxwidgets webpage, a static version of the wxwidgets is built.
  • configure.ac : Setting an IS_MAC variable ; similar to IS_WIN32
  • Makefile.am : Some logic to perform to handle libraries differently depending on the OS. There may be a better way of writing this logic. .

I've manually tested this by opening the GUI on Macos 13 (and Ted tried on Macos14). GUI opens without a previous wxwidgets installed via brew. I don't have familarity with the software to test further but it appears to work as desired. I see the same behaviour on windows. I haven't tested to linux installation.

Hope this is helpful! :D

@tturocy
Copy link
Member

tturocy commented Jan 13, 2025

Thanks for looking into this!

This actually is the solution we originally considered and rejected. The problem is this builds wxWidgets every time the action is triggered, and that's unreasonably expensive.

We had been thinking about considering a way to use artefacts. But now looking at this again fresh - isn't maybe the best solution just to trigger the static build on release? We already have this done for building Python wheels - see wheels.yml. Is that the sensible way to do this as well? That seems a lot less hacky and fragile than relying on an artefact being built somewhere.

We shouldn't need to change configure.ac and Makefile.am, because the configure script already has a --with-wxdir= option that points to an uninstalled build of wxWidgets. So I think it would just be enough to do ./configure --with-wxdir=wxWidgets-3.2.6/build-release (or similar) when configuring Gambit in the action.

@EdwinB12
Copy link
Author

I agree, triggering the static build on release only would be a clean solution.
I did look into cacheing artefacts briefly but didn't love the idea

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.

2 participants