未验证 提交 715224ce 编写于 作者: A Alessandro Arzilli 提交者: GitHub

Change TeamCity test matrix and drop appveyor/travis-ci configurations (#2315)

* TeamCity: change test matrix and test scripts

Changes test matrix to test:

* 1.13 through 1.16 on linux/amd64
* 1.15, 1.16 on windows/amd64
* 1.15 on linux/386

Also includes tests on go-tip for windows/amd64 and linux/amd64
(currently disabled, but can be turned on in a PR).

Changes test scripts to automatically select the latest patch version
of Go.

* CI: remove Travis-CI and Appveyor configuration
上级 25178e26
......@@ -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()
}
}
}
......
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
......@@ -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.
......
......@@ -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]
......
......@@ -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
......@@ -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
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册