Skip to content

Commit 14eac1f

Browse files
author
Abduqodiri Qurbonzoda
committed
Fix native benchmarks task name
1 parent e6fa6a9 commit 14eac1f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.teamcity/settings.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import jetbrains.buildServer.configs.kotlin.v2018_2.*
22
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.*
33
import jetbrains.buildServer.configs.kotlin.v2018_2.triggers.*
4+
import java.lang.IllegalArgumentException
45

56
/*
67
The settings script is an entry point for defining a TeamCity
@@ -149,11 +150,10 @@ fun Project.benchmark(target: String, platform: String) = BuildType {
149150
// Display name of the build configuration
150151
this.name = "${target}Benchmark ($platform)"
151152

152-
153153
steps {
154154
gradle {
155155
name = "Benchmark"
156-
tasks = "${target}Benchmark"
156+
tasks = "${if (target == "native") nativeTarget(platform) else target}Benchmark"
157157
jdkHome = "%env.$jdk%"
158158
param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
159159
buildFile = ""
@@ -199,6 +199,13 @@ fun Project.benchmark(target: String, platform: String) = BuildType {
199199
}
200200
}.also { buildType(it) }
201201

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+
202209
fun BuildType.dependsOn(build: BuildType, configure: Dependency.() -> Unit) =
203210
apply {
204211
dependencies.dependency(build, configure)

0 commit comments

Comments
 (0)