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 aarch64 Linux build, test, and publish to CI #340

Merged
merged 1 commit into from
Mar 31, 2023
Merged

Add aarch64 Linux build, test, and publish to CI #340

merged 1 commit into from
Mar 31, 2023

Conversation

shawnrader
Copy link
Contributor

  • Rename circleci artifact tarbal names to differentiate x86_64 and aarch64

  • Add circleci build, test, and publish for aarch64

@shawnrader shawnrader self-assigned this Nov 29, 2022
@shawnrader shawnrader linked an issue Nov 29, 2022 that may be closed by this pull request
TARBALL_PATH="/tmp/${CIRCLE_PROJECT_REPONAME}-$(uname)-standard.tar.gz"
RELEASE_NAME="${CIRCLE_PROJECT_REPONAME}-$(uname)-standard"
TARBALL_PATH="/tmp/${CIRCLE_PROJECT_REPONAME}-$(uname)-$(uname -m)-standard.tar.gz"
RELEASE_NAME="${CIRCLE_PROJECT_REPONAME}-$(uname)-$(uname -m)-standard"
Copy link
Member

Choose a reason for hiding this comment

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

This will probably require a change in lotus. @vmx any ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's possible to keep the name the same by splitting up the jobs in config.yml, but it is simpler and I think more descriptive to have architecture (aarch64, x86-64) in the name in the long run.

Copy link
Contributor

Choose a reason for hiding this comment

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

I really don't know much about the Lotus FFI integration. But to me it makes sense to have things named including their architecture if we plan to publish those as well. Thanks for flagging @Stebalien, we'll talk with the Lotus folks about it.

Copy link

@ianconsolata ianconsolata Nov 30, 2022

Choose a reason for hiding this comment

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

Right now, the lotus build process relies mainly on the install-filcrypto script in the root of this project (https://github.com/filecoin-project/filecoin-ffi/blob/master/install-filcrypto#L79), so as long as that still works (or is updated to reference the new names) I think the lotus process should continue to function. Based on my reading of the script, I think it just takes the release name and appends .tar.gz which it looks like is what you're doing here as well, so I don't think it should require any change.

Once unzipped, are the libraries still called the same names? I think lotus itself just links against the unzipped libraries, and the install-filcrypto script is what unzips them and puts them in the right place.

filcrypto.h
libfilcrypto.a
filcrypto.pc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just pushed a commit to update the release_name in install-filcrypto script to add the platform architecture to the tarball name. Tested it out to verify it pulls down the binary and is able to build with pre-compiled source.

Copy link
Contributor

@vmx vmx left a comment

Choose a reason for hiding this comment

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

LGTM! But someone from the Lotus side should approve it.

Copy link

@ianconsolata ianconsolata left a comment

Choose a reason for hiding this comment

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

It looks like @jennijuju's PR testing this change passed (filecoin-project/lotus#9768), though it didn't actually test building / releasing anything. I think this seems good enough for now. If not, we'll catch it on the next 1.19.0-rc release, and I can dig into it more if that breaks.

@shawnrader shawnrader force-pushed the arm branch 2 times, most recently from 6cfb93d to e293456 Compare December 2, 2022 22:34
@hammertoe
Copy link

A polite nudge on this. I'm trying to build Docker images for aarch64 Linux to allow developers to run dockerised instances of Lotus on M1s. If we can get this in then it save my build from having to build filecoin-ffi from scratch (and running out of disk space in the Github action runner in the process!). Thanks!

@Stebalien Stebalien force-pushed the arm branch 2 times, most recently from 7f66133 to fcaf06d Compare March 30, 2023 21:09
 - Rename circleci artifact tarbal names to differentiate x86_64 and aarch64

 - Add circleci build, test, and publish for aarch64

 - Add arch to tarball name in install-filcrypto

 - update install-filcrypto script to differentiate Linux x86_64 and aarch64

 - Run unit tests on Linux aarch64
@Stebalien Stebalien merged commit 15c0b98 into master Mar 31, 2023
@Stebalien Stebalien deleted the arm branch March 31, 2023 04:02
Stebalien pushed a commit that referenced this pull request Apr 7, 2023
- Rename circleci artifact tarbal names to differentiate x86_64 and aarch64

 - Add circleci build, test, and publish for aarch64

 - Add arch to tarball name in install-filcrypto

 - update install-filcrypto script to differentiate Linux x86_64 and aarch64

 - Run unit tests on Linux aarch64
Stebalien pushed a commit that referenced this pull request Apr 7, 2023
- Rename circleci artifact tarbal names to differentiate x86_64 and aarch64

 - Add circleci build, test, and publish for aarch64

 - Add arch to tarball name in install-filcrypto

 - update install-filcrypto script to differentiate Linux x86_64 and aarch64

 - Run unit tests on Linux aarch64
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.

Add ARM build to CI
5 participants