From e6df70160189629bd9acb43e040612bf7975f01f Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:02:02 +0800 Subject: [PATCH] ci(actions): package for `aarch64` and `armv7` --- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 72387799..ba338a2e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,6 +16,9 @@ env: MAINTAINER: "xrelkd <46590321+xrelkd@users.noreply.github.com>" PACKAGE_NAME: "clipcat" PACKAGE_DESCRIPTION: "Clipboard manager written in Rust Programming Language" + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc jobs: all: @@ -24,9 +27,23 @@ jobs: strategy: matrix: target: + - aarch64-unknown-linux-musl + - armv7-unknown-linux-musleabihf - x86_64-unknown-linux-musl include: + - target: aarch64-unknown-linux-musl + arch_deb: arm64 + arch_rpm: aarch64 + os: ubuntu-latest + target_rustflags: "--codegen linker=aarch64-linux-gnu-gcc" + + - target: armv7-unknown-linux-musleabihf + arch_deb: armhf + arch_rpm: armhf # Fedora does not support armv7 + os: ubuntu-latest + target_rustflags: "--codegen linker=arm-linux-gnueabihf-gcc" + - target: x86_64-unknown-linux-musl arch_deb: amd64 arch_rpm: x86_64 @@ -50,6 +67,18 @@ jobs: target: ${{ matrix.target }} toolchain: stable + - name: Install AArch64 Toolchain + if: ${{ matrix.target == 'aarch64-unknown-linux-musl' }} + run: | + sudo apt update + sudo apt install -y gcc-aarch64-linux-gnu + + - name: Install ARM7 Toolchain + if: ${{ matrix.target == 'armv7-unknown-linux-musleabihf' }} + run: | + sudo apt update + sudo apt install -y gcc-arm-linux-gnueabihf + - name: Create Package id: package env: