From a224937d2c23cbc81c49aed0280cfd05d1a3e734 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Sun, 19 Jan 2020 07:16:58 +1100 Subject: [PATCH] Disable CGO for AppVeyor build steps CGO is explicitly enabled for the test steps, as `-race` is passed to `go test`, which depends on CGO to function. Signed-off-by: Paul "TBBle" Hampson --- .appveyor.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6da043859..7445af458 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,7 +11,7 @@ branches: environment: GOPATH: C:\gopath - CGO_ENABLED: 1 + CGO_ENABLED: 0 matrix: - GO_VERSION: 1.13.6 @@ -51,13 +51,14 @@ build_script: mingw32-make.exe check" - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH ; mingw32-make.exe build binaries" +# These scripts run with CGO_ENABLED=1 in order to support the Race Detector (-race flag), enabled in Makefile.windows test_script: # TODO: need an equivalent of TRAVIS_COMMIT_RANGE # - GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" C:\MinGW\bin\mingw32-make.exe dco - - bash.exe -lc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe coverage root-coverage" - # - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe integration" + - bash.exe -lc "export CGO_ENABLED=1 PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe coverage root-coverage" + # - bash.exe -elc "export CGO_ENABLED=1 PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe integration" # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759 - # - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH; TESTFLAGS_PARALLEL=1 mingw32-make.exe integration" + # - bash.exe -elc "export CGO_ENABLED=1 PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH; TESTFLAGS_PARALLEL=1 mingw32-make.exe integration" on_success: codecov --flag windows -f coverage.txt