*: Remove appveyor, use travis windows support (#1919)
* *: Remove appveyor, use travis windows support * cmd/dlv: Update TestOutput for Travis on Windows * cmd/dlv: Skip TestGeneratedDoc in Travis on Windows * Reduce number of jobs in matrix We only really want to test the full arch/go matrix on Linux. For every other os/arch/go combination, only run Go tip and the latest supported version.
This commit is contained in:
parent
1a9e38aa0c
commit
15509d4dc9
19
.travis.yml
19
.travis.yml
@ -4,6 +4,7 @@ sudo: required
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
|
||||
arch:
|
||||
- amd64
|
||||
@ -21,8 +22,26 @@ matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
arch: arm64
|
||||
- os: windows
|
||||
arch: arm64
|
||||
- os: windows
|
||||
go: 1.13.x
|
||||
- os: windows
|
||||
go: 1.12.x
|
||||
- os: osx
|
||||
go: 1.13.x
|
||||
- os: osx
|
||||
go: 1.12.x
|
||||
- arch: arm64
|
||||
go: 1.13.x
|
||||
- arch: arm64
|
||||
go: 1.12.x
|
||||
|
||||
before_install:
|
||||
- export GOFLAGS=-mod=vendor
|
||||
- if [ $TRAVIS_OS_NAME = "linux" ]; then sudo apt-get -qq update; sudo apt-get install -y dwz; echo "dwz version $(dwz --version)"; fi
|
||||
- if [ $TRAVIS_OS_NAME = "windows" ]; then choco install procdump make; fi
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/AppData/Local/Temp/chocolatey
|
||||
|
||||
33
appveyor.yml
33
appveyor.yml
@ -1,33 +0,0 @@
|
||||
version: '{build}'
|
||||
os: Windows Server 2012 R2
|
||||
clone_folder: c:\gopath\src\github.com\go-delve\delve
|
||||
environment:
|
||||
GOPATH: C:\gopath
|
||||
install:
|
||||
- ps: |
|
||||
# Install MinGW.
|
||||
if (-Not (Test-Path "C:\mingw64")) {
|
||||
$file = "x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z"
|
||||
$url = "https://bintray.com/artifact/download/drewwells/generic/"
|
||||
$url += $file
|
||||
Invoke-WebRequest -UserAgent wget -Uri $url -OutFile $file
|
||||
&7z x -oC:\ $file > $null
|
||||
}
|
||||
# Install Procdump
|
||||
if (-Not (Test-Path "C:\procdump")) {
|
||||
mkdir c:\procdump
|
||||
Invoke-WebRequest -UserAgent wget -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile C:\procdump\procdump.zip
|
||||
&7z x -oC:\procdump\ C:\procdump\procdump.zip > $null
|
||||
}
|
||||
- set PATH=c:\procdump;c:\mingw64\bin;%GOPATH%\bin;%PATH%
|
||||
- echo %PATH%
|
||||
- echo %GOPATH%
|
||||
- go version
|
||||
- go env
|
||||
cache:
|
||||
- C:\mingw64
|
||||
- C:\procdump
|
||||
build_script:
|
||||
- mingw32-make install
|
||||
test_script:
|
||||
- mingw32-make test
|
||||
@ -171,12 +171,14 @@ func testOutput(t *testing.T, dlvbin, output string, delveCmds []string) (stdout
|
||||
|
||||
_, err = os.Stat(debugbin)
|
||||
if err == nil {
|
||||
if strings.ToLower(os.Getenv("APPVEYOR")) != "true" {
|
||||
// Sometimes delve on Appveyor can't remove the built binary before
|
||||
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && runtime.GOOS == "windows" {
|
||||
// Sometimes delve on Travis on Windows can't remove the built binary before
|
||||
// exiting and gets an "Access is denied" error when trying.
|
||||
// See: https://ci.appveyor.com/project/go-delve/delve/build/1527
|
||||
t.Errorf("running %q: file %v was not deleted\nstdout is %q, stderr is %q", delveCmds, debugbin, stdout, stderr)
|
||||
// Just ignore it.
|
||||
// See: https://travis-ci.com/go-delve/delve/jobs/296325131
|
||||
return
|
||||
}
|
||||
t.Errorf("running %q: file %v was not deleted\nstdout is %q, stderr is %q", delveCmds, debugbin, stdout, stderr)
|
||||
return
|
||||
}
|
||||
if !os.IsNotExist(err) {
|
||||
@ -276,6 +278,9 @@ func slurpFile(t *testing.T, filename string) []byte {
|
||||
// TestGeneratedDoc tests that the autogenerated documentation has been
|
||||
// updated.
|
||||
func TestGeneratedDoc(t *testing.T) {
|
||||
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && runtime.GOOS == "windows" {
|
||||
t.Skip("skipping test on Windows in CI")
|
||||
}
|
||||
// Checks gen-cli-docs.go
|
||||
var generatedBuf bytes.Buffer
|
||||
commands := terminal.DebugCommands(nil)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user