[true, false].each { isPR ->
['Windows_NT'].each { os ->
+ def architecture = 'x64'
+ def configuration = 'Release'
def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) {
// Set the label.
label('performance')
steps {
// Batch
batchFile("C:\\tools\\nuget install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory C:\\tools -Prerelease")
- batchFile("python C:\\tools\\Microsoft.BenchView.JSONFormat.0.1.0-pre008\\tools\\machinedata.py")
- batchFile("set __TestIntermediateDir=int&&build.cmd release x64")
- batchFile("tests\\runtest.cmd release x64")
+ batchFile("python C:\\tools\\Microsoft.BenchView.JSONFormat.0.1.0-pre010\\tools\\machinedata.py")
+ batchFile("set __TestIntermediateDir=int&&build.cmd release ${architecture}")
+ batchFile("tests\\runtest.cmd release ${architecture}")
batchFile("tests\\scripts\\run-xunit-perf.cmd")
}
}
def osGroup = getOSGroup(os)
def architecture = 'x64'
def configuration = 'Release'
- def newJob = job(Utilities.getFullJobName(project, "perf_${osGroup}", isPR)) {
+ def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) {
steps {
shell("sudo bash ./tests/scripts/perf-prep.sh --branch=${projectName}")
- shell("./init-tools.sh")
+ shell("sudo ./init-tools.sh")
shell("""sudo bash ./tests/scripts/run-xunit-perf.sh \\
--testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
--testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
--coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
--mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
- --coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.Release;\${WORKSPACE}/bin/Unix.AnyCPU.Release;\${WORKSPACE}/bin/AnyOS.AnyCPU.Release\" \\
- --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\"""")
+ --coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.${configuration};\${WORKSPACE}/bin/Unix.AnyCPU.${configuration};\${WORKSPACE}/bin/AnyOS.AnyCPU.${configuration}\" \\
+ --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.${configuration}\"""")
}
}
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto') // Just run against Linux VM\92s for now.
+ // Save machinedata.json to /artifact/bin/ Jenkins dir
+ def archiveSettings = new ArchivalSettings()
+ archiveSettings.addFiles('sandbox/perf-*.xml')
+ archiveSettings.addFiles('machinedata.json')
+ Utilities.addArchival(newJob, archiveSettings)
+
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
+
+ // For perf, we need to keep the run results longer
+ newJob.with {
+ // Enable the log rotator
+ logRotator {
+ artifactDaysToKeep(7)
+ daysToKeep(300)
+ artifactNumToKeep(25)
+ numToKeep(1000)
+ }
+ }
if (isPR) {
TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest()
builder.setGithubContext("${os} Perf Tests")
echo "architecture = $perfArch"
echo "configuration = $perfConfig"
+# Install nuget to download benchview package, which includes the script machinedata.py for machine data collection
+wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
+chmod u+x ./nuget.exe
+./nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory ./tests/scripts -Prerelease
+
+# Install python 3.5.2 to run machinedata.py for machine data collection
+sudo add-apt-repository ppa:fkrull/deadsnakes
+sudo apt-get update
+sudo apt-get --assume-yes install python3.5
+python3.5 --version
+python3.5 ./tests/scripts/Microsoft.BenchView.JSONFormat.0.1.0-pre010/tools/machinedata.py
+
# Set up the copies
# Coreclr build containing the tests and mscorlib
curl http://dotnet-ci.cloudapp.net/job/$perfBranch/job/master/job/release_windows_nt/lastSuccessfulBuild/artifact/bin/tests/tests.zip -o tests.zip
DO_SETUP=TRUE
-dir $testNativeBinDir/../../../../..
-echo 'dir $testNativeBinDir/../../../../..'
-dir $testNativeBinDir/../../../../../packages
-echo 'dir $testNativeBinDir/../../../../../packages'
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli
-echo 'dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli'
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035
-echo 'dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035'
-
if [ ${DO_SETUP} == "TRUE" ]; then
-cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.runner.cli.dll .
-cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.run.core/1.0.0-alpha-build0035/lib/dotnet/*.dll .
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0040/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.runner.cli.dll .
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.run.core/1.0.0-alpha-build0040/lib/dotnet/*.dll .
fi
# Run coreclr performance tests
chmod u+x ./corerun
./corerun Microsoft.DotNet.xunit.performance.runner.cli.dll $test -runner xunit.console.netcore.exe -runnerhost ./corerun -verbose -runid perf-$testname
-
done
+
+mkdir ../../../../../sandbox
+cp *.xml ../../../../../sandbox