teamcity: misc changes to CI (#3476)

- add architecture rule for ppc64le so that incompatible agents don't
  pick up the build
- disable PIE tests on linux/ppc64le (the tests claim it doesn't work)
- enable PIE tests on darwin/amd64 now that the entry point calculation
  has been fixed
- remove dependency on wget and curl in the test script for linux to
  reduce test time
- only install git in the linux test script when we need it
- remove staticcheck from linux/ppc64le builds (it takes almost 5
  minutes between installation and execution and makes the test timeout
  sometimes)
- drop windows/arm64/tip build, the windows/arm64 build is broken
  anyway and since there is only one agent it makes CI runs slow
- drop linux/ppc64le/tip build, there is only one agent, it's slow and
  it will always timeout. CI runs in excess of 1h are too long.
This commit is contained in:
Alessandro Arzilli 2023-08-22 18:24:25 +02:00 committed by GitHub
parent 6a0423a1e9
commit 32b937c953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 9 deletions

@ -46,13 +46,11 @@ val targets = arrayOf(
"linux/arm64/tip", "linux/arm64/tip",
"linux/ppc64le/1.21", "linux/ppc64le/1.21",
"linux/ppc64le/tip",
"windows/amd64/1.21", "windows/amd64/1.21",
"windows/amd64/tip", "windows/amd64/tip",
"windows/arm64/1.21", "windows/arm64/1.21",
"windows/arm64/tip",
"mac/amd64/1.21", "mac/amd64/1.21",
"mac/amd64/tip", "mac/amd64/tip",
@ -231,6 +229,7 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso
when (arch) { when (arch) {
"386", "amd64" -> equals("teamcity.agent.jvm.os.arch", if (os == "mac") "x86_64" else "amd64") "386", "amd64" -> equals("teamcity.agent.jvm.os.arch", if (os == "mac") "x86_64" else "amd64")
"arm64" -> equals("teamcity.agent.jvm.os.arch", "aarch64") "arm64" -> equals("teamcity.agent.jvm.os.arch", "aarch64")
"ppc64le" -> equals("teamcity.agent.jvm.os.arch", "ppc64le")
} }
when (os) { when (os) {
"linux" -> { "linux" -> {

@ -398,7 +398,9 @@ func testStandard() {
dopie := false dopie := false
switch runtime.GOOS { switch runtime.GOOS {
case "linux": case "linux":
dopie = true if runtime.GOARCH != "ppc64le" {
dopie = true
}
case "windows": case "windows":
// windows/arm64 always uses pie buildmode, no need to test everything again. // windows/arm64 always uses pie buildmode, no need to test everything again.
// only on Go 1.15 or later, with CGO_ENABLED and gcc found in path // only on Go 1.15 or later, with CGO_ENABLED and gcc found in path
@ -413,6 +415,11 @@ func testStandard() {
} }
} }
} }
case "darwin":
if runtime.GOARCH == "amd64" {
// arm64 can only build in pie mode
dopie = true
}
} }
if dopie { if dopie {
fmt.Println("\nTesting PIE buildmode, default backend") fmt.Println("\nTesting PIE buildmode, default backend")

@ -3,17 +3,21 @@ set -e
set -x set -x
apt-get -qq update apt-get -qq update
apt-get install -y dwz wget make git gcc curl jq lsof apt-get install -y gcc curl jq lsof
dwz --version
version=$1 version=$1
arch=$2 arch=$2
if [ "$arch" != "ppc64le" ]; then
apt-get install -y dwz
dwz --version
fi
function getgo { function getgo {
export GOROOT=/usr/local/go/$1 export GOROOT=/usr/local/go/$1
if [ ! -d "$GOROOT" ]; then if [ ! -d "$GOROOT" ]; then
wget -q https://dl.google.com/go/"$1".linux-"${arch}".tar.gz curl -sO https://dl.google.com/go/"$1".linux-"${arch}".tar.gz
mkdir -p /usr/local/go mkdir -p /usr/local/go
tar -C /usr/local/go -xzf "$1".linux-"${arch}".tar.gz tar -C /usr/local/go -xzf "$1".linux-"${arch}".tar.gz
mv -f /usr/local/go/go "$GOROOT" mv -f /usr/local/go/go "$GOROOT"
@ -25,6 +29,7 @@ if [ "$version" = "gotip" ]; then
getgo $(curl https://go.dev/VERSION?m=text | head -1) getgo $(curl https://go.dev/VERSION?m=text | head -1)
export GOROOT_BOOTSTRAP=$GOROOT export GOROOT_BOOTSTRAP=$GOROOT
export GOROOT=/usr/local/go/go-tip export GOROOT=/usr/local/go/go-tip
apt-get install -y git
git clone https://go.googlesource.com/go /usr/local/go/go-tip git clone https://go.googlesource.com/go /usr/local/go/go-tip
cd /usr/local/go/go-tip/src cd /usr/local/go/go-tip/src
./make.bash ./make.bash
@ -44,7 +49,9 @@ GOPATH=$(pwd)/go
export GOPATH export GOPATH
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
go version go version
go install honnef.co/go/tools/cmd/staticcheck@2023.1 || true if [ "$arch" != "ppc64le" ]; then
go install honnef.co/go/tools/cmd/staticcheck@2023.1 || true
fi
uname -a uname -a
echo "$PATH" echo "$PATH"
@ -68,7 +75,7 @@ if [ "$arch" = "386" ]; then
fi fi
set +e set +e
make test go run _scripts/make.go test
x=$? x=$?
if [ "$version" = "gotip" ]; then if [ "$version" = "gotip" ]; then
exit 0 exit 0

@ -5941,6 +5941,7 @@ func TestStacktraceExtlinkMac(t *testing.T) {
// Tests stacktrace for programs built using external linker. // Tests stacktrace for programs built using external linker.
// See issue #3194 // See issue #3194
skipUnlessOn(t, "darwin only", "darwin") skipUnlessOn(t, "darwin only", "darwin")
skipOn(t, "broken on darwin/amd64/pie", "darwin", "amd64", "pie")
withTestProcess("issue3194", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) { withTestProcess("issue3194", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
setFunctionBreakpoint(p, t, "main.main") setFunctionBreakpoint(p, t, "main.main")
assertNoError(grp.Continue(), t, "First Continue()") assertNoError(grp.Continue(), t, "First Continue()")