Merge pull request #6859 from adiaaida/addNMakeOption
[platform/upstream/coreclr.git] / perf.groovy
1 // Import the utility functionality.
2
3 import jobs.generation.*;
4
5 def project = GithubProject
6 def branch = GithubBranchName
7 def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolderName(branch)
8
9 [true, false].each { isPR ->
10     ['Windows_NT'].each { os ->
11         def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) {
12             // Set the label.
13             label('performance')
14             steps {
15                     // Batch
16                     batchFile("C:\\tools\\nuget install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory C:\\tools -Prerelease")
17                     batchFile("python C:\\tools\\Microsoft.BenchView.JSONFormat.0.1.0-pre008\\tools\\machinedata.py")
18                     batchFile("set __TestIntermediateDir=int&&build.cmd release x64")
19                     batchFile("tests\\runtest.cmd release x64")
20                     batchFile("tests\\scripts\\run-xunit-perf.cmd")
21             }
22         }
23
24         // Save machinedata.json to /artifact/bin/ Jenkins dir
25         def archiveSettings = new ArchivalSettings()
26         archiveSettings.addFiles('sandbox\\perf-*.xml')
27         archiveSettings.addFiles('machinedata.json')
28         Utilities.addArchival(newJob, archiveSettings)
29
30         Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
31         if (isPR) {
32             Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} Perf Tests") // Add a PR trigger.
33         }
34         else {
35             // Set a push trigger
36             Utilities.addGithubPushTrigger(newJob)
37         }
38     }
39 }