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

ci: Add workflow to build and issue static binaries #84

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

mtardy
Copy link
Contributor

@mtardy mtardy commented Mar 18, 2023

The workflow builds natively for amd64 with LLVM library and use emulation to build for arm64 with LLVM as well. The result are two static binaries with their respective compressed archives.

You can see how the workflow acts on my fork, and how the result release page looks (the release has been published here, the action just creates a draft).

Honestly, GitHub action and cross-compilation/emulation (I tried both) were a bit hard to get right with the LLVM library, it took me something like 10 hours and 70 attempts + all the tests locally on amd64 and arm64.

@mtardy
Copy link
Contributor Author

mtardy commented Mar 20, 2023

Example of workflow with the tests running.

(I removed the cache thingy)

.github/workflows/release.yaml Outdated Show resolved Hide resolved
.github/workflows/release.yaml Outdated Show resolved Hide resolved
.github/workflows/release.yaml Outdated Show resolved Hide resolved
.github/workflows/release.yaml Outdated Show resolved Hide resolved
.github/workflows/release.yaml Outdated Show resolved Hide resolved
.github/workflows/release.yaml Outdated Show resolved Hide resolved
.github/workflows/release.yaml Outdated Show resolved Hide resolved
@qmonnet
Copy link
Member

qmonnet commented Mar 20, 2023

Thanks a ton for this workflow!!

@mtardy mtardy force-pushed the release-workflow branch 2 times, most recently from c912ecf to a6d0e07 Compare March 21, 2023 09:41
@mtardy
Copy link
Contributor Author

mtardy commented Mar 21, 2023

Thanks a ton for this workflow!!

Hey! I think I addressed your feedback.

@mtardy mtardy requested a review from qmonnet March 21, 2023 09:44
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Thanks! Please find some comments in the discussions above, and one more nit below.

.github/workflows/release.yaml Outdated Show resolved Hide resolved
The workflow builds natively for amd64 with LLVM library and use
emulation to build for arm64 with LLVM as well. The result are two
static binaries with their respective compressed archives.

Signed-off-by: Mahe Tardy <[email protected]>
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Everything looks in order, thanks again!

Do you have a final test run to confirm that $(HOSTAR) behaves as expected?

@mtardy
Copy link
Contributor Author

mtardy commented Mar 21, 2023

Everything looks in order, thanks again!

Do you have a final test run to confirm that $(HOSTAR) behaves as expected?

Yep it does work! perfect!

@qmonnet
Copy link
Member

qmonnet commented Mar 21, 2023

Right I found this test, OK thanks a lot!

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