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

Commit 954ea8d

Browse files
adaszkocloudhead
authored andcommitted
Build aarch64 Linux release binaries
1 parent 398cab4 commit 954ea8d

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.cargo/config

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[target.aarch64-unknown-linux-musl]
2+
linker = "aarch64-unknown-linux-musl-ld"
3+
ar = "aarch64-unknown-linux-musl-ar"

.github/workflows/release.yml

+40
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,46 @@ jobs:
7878
target/x86_64-unknown-linux-musl/debian/*.deb
7979
8080
81+
release-arm-linux-binaries:
82+
runs-on: ubuntu-20.04
83+
steps:
84+
- name: Checkout source code
85+
uses: actions/checkout@v2
86+
- name: Configure build cache
87+
uses: actions/cache@v2
88+
with:
89+
path: |
90+
~/.cargo/registry
91+
~/.cargo/git
92+
target
93+
!target/debian
94+
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
95+
- name: Build the binaries
96+
uses: addnab/docker-run-action@v3
97+
with:
98+
image: messense/rust-musl-cross:aarch64-musl
99+
options: -v ${{ github.workspace }}:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
100+
run: |
101+
rustup target add aarch64-unknown-linux-musl
102+
cargo build --release
103+
apt update
104+
apt install --yes asciidoctor
105+
.github/build-man-page.bash $(find . -name '*.adoc')
106+
- shell: bash
107+
run: |
108+
staging="radicle-cli-aarch64-unknown-linux-musl"
109+
mkdir -p "$staging"
110+
find target/aarch64-unknown-linux-musl/release -maxdepth 1 -name 'rad*' -executable | xargs --replace cp '{}' "$staging"/
111+
cp target/aarch64-unknown-linux-musl/release/git-remote-rad "$staging"/
112+
cp *.1.gz "$staging"/
113+
tar czf "$staging.tar.gz" "$staging"
114+
- uses: softprops/action-gh-release@v1
115+
with:
116+
fail_on_unmatched_files: true
117+
files: |
118+
radicle-cli-aarch64-unknown-linux-musl.tar.gz
119+
120+
81121
upload-deb:
82122
needs: release-linux-binaries
83123
runs-on: ubuntu-20.04

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ incremental = false
55

66
[profile.release]
77
strip = true
8-
lto = true
8+
lto = "thin"
99
codegen-units = 1
1010
panic = "abort"
1111

0 commit comments

Comments
 (0)