$ go test -timeout 5m -race ./...
#runtime/cgo
exec: "gcc": executable file not found in %PATH%
Do I need to adjust the PATH? Is there a known recipe for getting gcc onto the system (via choco I guess)? cgo is not uncommon, I’d suspect this would be a required dependency for building go.
Additionally I had issues with line endings. See the previous commits in the PR. The checkout is converting line endings to CRLF even though the gitattributes on the converted files have unset text. A resorted to using sed to fix the line endings.
@keegancsmith if adding mingw does work, let me know and I will add it to the standard image.
Regarding :
Additionally I had issues with line endings. See the previous commits in the PR. The checkout is converting line endings to CRLF even though the gitattributes on the converted files have unset text. A resorted to using sed to fix the line endings.
Could you open another topic so we can track this?
I got it to work by installing mingw and adding it to the PATH. For reference I added
before_install:
# Go1.11 requires GCC to run go test
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install -y mingw; export PATH=/c/tools/mingw64/bin:"$PATH"; fi
You can view my updated PR for a passing windows travis build.
Note: We currently have appveyor integrated, and it only takes 2min6s to run our CI. However, windows and travis took 8minutes. I am guessing a large part of that is needing to install mingw, so it being part of the base image would be great.
I would also love to have gcc as part of the base Windows image. I was installing mingw through chocolatey as you’ve mentioned above, but that stopped working once I added secret environment variables due to Choco install hangs forever.
Thanks for adding Windows support, hope this can be resolved soon!
I realise this is still in preview and it may also be specific to our tests running on windows/etc (this project has some heavy integration testing which exercises IDE/build tooling). We do run this in appveyor as well if you want to compare, but they don’t seem to report run times. https://ci.appveyor.com/project/sourcegraph/go-langserver/builds/19569137 But if memory serves it doesn’t take 7min on appveyor (which is also go1.11, but not go1.11.1)
I think the fact that go1.11 requires GCC on the path and not go1.10 is probably pointing to an important difference in something that changed in Go. My best guess is we run our tests with the “-race” flag which I know requires recompiling. Maybe something changed in go which required recompiling GOROOT or the recompiling became more heavy (and required CGO).