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

GitHub Action to automatically generate a ZIP with the files+MSI every push #268

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sylikc
Copy link

@sylikc sylikc commented Feb 6, 2023

Alexander, as requested in #241, I've come up with a GitHub workflow that will automatically build the MSI/ZIP for Windows.

It looks like I still needed to make the patch to the autogen.sh similar to #189 . See line 84 in the workflow file.

Let me know what you think. I can patch the version information to your preference if you want unofficial releases to show different version numbers in the about box, similar to what I do on JPEGView

Linux stage

  • MXE build working, can't use a pre-compiled package as Spek needs to patch ffmpeg
  • it takes over ~2 hours to build, so added cache action size = ~2GB... GitHub has a 10GB limit per repo
  • Depedencies for MXE are the same to build Spek
  • Still had to use fix, paths are tweaked from A guide for building Windows executable  #189
  • Upload the build artifact for the second stage to use. This includes the windows binary, wxs, and tests

Windows stage

  • Restore the artifacts from the first stage into the right paths, includes all the files needed to continue the build
  • Setup WiX, and call build.bat
  • Upload the MSI Artifact along with the binary files (this is what someone would actually want to download)

* MXE build working, can't use a pre-compiled package as Spek needs to patch ffmpeg
* it takes over ~2 hours to build, so added cache action size = ~2GB... GitHub has a 10GB limit per repo
* Depedencies for MXE are the same to build Spek
* Still had to use fix, paths are tweaked from alexkay#189
* Upload the build artifact for the second stage to use.  This includes the windows binary, wxs, and tests
* Restore the artifacts from the first stage into the right paths, includes all the files needed to continue the build
* Setup WiX, and call build.bat
* Upload the MSI Artifact along with the binary files (this is what someone would actually want to download)
* Remove/update some of the debug statements.  Probably still important to keep most of them.
* Update the output paths so the output is tweaked
run: |
# patch autogen.sh -- similar to https://github.com/alexkay/spek/issues/189
# https://superuser.com/questions/422459/substitution-in-text-file-without-regular-expressions/422467#422467
sed -i "s|autoreconf -fiv|autoreconf -fiv -I ../mxe/usr/x86_64-w64-mingw32.static/share/aclocal/|g" autogen.sh
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right here, I had to patch the autogen.sh

@alexkay
Copy link
Owner

alexkay commented Feb 6, 2023

@sylikc, this looks great, thank you so much! Give me a few days to review.

@Barough
Copy link

Barough commented Feb 9, 2023

GitHub Action Builds at each commit/push,,,,,, ain't that a bit overkill. Shouldn't this build option be set off manually.

@sylikc
Copy link
Author

sylikc commented Feb 9, 2023

it can be set that way. But I think only the repository owner can kick off the build, which makes it only semi-automated.

The build time is actually pretty quick though, because MXE is already cached, the average build time is about 6min.

The first build of MXE takes 2h, but that's only done once, and cached for 30d. It also means that if the builds aren't initiated often enough, the rebuild of MXE might have to happen.

@sylikc
Copy link
Author

sylikc commented Oct 7, 2023

@sylikc, this looks great, thank you so much! Give me a few days to review.

@alexkay do you want to merge this in so that Spek gets built with your changes?

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.

3 participants