diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index d4681b8e0b6ac98e14209e6448616b1774918f4b..4bd3bb5b9ef8f47900d3f400d176bcf1b94b9d1b 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -34,15 +34,17 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View version = "2020.2" val targets = arrayOf( - "linux/386/1.15.2", - "linux/386/1.16beta1", - "linux/386/latest", - "linux/amd64/1.15.3", - "linux/amd64/1.16beta1", - "linux/amd64/latest", - "windows/amd64/1.15.3", - "windows/amd64/1.16beta1", - "windows/amd64/latest" + "linux/amd64/1.13", + "linux/amd64/1.14", + "linux/amd64/1.15", + "linux/amd64/1.16" + "linux/amd64/tip", + + "linux/386/1.15", + + "windows/amd64/1.15", + "windows/amd64/1.16", + "windows/amd64/tip" ) project { @@ -136,11 +138,13 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso failureConditions { executionTimeoutMin = 30 - failOnMetricChange { - metric = BuildFailureOnMetric.MetricType.TEST_COUNT - units = BuildFailureOnMetric.MetricUnit.DEFAULT_UNIT - comparison = BuildFailureOnMetric.MetricComparison.LESS - compareTo = value() + if (version != "tip") { + failOnMetricChange { + metric = BuildFailureOnMetric.MetricType.TEST_COUNT + units = BuildFailureOnMetric.MetricUnit.DEFAULT_UNIT + comparison = BuildFailureOnMetric.MetricComparison.LESS + compareTo = value() + } } } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f67ecf3d77d9647fa10e0efa1dfe8591a8d6d246..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,59 +0,0 @@ -language: go -sudo: required -go_import_path: github.com/go-delve/delve - -os: - - linux - -arch: - - amd64 - - arm64 - -go: - - 1.15.3 # hold back version of Go, see issue #42484 - - tip - -matrix: - allow_failures: - - go: tip - exclude: - - arch: arm64 - go: tip - -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 - - -# 386 linux -jobs: - include: - - os: linux - services: docker - env: go_32_version=1.15.2 # Linux/i386 tests will fail on go1.15 prior to 1.15.2 (see issue #2134) - -script: >- - if [ $TRAVIS_OS_NAME = "linux" ] && [ $go_32_version ]; then - docker pull i386/centos:7; - docker run \ - -v $(pwd):/delve \ - --env TRAVIS=true \ - --env CI=true \ - --privileged i386/centos:7 \ - /bin/bash -c "set -x && \ - cd delve && \ - yum -y update && yum -y upgrade && \ - yum -y install wget make git gcc && \ - wget -q https://dl.google.com/go/go${go_32_version}.linux-386.tar.gz && \ - tar -C /usr/local -xzf go${go_32_version}.linux-386.tar.gz && \ - export PATH=$PATH:/usr/local/go/bin && \ - go version && \ - uname -a && \ - make test"; - else - make test; - fi - -cache: - directories: - - $HOME/AppData/Local/Temp/chocolatey diff --git a/README.md b/README.md index bd6fe9124fbff2418160562eb33eae6d50272cf6..73fb876b10e3b45723d528214f49e8413c8fba80 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/go-delve/delve/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-delve/delve?status.svg)](https://godoc.org/github.com/go-delve/delve) -[![Build Status](https://travis-ci.org/go-delve/delve.svg?branch=master)](https://travis-ci.org/go-delve/delve) -[![Build status](https://ci.appveyor.com/api/projects/status/0v8r99smxost466s/branch/master?svg=true)](https://ci.appveyor.com/project/derekparker/delve-facy3/branch/master) [![Build Status](https://delve.beta.teamcity.com/app/rest/builds/buildType:(id:Delve_AggregatorBuild)/statusIcon.svg)](https://delve.beta.teamcity.com/viewType.html?buildTypeId=Delve_AggregatorBuild&guest=1) The GitHub issue tracker is for **bugs** only. Please use the [developer mailing list](https://groups.google.com/forum/#!forum/delve-dev) for any feature proposals and discussions. diff --git a/_scripts/gen-travis.go b/_scripts/gen-travis.go index 2f4cf25bc606c131b6c7e93c997d2057a0ad98c4..a6028c92ecfc684d8b2de6f3901a6af17f180eeb 100644 --- a/_scripts/gen-travis.go +++ b/_scripts/gen-travis.go @@ -55,87 +55,12 @@ func main() { } } - travisfh, err := os.Create(".travis.yml") - if err != nil { - fmt.Fprintf(os.Stderr, "could not create .travis.yml: %v") - os.Exit(1) - } - - out := bufio.NewWriter(travisfh) - err = template.Must(template.New("travis.yml").Parse(`language: go -sudo: required -go_import_path: github.com/go-delve/delve - -os: - - linux - -arch: - - amd64 - - arm64 - -go: - - {{index .GoVersions 0}} - - tip - -matrix: - allow_failures: - - go: tip - exclude: - - arch: arm64 - go: tip - -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 - - -# 386 linux -jobs: - include: - - os: linux - services: docker - env: go_32_version={{index .GoVersions 0}}.2 # Linux/i386 tests will fail on go1.15 prior to 1.15.2 (see issue #2134) - -script: >- - if [ $TRAVIS_OS_NAME = "linux" ] && [ $go_32_version ]; then - docker pull i386/centos:7; - docker run \ - -v $(pwd):/delve \ - --env TRAVIS=true \ - --env CI=true \ - --privileged i386/centos:7 \ - /bin/bash -c "set -x && \ - cd delve && \ - yum -y update && yum -y upgrade && \ - yum -y install wget make git gcc && \ - wget -q https://dl.google.com/go/go${go_32_version}.linux-386.tar.gz && \ - tar -C /usr/local -xzf go${go_32_version}.linux-386.tar.gz && \ - export PATH=$PATH:/usr/local/go/bin && \ - go version && \ - uname -a && \ - make test"; - else - make test; - fi - -cache: - directories: - - $HOME/AppData/Local/Temp/chocolatey -`)).Execute(out, args) - - if err != nil { - fmt.Fprintf(os.Stderr, "Error executing template: %v", err) - os.Exit(1) - } - _ = out.Flush() - _ = travisfh.Close() - githubfh, err := os.Create(".github/workflows/test.yml") if err != nil { fmt.Fprintf(os.Stderr, "Could not create .github/test.yml: %v", err) os.Exit(1) } - out = bufio.NewWriter(githubfh) + out := bufio.NewWriter(githubfh) err = template.Must(template.New(".github/workflows/test.yml").Parse(`name: Delve CI on: [push, pull_request] diff --git a/_scripts/test_linux.sh b/_scripts/test_linux.sh index 19e4eb9ffc3bd1b44c1d85d3a887be84b1672e89..387a134533a045e57c8d5677cfdcfd4b53b6ef84 100755 --- a/_scripts/test_linux.sh +++ b/_scripts/test_linux.sh @@ -3,25 +3,40 @@ set -e set -x apt-get -qq update -apt-get install -y dwz wget make git gcc curl +apt-get install -y dwz wget make git gcc curl jq dwz --version -if [ "$1" = "golatest" ]; then - version=$(curl https://golang.org/VERSION?m=text) -else - version=$1 -fi +version=$1 arch=$2 -echo "Go $version on $arch" -export GOROOT=/usr/local/go/"$version" -if [ ! -d "$GOROOT" ]; then - wget -q https://dl.google.com/go/"${version}".linux-"${arch}".tar.gz - mkdir -p /usr/local/go - tar -C /usr/local/go -xzf "${version}".linux-"${arch}".tar.gz - mv -f /usr/local/go/go "$GOROOT" +function getgo { + export GOROOT=/usr/local/go/$1 + if [ ! -d "$GOROOT" ]; then + wget -q https://dl.google.com/go/"$1".linux-"${arch}".tar.gz + mkdir -p /usr/local/go + tar -C /usr/local/go -xzf "$1".linux-"${arch}".tar.gz + mv -f /usr/local/go/go "$GOROOT" + fi +} + +if [ "$version" = "gotip" ]; then + exit 0 + echo Building Go from tip + getgo $(curl https://golang.org/VERSION?m=text) + export GOROOT_BOOTSTRAP=$GOROOT + export GOROOT=/usr/local/go/go-tip + git clone https://go.googlesource.com/go /usr/local/go/go-tip + cd /usr/local/go/go-tip/src + ./make.bash + cd - +else + echo Finding latest patch version for $version + version=$(curl 'https://golang.org/dl/?mode=json&include=all' | jq '.[].version' --raw-output | egrep ^$version'($|\.|beta|rc)' | head -1) + echo "Go $version on $arch" + getgo $version fi + GOPATH=$(pwd)/go export GOPATH export PATH=$PATH:$GOROOT/bin:$GOPATH/bin @@ -31,6 +46,5 @@ uname -a echo "$PATH" echo "$GOROOT" echo "$GOPATH" - cd delve make test diff --git a/_scripts/test_windows.ps1 b/_scripts/test_windows.ps1 index 45e8d2280934e8609e0b932c1fa8ca4aa4b882a3..2011a70585df67ed3515db3daaa3793500aaa62b 100644 --- a/_scripts/test_windows.ps1 +++ b/_scripts/test_windows.ps1 @@ -20,27 +20,50 @@ if (-Not(Test-Path "C:\procdump")) &7z x -oC:\procdump\ C:\procdump\procdump.zip > $null } -# Install Go -if ($version -eq "golatest") -{ - $version = Invoke-WebRequest -Uri https://golang.org/VERSION?m=text -UseBasicParsing | Select-Object -ExpandProperty Content +$env:PATH += ";C:\procdump;C:\mingw64\bin" + +function GetGo($version) { + $env:GOROOT = "C:\go\$version" + if (-Not(Test-Path $env:GOROOT)) + { + $file = "$version.windows-$arch.zip" + $url = "https://dl.google.com/go/$file" + Invoke-WebRequest -UserAgent wget -Uri $url -OutFile $file + &7z x -oC:\go $file > $null + Move-Item -Path C:\go\go -Destination $env:GOROOT -force + } } -Write-Host "Go $version on $arch" -$env:GOROOT = "C:\go\$version" -if (-Not(Test-Path $env:GOROOT)) -{ - $file = "$version.windows-$arch.zip" - $url = "https://dl.google.com/go/$file" - Invoke-WebRequest -UserAgent wget -Uri $url -OutFile $file - &7z x -oC:\go $file > $null - Move-Item -Path C:\go\go -Destination $env:GOROOT -force + +if ($version -eq "gotip") { + Exit 0 + $latest = Invoke-WebRequest -Uri https://golang.org/VERSION?m=text -UseBasicParsing | Select-Object -ExpandProperty Content + GetGo $latest + $env:GOROOT_BOOTSTRAP = $env:GOROOT + $env:GOROOT = "C:\go\go-tip" + Write-Host "Building Go with GOROOT_BOOTSTRAP $env:GOROOT_BOOTSTRAP" + if (-Not(Test-Path $env:GOROOT)) { + git clone https://go.googlesource.com/go C:\go\go-tip + Push-Location -Path C:\go\go-tip\src + } else { + Push-Location -Path C:\go\go-tip\src + git pull + } + .\make.bat + Pop-Location +} else { + # Install Go + Write-Host "Finding latest patch version for $version" + $version = Invoke-WebRequest -Uri 'https://golang.org/dl/?mode=json&include=all' -UseBasicParsing | foreach {$_.Content} | ConvertFrom-Json | foreach {$_.version} | Select-String -Pattern "^$version($|\.|beta|rc)" | Select-Object -First 1 | foreach {$_.Line} + Write-Host "Go $version on $arch" + GetGo $version } $env:GOPATH = "C:\gopath" -$env:PATH += ";C:\procdump;C:\mingw64\bin;$env:GOROOT\bin;$env:GOPATH\bin" +$env:PATH += ";$env:GOROOT\bin;$env:GOPATH\bin" Write-Host $env:PATH Write-Host $env:GOROOT Write-Host $env:GOPATH + go version go env mingw32-make test diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 74035298aa42c152c21e4bef2e129c7ba2edf8f3..0000000000000000000000000000000000000000 --- a/appveyor.yml +++ /dev/null @@ -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