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

Add release builds for darwin/amd64 and darwin/arm64 #132

Closed
wants to merge 3 commits into from
Closed

Add release builds for darwin/amd64 and darwin/arm64 #132

wants to merge 3 commits into from

Conversation

torao
Copy link
Contributor

@torao torao commented Jan 23, 2023

Description

NOTE: This PR will be in progress after #130 is merged.

With this PR, two release builds for Intel and ARM MacOS have been added.

It's easy to cross-compile in Golang to target different OS, but our LBM contains some native compilation steps for the build. For the previous PR, we tried to use a docker container to cross-compile. It is, however, difficult to build binaries for MacOS on Linux, and the best way to build binaries for MacOS is to use Xcode on MacOS. So I switched to using the macos image on github actions instead of cross-building on a docker container. For this reason, the docker image and make reproducible for cross-compilation have been removed and they have been replaced by a simple make build in release-build.yml.

The current lbm v0.46.0 binaries depend on the libwasmvm v1.0.0-0.10.0 library. To run these release binaries, it needs to obtain the corresponding dynamic libraries in the table below from line/wasmvm.

Target Platform Wasmvm Library
linux/amd64 libwasmvm.x86_64.so
linux/arm64 libwasmvm.aarch64.so
darwin/* libwasmvm.dylib
$ ls
... libwasmvm.x86_64.so ... lbm-v0.0.68-linux-amd64 ...
$ LD_LIBRARY_PATH=. ./lbm-v0.0.68-linux-amd64 version
v0.0.68

Motivation and context

See Issue #116

How has this been tested?

  • Is the target tag listed as the version?
  • Does the listed commit hash match that to which the release tag was assigned?
  • Are all binaries and the source archive for their target platform listed?
  • Are the MD5 and SHA256 hash for all artifacts correct?
  • Do all binaries work on the target platform?
    • linux/amd64: On Docker container using the amd64/ubuntu:latest image on a M1 macbook.
    • linux/arm64: On Docker container using the ubuntu:latest image on M1 macbook.
    • darwin/amd64: On M1 macbook (with Rosetta 2).
    • darwin/arm64: On M1 macbook.
  • Is it possible to extract and build the source archive?

Screenshots (if appropriate):

darwin amd64 and arm64 release builds

Checklist:

  • I followed the contributing guidelines.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

torao added 2 commits January 19, 2023 17:24
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.
@torao torao added the enhancement New feature or request label Jan 23, 2023
@torao torao self-assigned this Jan 23, 2023
@torao
Copy link
Contributor Author

torao commented Feb 1, 2023

This PR has been integrated into #130.

@torao torao closed this Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant