-
Notifications
You must be signed in to change notification settings - Fork 4
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 support for generating native libraries for Linux and macOS aarch64 platforms (fixes #46). #50
Conversation
…Ubuntu Focal; Remove unnecessary native-lib-build action; Add workflow step to upload built jar.
Verified with @LinZhihao-723's help that the built jar works on an Apple Silicon Mac. |
Tested integration test on AWS x86 and arm64 22.04 ubuntu instances with this script. Printed output from test as expected. Did not test mac os as expensive on AWS. Maybe for future PR add test directly in workflow but not required for now.
|
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake maven | ||
|
||
cd "$project_dir" | ||
mvn --batch-mode validate generate-resources test assembly:single@assemble-lib-dir |
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.
I moved validate
before generate-resources
to match the order that Maven executes them in (see mvn buildplan:list
).
Tested again integration test had no errors after new changes. Checks all passes |
Description
This PR will allow users of aarch64 (a.k.a. arm64) platforms like Apple Silicon and ARM processors to use the Java clp-ffi library.
To achieve this, this PR:
build-lib-for-linux-aarch64
) that uses Docker + QEMU to build the native library for aarch64 and upload it to GH Actions storage.install-deps-and-build-native-lib.sh
).build-lib-for-macos
GH workflow job to also build the native library for Apple Silicon using a macos-14 GH-hosted runner, and upload the new binary to GH Actions storage.build-and-release
GH workflow job to download the new binaries and add them to the JAR.build-and-release
GH workflow job to build and test, add the binaries to the package, and then build the final JAR, rather than unnecessarily building a JAR before adding the additional binaries.integration-tests
task to run this test, renames the currenttest
tounit-tests
, and adds a newtest
task to rununit-tests
andintegration-tests
.Validation performed
task integration-tests
to set up and run the integration tests.target/repo/com/yscope/clp/clp-ffi/0.4-SNAPSHOT
task integration-tests
, since that would overwrite the downloaded JAR) passed on: