From 04a60118d6761659bc392131cf71887c88abb985 Mon Sep 17 00:00:00 2001 From: Ferdinand Prantl Date: Thu, 14 Dec 2023 17:26:43 +0100 Subject: [PATCH] feat: Add the linux arm64 support --- .github/workflows/ci.yml | 15 +++++++++++++-- Makefile | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f13198e..3f43b1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,17 @@ jobs: uses: prantlf/shelve-output-action@v2 with: enable: ${{ steps.bump.outputs.bumped }} + - name: Install ARM Cross-Compiler + run: | + sudo apt-get update + sudo apt-get install gcc gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu + - name: Build ARM + run: make build RELEASE=1 LINUX_ARM=1 + - name: Shelve output + uses: prantlf/shelve-output-action@v2 + with: + enable: ${{ steps.bump.outputs.bumped }} + arch: arm64 macos: needs: @@ -58,7 +69,7 @@ jobs: if: ${{ needs.linux.outputs.changed == 'true' }} uses: prantlf/shelve-output-action@v2 - name: Build ARM - run: make build RELEASE=1 ARM=1 + run: make build RELEASE=1 MACOS_ARM=1 - name: Shelve output if: ${{ needs.linux.outputs.changed == 'true' }} uses: prantlf/shelve-output-action@v2 @@ -126,7 +137,7 @@ jobs: with: files: ${{ needs.linux.outputs.changed-files }} - name: Unshelve output - uses: prantlf/unshelve-output-action@v4 + uses: prantlf/unshelve-output-action@v5 - name: Publish release uses: prantlf/finish-release-action@v1 env: diff --git a/Makefile b/Makefile index 2565419..de2128c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ ifeq (1,${RELEASE}) VFLAGS=-prod endif -ifeq (1,${ARM}) +ifeq (1,${MACOS_ARM}) VFLAGS:=-cflags "-target arm64-apple-darwin" $(VFLAGS) endif +ifeq (1,${LINUX_ARM}) + VFLAGS:=-cc aarch64-linux-gnu-gcc $(VFLAGS) +endif ifeq (1,${WINDOWS}) VFLAGS:=-os windows $(VFLAGS) endif