Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

Commit

Permalink
ci: disable cgo by default
Browse files Browse the repository at this point in the history
With go1.11 `go test` in GOPATH mode somehow
seems to depend on GCC. See golang/go#28065

This change only enables cgo for CI profiles that
need it. Those are the ones that seem to fail
on TravisCI now, presumably due to some compiler
version missmatch.

That is a workaround and does not happen in GO11MODULE mode.

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
  • Loading branch information
bzz committed Apr 9, 2019
1 parent 305cceb commit 9b5a14f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ go:
env:
global:
- GO_VERSION_FOR_JVM='1.11.x'
- CGO_ENABLED=0
matrix:
- ONIGURUMA=0
- ONIGURUMA=1
Expand All @@ -30,7 +31,7 @@ stages:

stage: test
install:
- if [[ "${ONIGURUMA}" -gt 0 ]]; then export tags="${tags} oniguruma"; fi; go get -v -t -tags "${tags}" ./...
- if [[ "${ONIGURUMA}" -gt 0 ]]; then export tags="${tags} oniguruma"; CGO_ENABLED=1; fi; go get -v -t -tags "${tags}" ./...
script:
- make test-coverage
after_success:
Expand Down

0 comments on commit 9b5a14f

Please sign in to comment.