diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 00000000..0f8df9f6 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,3 @@ +[target.aarch64-unknown-linux-musl] +linker = "aarch64-unknown-linux-musl-ld" +ar = "aarch64-unknown-linux-musl-ar" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eea4c004..6401596c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 432d77ec..08f7a2cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ incremental = false [profile.release] strip = true -lto = true +lto = "thin" codegen-units = 1 panic = "abort"