From 2c0b52896a753eed6062d698e1cba96c1a1a27e2 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Tue, 3 Sep 2024 11:09:54 +0200 Subject: [PATCH] ci: Add CGO_ENABLED=0 to make sure we dont need it --- .github/workflows/ci.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 025271c76..90133783c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,18 +26,23 @@ jobs: matrix: include: - os: ubuntu-latest - goarch: amd64 test_target: test-race + GOARCH: amd64 + # race requires cgo, otherwise should not be needed + CGO_ENABLED: 1 # build and test on 32 bit, does not support race - os: ubuntu-latest - goarch: "386" test_target: test + GOARCH: "386" + CGO_ENABLED: 0 - os: macos-latest - goarch: amd64 test_target: test + GOARCH: amd64 + CGO_ENABLED: 0 - os: windows-latest - goarch: amd64 test_target: test + GOARCH: amd64 + CGO_ENABLED: 0 runs-on: ${{ matrix.os }} steps: # only run cli binary tests on linux @@ -50,5 +55,6 @@ jobs: go-version: "1.23.0" - name: Test env: - GOARCH: ${{ matrix.goarch }} + CGO_ENABLED: ${{ matrix.CGO_ENABLED }} + GOARCH: ${{ matrix.GOARCH }} run: make ${{ matrix.test_target }}