GitHub Action to Build libsignal for x86-64, arm64, and armv7 #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After a lot of trial and error I finally got all of this working. This is an action triggered on workflow_dispatch so it only runs when requested. Editing
LIBSIGNAL_VERSION
will download and compile that version for all 3 architectures.x86_64
Nothing special here, this is compiled normally using cargo and the resulting binary is copied to the repo and committed.
arm64 & armv7
Both of these are compiled natively under their respective architectures using qemu virtualization. This avoids the cross compiling issues that this project and others were previously facing while trying to cross compile libsignal for various arm architectures. Note that in these jobs the sources of dependencies are downloaded and vendored ahead of time before we jump into qemu virtualization for two reasons:
cargo build
while virtualizing armv7.Therefore we use
cargo vendor
to resolve and download all of the dependencies into the source directory before jumping into virtualization to install rust and do the compiling itself in cargo's offline mode. Finally, we copy the resulting binary and commit it.