-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a release build for the linux/arm64, darwin/amd64, and darwin/arm64 platform #130
Add a release build for the linux/arm64, darwin/amd64, and darwin/arm64 platform #130
Conversation
I think it's very bad UX that the user have to clone the repo and build dynamic library for binary execution. The intention of serving binary on release note is ready-to-run. So we need to discuss about simplifying that flow. |
The approach of cross-compiling for each platform on Linux was difficult for cases like LBM that required native compilation of C/C++. For this reason, I use compilers suitable for each OS to perform release builds. Along with this, the docker image for cross-compiling run from `make reproducible` and the shell script used for it are no longer required.
@tkxkd0159 And we may need to decide in how we're going to stay distributed.
|
@torao |
Yes, I think 3 or 4 is better too. 3 is the one with less difficulty, just more steps. How do you want to distribute them? @zemyblue |
I think 4 is better, but if impossible 3 option. |
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.
And please add changelog
RELEASE_CHANGELOG.md
Outdated
## [v0.8.0] | ||
|
||
### Features | ||
* [\#126](https://github.com/line/lbm/pull/126), [\#130](https://github.com/line/lbm/pull/130) Automatically generate a release note, linux/amd64 and linux/arm64 binaries on release |
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.
Please move to CHANGELOG.md
.
This RELEASE_CHANGELOG.md
is wrote when release.
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.
fixed, please check it
- name: "Upload artifact: compressed repository source" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: lbm-${{ env.VERSION }}.tgz | ||
asset_name: lbm-${{ env.VERSION }}.tgz | ||
asset_content_type: application/gzip |
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 do you need to upload compressed repo source? Because every github release already serve them by default.
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.
This release build process is based on Gaia's release.yml
and their release. Not a strong reason but creating the source archive separate from the auto-generated one has the following advantages.
- The checksum of the source archive can be described.
- It has been verified that the source archive can be expanded and built.
- It can be ensured that it doesn't contain unnecessary metadata such as
.git
.
The reasons why these are difficult with the source archive provided by default are:
- There is no
action
to retrieve the archive provided by default. It is therefore not possible to create a release build from the default archive (i.e., it cannot be verified as buildable). - Even if it were possible to retrieve the default archive, there is no
action
to rewrite the release description. Therefore, before runningcreate_release
, all the artifacts must be built and all their checksums are calculated. This is a conflicting dependency as the default source archive is generated atcreate_release
time.
It might be possible to use the Web API directly, e.g. with wget
instead of action
, but this may not be a step that should be achieved using such a low-level configuration.
This reverts commit 9c5929d.
CHANGELOG.md
Outdated
@@ -37,7 +37,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
## [Unreleased] | |||
|
|||
### Features | |||
* (build) [\#126](https://github.com/line/lbm/pull/126) Automatically generates release note and binaries | |||
* (build) [\#126](https://github.com/line/lbm/pull/126), [\#130](https://github.com/line/lbm/pull/130) Automatically generate a release note, linux/amd64 and linux/arm64 binaries on release |
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.
Please separate changes by each PR even if similar change later. not need to combine it.
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.
Ok, fixed
Co-authored-by: Sujong Lee <[email protected]>
* chore: apply detached x/wasmd Signed-off-by: zemyblue <[email protected]> * chore: add changelog Signed-off-by: zemyblue <[email protected]> Signed-off-by: zemyblue <[email protected]>
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [ amd64, arm64 ] |
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.
unnecessary
Description
This PR is a continuation of PR #126 and is related to issue #116. With this PR, executable binaries for the
linux/arm64
platform will be built for each release (darwin/amd64
anddarwin/arm64
are now disabled as they should be run on the self-hosted runner) and added to the release note. A major change is that cross-compiling through Docker containers has been abandoned in favour of building with the appropriate native compiler on the platform OS. This is because our LBM involves several native compilation steps (cgo) steps and cannot be built using Golang cross-compilation alone. For this reason, the docker image andmake reproducible
for cross-compilation have been removed and they have been replaced with a simplemake build
inrelease-build.yml
.The current
lbm
v0.46.0 binaries depend on thelibwasmvm
v1.0.0-0.10.0 library. As of this PR, release assets are no longer individual binaries, but TGZ archive files that bundle the appropriate libraries. Eachlibwasmvm
library can also be obtained separately.LBM archives can be extracted and run for each platform by specifying
LD_LIBRARY_PATH
(in macOS useDYLD_LIBRARY_PATH
instead).Building from source can also follow the same steps. In this case you'll need
go
,make
,git
, etc. on your environment.Motivation and context
See Issue #116
How has this been tested?
linux/amd64
: On Docker container using theamd64/ubuntu:latest
image on a M1 macbook.linux/arm64
: On Docker container using theubuntu:latest
image on M1 macbook.darwin/amd64
: On M1 macbook (with Rosetta 2).darwin/arm64
: On M1 macbook.Screenshots (if appropriate):
Checklist: