From 03c961bc8afed1fd4bd8043607d1441dee5b83e6 Mon Sep 17 00:00:00 2001 From: Andre Renaud Date: Tue, 28 May 2024 09:10:28 +1200 Subject: [PATCH] Workflows: Use CGO_ENABLED=1 for MacOS Also enable explicit ARM64 builds --- .github/workflows/test.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7a43621..01c4691 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,9 +19,18 @@ jobs: - uses: actions/setup-go@v1 with: go-version: "1.17" - - name: Build native + - name: Setup CGO Environment + run: | + if [ ${{ matrix.os }} == 'macOS-latest' ] ; then + echo "CGO_ENABLED=1" >> "$GITHUB_ENV" + fi + shell: bash + - name: Build AMD64 run: GOARCH=amd64 go build -v ./... shell: bash + - name: Build ARM64 + run: GOARCH=arm64 go build -v ./... + shell: bash - name: Install socat if: matrix.os == 'ubuntu-latest' run: sudo apt-get install socat