-
Notifications
You must be signed in to change notification settings - Fork 170
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
Update goreleaser to release statically linked binary #2560
Conversation
WalkthroughThe recent changes focus on two primary areas: updating the GitHub Actions workflow for releasing Umee and modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant DevOps as Developer/Operator
participant GitHub as GitHub Actions
participant GoReleaser as GoReleaser
participant System as Build System
DevOps->>GitHub: Push new tag
GitHub->>GoReleaser: Execute release process
GoReleaser->>System: Setup environment
System->>GoReleaser: Download libwasmvm_muslc.x86_64.a
GoReleaser->>System: Build with muslc flags and CC environment variable
GoReleaser->>GitHub: Release statically linked binary
GitHub->>DevOps: Notify release completion
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/release-umee.yml (1 hunks)
- .goreleaser.yml (2 hunks)
Additional comments not posted (6)
.goreleaser.yml (3)
9-9
: Good addition of pre-build hook.Adding a hook to download
libwasmvm_muslc.x86_64.a
ensures that the necessary library is available for static linking, directly supporting the PR's goal of creating a statically linked binary.
18-18
: Correct update to build flags.Including
muslc
in the build flags is crucial for static linking with musl libc, which is aligned with the PR's objective of simplifying binary deployment.
21-23
: Enhanced linking and environment configuration.The updates to
ldflags
and the setting of theCC
environment variable tox86_64-linux-gnu-gcc
are well-thought-out changes that enhance the build process and ensure the binary's compatibility and independence from dynamic libraries..github/workflows/release-umee.yml (3)
31-33
: Proper setting of environment variables.Setting the
COSMWASM_VERSION
environment variable is necessary to ensure that the correct version of the wasmvm library is used, which is crucial for the statically linked binary creation.
43-47
: Updated goreleaser action configuration enhances build reliability.Downgrading to
goreleaser-action@v5
and including--clean
in the arguments ensures a clean state for each build, which is crucial for avoiding issues with residual files from previous builds.
51-59
: Well-configured release step.The changes to use
goreleaser-action@v5
and the inclusion of--clean
along with updated release notes handling are well-thought-out adjustments that enhance the release process's reliability and documentation.
uses: goreleaser/goreleaser-action@v6 | ||
uses: goreleaser/goreleaser-action@v5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -14,10 +15,12 @@ builds: | |||
binary: umeed | |||
mod_timestamp: "{{ .CommitTimestamp }}" | |||
flags: | |||
- -tags=badgerdb ledger netgo | |||
- -tags=badgerdb ledger netgo muslc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why adding muslc? We release glibc compatible binaires.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this comment it's not possible to build a statically linked binary for glibc systems. Using muslc
seems to be the only way to create statically linked deterministic binaries.
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
closes: #2559
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit