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

Use native OS build workers #962

Merged
merged 4 commits into from
Mar 4, 2023
Merged

Conversation

smlx
Copy link
Contributor

@smlx smlx commented Mar 1, 2023

This PR updates the Github build and release workflows to be OS-native: macOS binaries built on macOS, and Linux binaries built on Linux.

It also updates the build target in the Makefile to handle the split goreleaser configuration.

It should fix the issue described in #961

smlx added 2 commits March 1, 2023 09:53
This split is required because the hidraw tag and CGO is required for
linux builds. This is a requirement of the go-u2fhost dependency. See
https://github.com/marshallbrekka/go-u2fhost#linux for details.

Similarly, macOS binaries must be built on macOS.

This change also updates the github workflows to support the new split
goreleaser config.
@smlx
Copy link
Contributor Author

smlx commented Mar 1, 2023

cc @mapkon

@mapkon mapkon requested a review from wolfeidau March 1, 2023 02:06
Copy link
Contributor

@mapkon mapkon left a comment

Choose a reason for hiding this comment

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

Thank you for the PR - but I don't think it is ready yet.

It looks like the split is not working properly - please see the output from a scratch repo I created here: https://github.com/mapkon/go-releaser-tinker/actions/runs/4319873504/jobs/7539569017

It appears that the second release (macos-latest) attempts to (re)upload the go-releaser-tinker_0.1.0_checksums.txt file, leading to this error:

  ⨯ release failed after 12s                 
error=scm releases: failed to publish artifacts: failed to upload go-releaser-tinker_0.1.0_checksums.txt after 1 tries: 
POST https://uploads.github.com/repos/mapkon/go-releaser-tinker/releases/94362976/assets?name=go-releaser-tinker_0.1.0_checksums.txt: 422 Validation Failed 
[{Resource:ReleaseAsset Field:name Code:already_exists Message:}]

Error: The process '/Users/runner/hostedtoolcache/goreleaser-action/1.15.2/x64/goreleaser' failed with exit code 1

Can you take a look?

@@ -34,3 +34,5 @@ archives:
files:
- LICENSE.md
- README.md
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_linux_windows_checksums.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to just use the "{{ .ProjectName }}_{{ .Version }}_checksums.txt" to cater for Windows and Linux?

CC: @wolfeidau

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I've made the change

@smlx
Copy link
Contributor Author

smlx commented Mar 3, 2023

Sorry about the bug - I've tested a few times and should be fixed now.

@mapkon
Copy link
Contributor

mapkon commented Mar 3, 2023

Sorry about the bug - I've tested a few times and should be fixed now.

No worries! Will take a look at the earliest opportune time.

@mapkon mapkon merged commit fffbbae into Versent:master Mar 4, 2023
@smlx smlx deleted the split-build-workers branch March 7, 2023 03:42
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