From e2dafb72312e05115276babbefce6b7da968b868 Mon Sep 17 00:00:00 2001 From: Joshua Oladele Date: Mon, 1 Jul 2024 13:41:09 +0100 Subject: [PATCH] test: try building for arm platfform only --- .github/workflows/release.yaml | 10 +++------- docker/fuel-core-nats.Dockerfile | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2e00d8..791acdc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -152,14 +152,10 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64 + platforms: linux/arm64 file: docker/fuel-core-nats.Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: | - type=registry,ref=ghcr.io/fuellabs/fuel-core-nats-build-cache:linux-amd64 - type=registry,ref=ghcr.io/fuellabs/fuel-core-nats-build-cache:linux-arm64 - cache-to: |- - type=registry,ref=ghcr.io/fuellabs/fuel-core-nats-build-cache:linux-amd64,mode=max - type=registry,ref=ghcr.io/fuellabs/fuel-core-nats-build-cache:linux-arm64,mode=max + cache-from: type=registry,ref=ghcr.io/fuellabs/fuel-core-nats-cache:latest + cache-to: type=registry,ref=ghcr.io/fuellabs/fuel-core-nats-cache:latest,mode=max diff --git a/docker/fuel-core-nats.Dockerfile b/docker/fuel-core-nats.Dockerfile index 6b12276..84c63ca 100644 --- a/docker/fuel-core-nats.Dockerfile +++ b/docker/fuel-core-nats.Dockerfile @@ -4,6 +4,10 @@ FROM --platform=$BUILDPLATFORM rust:1.75.0 AS chef ARG TARGETPLATFORM RUN cargo install cargo-chef && rustup target add wasm32-unknown-unknown + +# Add the target platform dynamically +RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then rustup target add aarch64-unknown-linux-gnu; fi + WORKDIR /build/ COPY --from=xx / /