From a6128ff61fbb83588158eb98daa35a5414f94506 Mon Sep 17 00:00:00 2001 From: Rouven Himmelstein Date: Thu, 29 Dec 2022 20:05:05 +0100 Subject: [PATCH] feat: improve cross arch builds --- .github/workflows/build-image.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index faa6143..1135f9f 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -152,10 +152,17 @@ jobs: - name: Build static application binary run: | + # Prepare rust-cross/rust-musl-cross for cross compiling source prep-build-env.sh + + # Compile the desired targets build-rust-static-bin x86_64-musl build-rust-static-bin aarch64-musl build-rust-static-bin armv7-musleabihf + build-rust-static-bin arm-musleabihf + + # Cleanup target folder + sudo rm -rf target/*/release/build target/*/release/deps - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -192,7 +199,7 @@ jobs: uses: docker/build-push-action@v3 with: tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - platforms: linux/amd64, linux/arm64, linux/arm + platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6 context: . file: ./Containerfile load: false