File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
import jetbrains.buildServer.configs.kotlin.v2018_2.*
2
2
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.*
3
3
import jetbrains.buildServer.configs.kotlin.v2018_2.triggers.*
4
+ import java.lang.IllegalArgumentException
4
5
5
6
/*
6
7
The settings script is an entry point for defining a TeamCity
@@ -149,11 +150,10 @@ fun Project.benchmark(target: String, platform: String) = BuildType {
149
150
// Display name of the build configuration
150
151
this .name = " ${target} Benchmark ($platform )"
151
152
152
-
153
153
steps {
154
154
gradle {
155
155
name = " Benchmark"
156
- tasks = " ${target} Benchmark"
156
+ tasks = " ${if (target == " native " ) nativeTarget(platform) else target} Benchmark"
157
157
jdkHome = " %env.$jdk %"
158
158
param(" org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration" , " GLOBAL" )
159
159
buildFile = " "
@@ -199,6 +199,13 @@ fun Project.benchmark(target: String, platform: String) = BuildType {
199
199
}
200
200
}.also { buildType(it) }
201
201
202
+ fun nativeTarget (platform : String ): String = when (platform) {
203
+ " Mac OS X" -> " macosX64"
204
+ " Linux" -> " linuxX64"
205
+ " Windows" -> " mingwX64"
206
+ else -> throw IllegalArgumentException (" Unknown platform: $platform " )
207
+ }
208
+
202
209
fun BuildType.dependsOn (build : BuildType , configure : Dependency .() -> Unit ) =
203
210
apply {
204
211
dependencies.dependency(build, configure)
You can’t perform that action at this time.
0 commit comments