forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperf.groovy
32 lines (27 loc) · 1.11 KB
/
perf.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Import the utility functionality.
import jobs.generation.*;
def project = GithubProject
def branch = GithubBranchName
def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolderName(branch)
[true, false].each { isPR ->
['Windows_NT'].each { os ->
def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) {
// Set the label.
steps {
// Batch
batchFile("set __TestIntermediateDir=int&&build.cmd release x64")
batchFile("tests\\runtest.cmd release x64")
batchFile("tests\\scripts\\run-xunit-perf.cmd")
}
}
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto-elevated') // Just run against Windows_NT VM’s for now.
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
if (isPR) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} Perf Tests") // Add a PR trigger.
}
else {
// Set a push trigger
Utilities.addGithubPushTrigger(newJob)
}
}
}