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