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

build binaries on Actions #469

Merged
merged 8 commits into from
Nov 28, 2024
Merged

build binaries on Actions #469

merged 8 commits into from
Nov 28, 2024

Conversation

jurica
Copy link
Member

@jurica jurica commented Nov 23, 2024

No description provided.

@jurica jurica linked an issue Nov 23, 2024 that may be closed by this pull request
3 tasks
@tjex
Copy link
Member

tjex commented Nov 25, 2024

eyyyy! He's back (as promised). That's cool ❤️

Have you been able to test the build actions somehow? I see this mentioned in the issue thread now 👍

Also, there was one entry in the Makefile for Alpine that didn't get deleted. Was it missed, or should it stay in the Makefile for some reason?

@jurica
Copy link
Member Author

jurica commented Nov 25, 2024

Have you been able to test the build actions somehow? I see this mentioned in the issue thread now 👍

Yeah sorry, I decided to put all relevant information to the issue only to not have to repeat myself all over in the two PRs.

Also, there was one entry in the Makefile for Alpine that didn't get deleted. Was it missed, or should it stay in the Makefile for some reason?

My idea was to keep the Makefile for local development and I only removed "release related" stuff. So I left the alpine target in there on intention, as it has the additional "-extldflags=-static" flag.

@tjex
Copy link
Member

tjex commented Nov 26, 2024

Ah yes, of course. One other thing is that the action shouldn't be triggered on push. I'm just shooting this as a quick message, but can make the change later this eve.

And have just seen when updating the branch, that the linux builds failed (as the action ran on push). I haven't looked into why. But will also do so, unless there's an update from your side here.

Thanks again, this is such a massive workflow optimisation!

@jurica
Copy link
Member Author

jurica commented Nov 26, 2024

Can you please post a link to the failed build, I cannot find it… Nevermind, I was just too blind on my smartphone...
The build failed because it tried to pull the docker image from your account. That's not what I intended to do, I'll check if this can be changed. I wanted to pull images from the org, I missunderstood the actions variable I used here.

I wasn‘t exactly sure on the triggers, so I left it as it is and open for discussion. Please go ahead and adjust them as you want. I think a nightly build and build on push of a tag would be sufficient.

@tjex
Copy link
Member

tjex commented Nov 26, 2024

I'm thinking. Would it be fine to replace the upload-artefact step with action-gh-release and upload directly to the release?

Or is it better to have a separate workflow for this / add the binaries to the release manually?.. I'm not so versed with this area of github / CI.

Like this as an initial proof of concept: https://github.com/zk-org/zk/blob/actions-release/.github/workflows/release.yml

@jurica
Copy link
Member Author

jurica commented Nov 26, 2024

We could create a release on push of a tag, otherwise upload artifacts. That way a nightly or manual build would be possible and triggering a release would be just a matter of pushing a tag.

@tjex
Copy link
Member

tjex commented Nov 26, 2024

@jurica How does that look?

I wanted to get the version output from build-binaries to use in release action, so as to reuse variables and not risk mismatches.

So I figured to replace the steps in each build job too. I hope that works. Otherwise should be easily revertable. Tried to make the git commits clean for this.

.github/workflows/build-binaries.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
.github/workflows/release.yml Show resolved Hide resolved
@jurica
Copy link
Member Author

jurica commented Nov 26, 2024

@tjex look cool, but please check my comments.

I tried the single git describe approach as well, but it would need a little more effort to make it work (I squashed my ~40 commits before opening the PR).

@tjex
Copy link
Member

tjex commented Nov 27, 2024

@jurica Ok. That should all be implemented. One comment is still unresolved

Copy link
Member

@tjex tjex left a comment

Choose a reason for hiding this comment

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

So, lets see!

@tjex tjex merged commit 0d54913 into zk-org:main Nov 28, 2024
3 checks passed
@tjex
Copy link
Member

tjex commented Nov 28, 2024

Working :) https://github.com/zk-org/zk/actions/runs/12073672963/workflow

Two of the linux builds takes ages though! Funny that the alpine build takes the longest 🤷

@jurica
Copy link
Member Author

jurica commented Nov 28, 2024

Very nice, I like how that turned out. Thanks for your help and review!

Yeah the arm build for linux run on x86 machines and are emulated with qemu. So they are quite slow.
I was thinking about running them on docker on a mac instance, but then I would have needed to install docker through homebrew first and set everything.
But arm (based runners)[https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/] should be available soon, then it's just a matter of adjusting the workflow to execute the arm build on arm runners.

@tjex
Copy link
Member

tjex commented Nov 29, 2024

ahhh ok. Makes sense re the arm build.
And no worries, thanks for following through and coming back with the PR.
Will save us so much effort with releases.

@tjex tjex added this to the 0.14.2 milestone Nov 29, 2024
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.

Use GitHub Actions for building the project
2 participants