Skip to content

Commit

Permalink
backport of commit 4d52e5a (#16939)
Browse files Browse the repository at this point in the history
Co-authored-by: John Murret <john.murret@hashicorp.com>
  • Loading branch information
hc-github-team-consul-core and jmurret authored Apr 10, 2023
1 parent 1f8e008 commit f91e170
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
permissions:
contents: read

env:
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}

jobs:
setup:
name: Setup
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f91e170

Please sign in to comment.