Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Build aarch64 Linux release binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
adaszko authored and cloudhead committed Sep 9, 2022
1 parent 398cab4 commit 954ea8d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[target.aarch64-unknown-linux-musl]
linker = "aarch64-unknown-linux-musl-ld"
ar = "aarch64-unknown-linux-musl-ar"
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,46 @@ jobs:
target/x86_64-unknown-linux-musl/debian/*.deb
release-arm-linux-binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
!target/debian
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build the binaries
uses: addnab/docker-run-action@v3
with:
image: messense/rust-musl-cross:aarch64-musl
options: -v ${{ github.workspace }}:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
run: |
rustup target add aarch64-unknown-linux-musl
cargo build --release
apt update
apt install --yes asciidoctor
.github/build-man-page.bash $(find . -name '*.adoc')
- shell: bash
run: |
staging="radicle-cli-aarch64-unknown-linux-musl"
mkdir -p "$staging"
find target/aarch64-unknown-linux-musl/release -maxdepth 1 -name 'rad*' -executable | xargs --replace cp '{}' "$staging"/
cp target/aarch64-unknown-linux-musl/release/git-remote-rad "$staging"/
cp *.1.gz "$staging"/
tar czf "$staging.tar.gz" "$staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
radicle-cli-aarch64-unknown-linux-musl.tar.gz
upload-deb:
needs: release-linux-binaries
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ incremental = false

[profile.release]
strip = true
lto = true
lto = "thin"
codegen-units = 1
panic = "abort"

Expand Down

0 comments on commit 954ea8d

Please sign in to comment.