Add mac/amd64 & linux/arm64 builders (#2349)
* Add mac/amd64 build * Set arch requirements for all builds * Add linux/arm64 build
This commit is contained in:
parent
d739cb04e3
commit
baa580b626
21
.teamcity/settings.kts
vendored
21
.teamcity/settings.kts
vendored
@ -4,6 +4,7 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPu
|
|||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.golang
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.golang
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.dockerCommand
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.dockerCommand
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.exec
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.powerShell
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.powerShell
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.BuildFailureOnMetric
|
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.BuildFailureOnMetric
|
||||||
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.failOnMetricChange
|
import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.failOnMetricChange
|
||||||
@ -41,8 +42,12 @@ val targets = arrayOf(
|
|||||||
|
|
||||||
"linux/386/1.16",
|
"linux/386/1.16",
|
||||||
|
|
||||||
|
"linux/arm64/1.16",
|
||||||
|
|
||||||
"windows/amd64/1.16",
|
"windows/amd64/1.16",
|
||||||
"windows/amd64/tip"
|
"windows/amd64/tip",
|
||||||
|
|
||||||
|
"mac/amd64/1.16",
|
||||||
)
|
)
|
||||||
|
|
||||||
project {
|
project {
|
||||||
@ -181,10 +186,21 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso
|
|||||||
param("jetbrains_powershell_scriptArguments", "-version ${"go$version"} -arch $arch")
|
param("jetbrains_powershell_scriptArguments", "-version ${"go$version"} -arch $arch")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"mac" -> {
|
||||||
|
exec {
|
||||||
|
name = "Test"
|
||||||
|
path = "_scripts/tests_mac.sh"
|
||||||
|
arguments = "${"go$version"} $arch %system.teamcity.build.tempDir%"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
requirements {
|
requirements {
|
||||||
|
when (arch) {
|
||||||
|
"amd64" -> equals("teamcity.agent.jvm.os.arch", if (os == "mac") "x86_64" else "amd64")
|
||||||
|
"arm64" -> equals("teamcity.agent.jvm.os.arch", "aarch64")
|
||||||
|
}
|
||||||
when (os) {
|
when (os) {
|
||||||
"linux" -> {
|
"linux" -> {
|
||||||
matches("teamcity.agent.jvm.os.family", "Linux")
|
matches("teamcity.agent.jvm.os.family", "Linux")
|
||||||
@ -192,6 +208,9 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso
|
|||||||
"windows" -> {
|
"windows" -> {
|
||||||
matches("teamcity.agent.jvm.os.family", "Windows")
|
matches("teamcity.agent.jvm.os.family", "Windows")
|
||||||
}
|
}
|
||||||
|
"mac" -> {
|
||||||
|
matches("teamcity.agent.jvm.os.family", "Mac OS")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
29
_scripts/test_mac.sh
Normal file
29
_scripts/test_mac.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
GOVERSION=$1
|
||||||
|
ARCH=$2
|
||||||
|
TMPDIR=$3
|
||||||
|
|
||||||
|
if [ "$GOVERSION" = "gotip" ]; then
|
||||||
|
git clone https://go.googlesource.com/go $TMPDIR/go
|
||||||
|
export GOROOT_BOOTSTRAP=$GOROOT
|
||||||
|
cd $TMPDIR/go/src
|
||||||
|
./make.bash
|
||||||
|
cd -
|
||||||
|
else
|
||||||
|
cd $TMPDIR
|
||||||
|
curl -sSL "https://storage.googleapis.com/golang/go$GOVERSION.darwin-$ARCH.tar.gz" | tar -vxz
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $TMPDIR/gopath
|
||||||
|
|
||||||
|
export GOROOT="$TMPDIR/go"
|
||||||
|
export GOPATH="$TMPDIR/gopath"
|
||||||
|
export GOARCH="$ARCH"
|
||||||
|
export PATH="$GOROOT/bin:$PATH"
|
||||||
|
|
||||||
|
make test
|
||||||
Loading…
Reference in New Issue
Block a user