ci: add GOTAGS to build-distros (#16934)

This commit is contained in:
John Murret 2023-04-10 11:16:44 -06:00 committed by GitHub
parent 61a456682a
commit 91fd8b7917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -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