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

Feat: static release ci #123

Merged
merged 6 commits into from
Dec 21, 2023
Merged

Feat: static release ci #123

merged 6 commits into from
Dec 21, 2023

Conversation

gluax
Copy link
Contributor

@gluax gluax commented Dec 11, 2023

Motivation

For the release CI to release statically built binaries and leverage pre-built binaries for release docker images to save CI time.

Explanation of Changes

Updates Dockerfile.static to use go 1.21, which cosmos SDK 0.50 requires.
Removes the Dockerfile.node-static since using a static file in Docker doesn't matter.
Adds a Dockerfile.build-static which compiles the chain statically for both amd and arm.

Modifies the Release pipeline in the following ways:

  • Uses the build static docker image to build the binaries. I tried really hard to get statically compiling CGO to work outside of an alpine image. CGO was unhappy no matter what I did, so I gave up.
  • Removes goreleaser; unfortunately, it didn't support cross-compiling CGO as far as I could determine.
  • Releases the static binaries for amd and arm(linux only).
  • Leverages those already-built binaries to release the docker image as well(cuts CI time down to about 8minutes).

Testing

I tested the CI in a forked version and ensured it ran successfully and releases. I tested the binary itself and the docker image as much as possible. However, it failed to join devnet, and I think this is because the binary is the new SDK version.

Related PRs and Issues

Closes #105.
Closes #106.

@hacheigriega
Copy link
Member

I guess this will fail once #117 is merged because it involves a private repo?

@gluax
Copy link
Contributor Author

gluax commented Dec 11, 2023

I guess this will fail once #117 is merged because it involves a private repo?

@hacheigriega most certainly lol. Unless we figure out go pulling a private dep within CI. Same reason the e2e tests prob fail for that branch yea?

@hacheigriega
Copy link
Member

I guess this will fail once #117 is merged because it involves a private repo?

@hacheigriega most certainly lol. Unless we figure out go pulling a private dep within CI. Same reason the e2e tests prob fail for that branch yea?

Yep. 🥲

@gluax gluax force-pushed the feat/static-release-ci branch from f1aacef to aecd1fb Compare December 21, 2023 09:09
@gluax gluax merged commit aecd1fb into main Dec 21, 2023
5 of 6 checks passed
@gluax gluax deleted the feat/static-release-ci branch December 21, 2023 09:27
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.

🔧 Change Released Binaries to be Static Builds 🔧 Docker Leverage Pre Built Binaries From Release CI
2 participants