未验证 提交 8221250e 编写于 作者: A Alessandro Arzilli 提交者: GitHub

split testing load between more CI services (#2251)

上级 d61bf018
name: Delve CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- go: 1.15
os: macos-latest
- go: 1.14
os: ubuntu-latest
- go: 1.13
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: ${{matrix.go}}
- run: go run _scripts/make.go test
...@@ -4,8 +4,6 @@ go_import_path: github.com/go-delve/delve ...@@ -4,8 +4,6 @@ go_import_path: github.com/go-delve/delve
os: os:
- linux - linux
- osx
- windows
arch: arch:
- amd64 - amd64
...@@ -13,39 +11,18 @@ arch: ...@@ -13,39 +11,18 @@ arch:
go: go:
- 1.15.3 # hold back version of Go, see issue #42484 - 1.15.3 # hold back version of Go, see issue #42484
- 1.14.x
- 1.13.x
- tip - tip
matrix: matrix:
allow_failures: allow_failures:
- go: tip - go: tip
exclude: exclude:
- os: osx
arch: arm64
- os: windows
arch: arm64
- os: windows
go: 1.14.x
- os: windows
go: 1.13.x
- os: osx
go: 1.14.x
- os: osx
go: 1.13.x
- arch: arm64
go: 1.14.x
- arch: arm64
go: 1.13.x
- os: windows
go: tip
- arch: arm64 - arch: arm64
go: tip go: tip
before_install: before_install:
- export GOFLAGS=-mod=vendor - 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 = "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 --ignorechecksum; fi
# 386 linux # 386 linux
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/go-delve/delve/master/LICENSE) [![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) [![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://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)
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. 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,56 +55,38 @@ func main() { ...@@ -55,56 +55,38 @@ func main() {
} }
} }
out := bufio.NewWriter(os.Stdout) travisfh, err := os.Create(".travis.yml")
err := template.Must(template.New("travis.yml").Parse(`language: go 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 sudo: required
go_import_path: github.com/go-delve/delve go_import_path: github.com/go-delve/delve
os: os:
- linux - linux
- osx
- windows
arch: arch:
- amd64 - amd64
- arm64 - arm64
go: go:
{{- range .GoVersions}} - {{index .GoVersions 0}}
- {{.DotX}}
{{- end}}
- tip - tip
matrix: matrix:
allow_failures: allow_failures:
- go: tip - go: tip
exclude: exclude:
- os: osx
arch: arm64
- os: windows
arch: arm64
{{- /* Exclude all testing on anything except the most recent version of Go for anything that isn't (GOOS=linux, GOARCH=amd64)*/ -}}
{{- range .GoVersions}}{{if not .MaxVersion}}
- os: windows
go: {{.DotX}}
{{- end}}{{end -}}
{{- range .GoVersions}}{{if not .MaxVersion}}
- os: osx
go: {{.DotX}}
{{- end}}{{end -}}
{{- range .GoVersions}}{{if not .MaxVersion}}
- arch: arm64
go: {{.DotX}}
{{- end}}{{end}}
- os: windows
go: tip
- arch: arm64 - arch: arm64
go: tip go: tip
before_install: before_install:
- export GOFLAGS=-mod=vendor - 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 = "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
# 386 linux # 386 linux
...@@ -146,4 +128,43 @@ cache: ...@@ -146,4 +128,43 @@ cache:
os.Exit(1) os.Exit(1)
} }
_ = out.Flush() _ = 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)
err = template.Must(template.New(".github/workflows/test.yml").Parse(`name: Delve CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{"{{"}}matrix.os{{"}}"}}
strategy:
matrix:
include:
- go: {{index .GoVersions 0}}
os: macos-latest
- go: {{index .GoVersions 1}}
os: ubuntu-latest
- go: {{index .GoVersions 2}}
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: ${{"{{"}}matrix.go{{"}}"}}
- run: go run _scripts/make.go test
`)).Execute(out, args)
if err != nil {
fmt.Fprintf(os.Stderr, "Error executing template: %v", err)
os.Exit(1)
}
_ = out.Flush()
_ = githubfh.Close()
} }
...@@ -19,6 +19,7 @@ const DelveMainPackagePath = "github.com/go-delve/delve/cmd/dlv" ...@@ -19,6 +19,7 @@ const DelveMainPackagePath = "github.com/go-delve/delve/cmd/dlv"
var Verbose bool var Verbose bool
var NOTimeout bool var NOTimeout bool
var TestIncludePIE bool
var TestSet, TestRegex, TestBackend, TestBuildMode string var TestSet, TestRegex, TestBackend, TestBuildMode string
func NewMakeCommands() *cobra.Command { func NewMakeCommands() *cobra.Command {
...@@ -94,6 +95,7 @@ This option can only be specified if testset is basic or a single package.`) ...@@ -94,6 +95,7 @@ This option can only be specified if testset is basic or a single package.`)
pie PIE buildmode pie PIE buildmode
This option can only be specified if testset is basic or a single package.`) This option can only be specified if testset is basic or a single package.`)
test.PersistentFlags().BoolVarP(&TestIncludePIE, "pie", "", true, "Standard testing should include PIE")
RootCommand.AddCommand(test) RootCommand.AddCommand(test)
...@@ -332,7 +334,7 @@ func testStandard() { ...@@ -332,7 +334,7 @@ func testStandard() {
fmt.Println("\nTesting RR backend") fmt.Println("\nTesting RR backend")
testCmdIntl("basic", "", "rr", "normal") testCmdIntl("basic", "", "rr", "normal")
} }
if runtime.GOOS == "linux" || (runtime.GOOS == "windows" && goversion.VersionAfterOrEqual(runtime.Version(), 1, 15)) { if TestIncludePIE && (runtime.GOOS == "linux" || (runtime.GOOS == "windows" && goversion.VersionAfterOrEqual(runtime.Version(), 1, 15))) {
fmt.Println("\nTesting PIE buildmode, default backend") fmt.Println("\nTesting PIE buildmode, default backend")
testCmdIntl("basic", "", "default", "pie") testCmdIntl("basic", "", "default", "pie")
testCmdIntl("core", "", "default", "pie") testCmdIntl("core", "", "default", "pie")
......
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.
先完成此消息的编辑!
想要评论请 注册