Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Circleci windows build config #281

Closed

Conversation

dkujawski
Copy link

In response to #119

I was working on this before you guys shut things down and lost track of things in the shuffle. I was doing some build related work in this area and picked it back up. I lost my CircleCI access so unable to fully test recent changes. But this config was working when I tested it a month or so ago.

You don't need to build on a Windows machine, this works building in the same Linux environment that the the Linux build runs. The previous issues with dependencies not being included seems to have been related to how the Go vendor logic is built to be shallow. See: https://github.com/nomad-software/vend

The build process uses the wixl command from MSITools to generate the MSI file using the spec defined in the WindowsMSI.wsx file in the repo root. See: https://wiki.gnome.org/msitools

It outputs a raw executable file along with an MSI. The MSI will install the exe file into the Windows AppDataFolder for the user, update the Path environment variable and set appropriate values for uninstall etc.

I followed existing patters in the .circleci/config.yml file to include the Windows build artifacts in the github-release process.

The Windows MSI build process is sensitive to version strings and requires semantic versioning. Instead of doing fancy regex and parsing to extract the information from the git describe --tags --always --dirty="-dev" output I just set it in a version text file that gets parsed in the Makefile logic. There is opportunity here to leverage github actions to keep the version file contents up to date as tagging happens. Currently the contents of this file are static and needs to be updated to follow the current build version.

Another reason for the version file to exist, not related to CircleCI, but AWS CodePipeline processes were choking due to limited git metadata being available for various reasons. The git describe command was failing. Need to put a bunch of workarounds in place to get that working.

Just dropping this here just in case you guys want to include it. I am not waiting for it. We have our own build process running in AWS for the Windows stuff. Just being a "good citizen" and passing it your way since the conversation was open.

Happy to answer any questions,

-Dave

Adding makefile recipes for windows build
Adding text file to store semantic version string for windows WiX MSI build
Adding CircleCI config updates for windows build
@nickatsegment
Copy link
Contributor

Hey @dkujawski, thanks for this. I'm sure some Windows folks will find it useful. As you know, we're shutting down. Looks like the community is rallying behind aws-okta/aws-okta so you might want to cross-post there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants