From fba2a299207607bcd6c7e4480822f357fa889ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Fri, 23 Feb 2024 13:09:26 +0100 Subject: [PATCH] fix: go compiler version --- .github/workflows/push.yml | 5 ++++- .github/workflows/release-prod.yml | 5 ++++- .github/workflows/release.yml | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3f3c16e..d10ce80 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -50,10 +50,13 @@ jobs: - name: Install dependencies working-directory: backend run: go get ./... + - name: Set up CC for cross-compilation + if: matrix.goarch == 'arm64' + run: echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - name: Build working-directory: backend run: | - GOOS=linux CGO_ENABLED=1 GOARCH=${{ matrix.goarch }} go build -o build/kubevoyage-${{ matrix.goarch }} ./cmd/kubevoyage + GOOS=linux GOARCH=${{ matrix.goarch }} CGO_ENABLED=1 go build -o build/kubevoyage-${{ matrix.goarch }} ./cmd/kubevoyage #- name: Test with the Go CLI # run: go test - name: Archive production artifacts diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index 3a64c59..90f48a5 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -44,10 +44,13 @@ jobs: - name: Install dependencies working-directory: backend run: go get ./... + - name: Set up CC for cross-compilation + if: matrix.goarch == 'arm64' + run: echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - name: Build working-directory: backend run: | - GOOS=linux CGO_ENABLED=1 GOARCH=${{ matrix.goarch }} go build -o build/kubevoyage-${{ matrix.goarch }} ./cmd/kubevoyage + GOOS=linux GOARCH=${{ matrix.goarch }} CGO_ENABLED=1 go build -o build/kubevoyage-${{ matrix.goarch }} ./cmd/kubevoyage #- name: Test with the Go CLI # run: go test - name: Archive production artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b06b0f1..bb936ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,13 @@ jobs: - name: Install dependencies working-directory: backend run: go get ./... + - name: Set up CC for cross-compilation + if: matrix.goarch == 'arm64' + run: echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV - name: Build working-directory: backend run: | - GOOS=linux CGO_ENABLED=1 GOARCH=${{ matrix.goarch }} go build -o build/kubevoyage-${{ matrix.goarch }} ./cmd/kubevoyage + GOOS=linux GOARCH=${{ matrix.goarch }} CGO_ENABLED=1 go build -o build/kubevoyage-${{ matrix.goarch }} ./cmd/kubevoyage #- name: Test with the Go CLI # run: go test - name: Archive production artifacts