From f91e170b6e555ae3b16b1c5a31a511eb1d38cd95 Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Mon, 10 Apr 2023 13:51:13 -0400 Subject: [PATCH] backport of commit 4d52e5a21b2d866646a8146f8f630fb1dd6f473c (#16939) Co-authored-by: John Murret --- .github/workflows/build-distros.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-distros.yml b/.github/workflows/build-distros.yml index c8036a75055e..a423030be5bf 100644 --- a/.github/workflows/build-distros.yml +++ b/.github/workflows/build-distros.yml @@ -13,6 +13,9 @@ on: permissions: contents: read +env: + GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }} + jobs: setup: name: Setup @@ -59,7 +62,7 @@ jobs: - name: Build run: | for os in $XC_OS; do - GOOS="$os" GOARCH=386 CGO_ENABLED=0 go build + GOOS="$os" GOARCH=386 CGO_ENABLED=0 go build -tags "${{ env.GOTAGS }}" done build-amd64: @@ -83,14 +86,14 @@ jobs: - name: Build run: | for os in $XC_OS; do - GOOS="$os" GOARCH=amd64 CGO_ENABLED=0 go build + GOOS="$os" GOARCH=amd64 CGO_ENABLED=0 go build -tags "${{ env.GOTAGS }}" done build-arm: needs: - setup - check-go-mod - runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }} + runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} env: CGO_ENABLED: 1 GOOS: linux @@ -109,9 +112,9 @@ jobs: - run: | sudo apt-get update --allow-releaseinfo-change-suite --allow-releaseinfo-change-version && sudo apt-get install -y gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu - - run: CC=arm-linux-gnueabi-gcc GOARCH=arm GOARM=5 go build - - run: CC=arm-linux-gnueabihf-gcc GOARCH=arm GOARM=6 go build - - run: CC=aarch64-linux-gnu-gcc GOARCH=arm64 go build + - run: CC=arm-linux-gnueabi-gcc GOARCH=arm GOARM=5 go build -tags "${{ env.GOTAGS }}" + - run: CC=arm-linux-gnueabihf-gcc GOARCH=arm GOARM=6 go build -tags "${{ env.GOTAGS }}" + - run: CC=aarch64-linux-gnu-gcc GOARCH=arm64 go build -tags "${{ env.GOTAGS }}" # This is job is required for branch protection as a required gihub check # because GitHub actions show up as checks at the job level and not the