@@ -7,19 +7,19 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.*
7
7
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
8
8
import java.lang.IllegalArgumentException
9
9
10
- fun benchmarksProject () = Project {
10
+ fun benchmarksProject (buildVersion : BuildType ) = Project {
11
11
this .id(" Benchmarks" )
12
12
this .name = " Benchmarks"
13
13
14
14
params {
15
15
param(" teamcity.ui.settings.readOnly" , " true" )
16
16
}
17
17
18
- val benchmarkAll = benchmarkAll()
18
+ val benchmarkAll = benchmarkAll(buildVersion )
19
19
val benchmarks = listOf (
20
- benchmark(" js" , Platform .Linux ),
21
- benchmark(" jvm" , Platform .Linux ),
22
- * platforms.map { benchmark(" native" , it) }.toTypedArray()
20
+ benchmark(" js" , Platform .Linux , buildVersion ),
21
+ benchmark(" jvm" , Platform .Linux , buildVersion ),
22
+ * platforms.map { benchmark(" native" , it, buildVersion ) }.toTypedArray()
23
23
)
24
24
25
25
benchmarks.forEach { benchmark ->
@@ -34,21 +34,33 @@ fun benchmarksProject() = Project {
34
34
buildTypesOrder = listOf (benchmarkAll, * benchmarks.toTypedArray())
35
35
}
36
36
37
- fun Project.benchmarkAll () = BuildType {
37
+ fun Project.benchmarkAll (buildVersion : BuildType ) = BuildType {
38
38
id(" Benchmark_All" )
39
39
this .name = " Benchmark (All)"
40
40
type = BuildTypeSettings .Type .COMPOSITE
41
41
42
+ dependsOnSnapshot(buildVersion)
43
+ buildNumberPattern = buildVersion.depParamRefs.buildNumber.ref
44
+
42
45
commonConfigure()
43
46
}.also { buildType(it) }
44
47
45
- fun Project.benchmark (target : String , platform : Platform ) = buildType(" ${target} Benchmark" , platform) {
48
+ fun Project.benchmark (target : String , platform : Platform , buildVersion : BuildType ) = buildType(" ${target} Benchmark" , platform) {
49
+
50
+ dependsOnSnapshot(buildVersion)
51
+
52
+ params {
53
+ param(versionSuffixParameter, buildVersion.depParamRefs[versionSuffixParameter].ref)
54
+ param(teamcitySuffixParameter, buildVersion.depParamRefs[teamcitySuffixParameter].ref)
55
+ }
56
+
46
57
steps {
47
58
gradle {
48
59
name = " Benchmark"
49
60
tasks = benchmarkTask(target, platform)
50
61
jdkHome = " %env.$jdk %"
51
62
param(" org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration" , " GLOBAL" )
63
+ gradleParams = " --info --stacktrace -P$versionSuffixParameter =%$versionSuffixParameter % -P$teamcitySuffixParameter =%$teamcitySuffixParameter %"
52
64
buildFile = " "
53
65
gradleWrapperPath = " "
54
66
}
0 commit comments