summaryrefslogtreecommitdiff
path: root/netci.groovy
diff options
context:
space:
mode:
authorjashook <jashoo@microsoft.com>2017-04-17 15:53:12 -0700
committerjashook <jashoo@microsoft.com>2017-06-15 14:34:52 -0700
commitf75b7093f12137364f1a296545dc6defb528fd10 (patch)
tree29cf66873aadc5be88324af535d42815f053ac11 /netci.groovy
parentb386a62a3b191d01723fa9a5c65fa4914dcb4854 (diff)
downloadcoreclr-f75b7093f12137364f1a296545dc6defb528fd10.tar.gz
coreclr-f75b7093f12137364f1a296545dc6defb528fd10.tar.bz2
coreclr-f75b7093f12137364f1a296545dc6defb528fd10.zip
Add the arm64 unix CI
This will enable unix arm64 testing in CI. Currently there are no default tirggers; however, anyone will be able to request the jobs.
Diffstat (limited to 'netci.groovy')
-rwxr-xr-xnetci.groovy150
1 files changed, 123 insertions, 27 deletions
diff --git a/netci.groovy b/netci.groovy
index 5b583c5ae4..a2382449b1 100755
--- a/netci.groovy
+++ b/netci.groovy
@@ -146,11 +146,15 @@ class Constants {
def static architectureList = ['arm', 'arm64', 'x64', 'x86']
}
-def static setMachineAffinity(def job, def os, def architecture) {
+def static setMachineAffinity(def job, def os, def architecture, def options = null) {
if (architecture == 'arm64' && os == 'Windows_NT') {
Utilities.setMachineAffinity(job, os, 'latest-arm64');
- } else if (architecture == 'arm64' && os == 'Ubuntu') {
- Utilities.setMachineAffinity(job, os, 'arm-cross-latest');
+ } else if (architecture == 'arm64' && os != 'Windows_NT' && options == null) {
+ Utilities.setMachineAffinity(job, os, 'arm64-small-page-size');
+ } else if (architecture == 'arm64' && os != 'Windows_NT' && options['large_pages'] == true) {
+ Utilities.setMachineAffinity(job, os, 'arm64-huge-page-size');
+ } else if (architecture == 'arm64' && os != 'Windows_NT' && options['is_build_only'] == true) {
+ Utilities.setMachineAffinity(job, os, 'arm64-cross-latest');
} else if ((architecture == 'arm') && (os == 'Ubuntu' || os == 'Ubuntu16.04' || os == 'Tizen')) {
Utilities.setMachineAffinity(job, 'Ubuntu', 'arm-cross-latest');
} else {
@@ -339,8 +343,14 @@ def static getJobName(def configuration, def architecture, def os, def scenario,
}
break
case 'arm64':
- // These are cross builds
- baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
+ if (os.toLowerCase() == "windows_nt") {
+ // These are cross builds
+ baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
+ }
+ else {
+ // Defaults to a small page size set of machines.
+ baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + "small_page_size"
+ }
break
case 'arm':
// These are cross builds
@@ -382,11 +392,7 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
Utilities.addGithubPushTrigger(job)
break
case 'arm64':
- if (os == 'Windows_NT') {
- Utilities.addGithubPushTrigger(job)
- // TODO: Add once external email sending is available again
- // addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
- }
+ Utilities.addGithubPushTrigger(job)
break
default:
println("Unknown architecture: ${architecture}");
@@ -587,8 +593,9 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
if (os != 'CentOS7.1' && !(os in bidailyCrossList)) {
assert (os == 'Windows_NT') || (os in Constants.crossList)
if (architecture == 'arm64') {
- assert (os == 'Windows_NT')
- Utilities.addPeriodicTrigger(job, '@daily')
+ if (os == 'Windows_NT') {
+ Utilities.addPeriodicTrigger(job, '@daily')
+ }
// TODO: Add once external email sending is available again
// addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
}
@@ -608,7 +615,6 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
if (os != 'CentOS7.1' && os != 'OSX10.12' && !(os in bidailyCrossList)) {
assert (os == 'Windows_NT') || (os in Constants.crossList)
if (architecture == 'arm64') {
- assert (os == 'Windows_NT')
// TODO: Enable a periodic trigger after tests are updated.
// Utilities.addPeriodicTrigger(job, '@daily')
// TODO: Add once external email sending is available again
@@ -1106,11 +1112,9 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
'jashook',
'JosephTremoulet',
'pgavlin',
- 'pkukol',
'russellhadley',
'RussKeldorph',
'sandreenko',
- 'sivarv',
'swaroop-sridhar',
'gkhanna79',
'jkotas',
@@ -1122,6 +1126,49 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
]
switch (os) {
+ case 'Ubuntu':
+ case 'Ubuntu16.04':
+ switch (scenario) {
+ case 'pri1':
+ if (configuration == 'Release') {
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
+ }
+ break
+ case 'r2r':
+ if (configuration == 'Checked' || configuration == 'Release') {
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ }
+ break
+ case 'pri1r2r':
+ if (configuration == 'Checked' || configuration == 'Release') {
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ }
+ break
+ case 'gcstress15_pri1r2r':
+ if (configuration == 'Release' || configuration == 'Checked') {
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ }
+ break
+ case 'r2r_jitstress1':
+ case 'r2r_jitstress2':
+ case 'r2r_jitstressregs1':
+ case 'r2r_jitstressregs2':
+ case 'r2r_jitstressregs3':
+ case 'r2r_jitstressregs4':
+ case 'r2r_jitstressregs8':
+ case 'r2r_jitstressregs0x10':
+ case 'r2r_jitstressregs0x80':
+ case 'r2r_jitstressregs0x1000':
+ case 'r2r_jitminopts':
+ case 'r2r_jitforcerelocs':
+ if (configuration == 'Release' || configuration == 'Checked') {
+ def displayStr = getR2RStressModeDisplayName(scenario)
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ${displayStr} R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ }
+ break
+ default:
+ break
+ }
case 'Windows_NT':
switch (scenario) {
case 'default':
@@ -1482,6 +1529,10 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
buildCommands += "build.cmd ${lowerConfiguration} ${arch} linuxmscorlib"
buildCommands += "build.cmd ${lowerConfiguration} ${arch} freebsdmscorlib"
buildCommands += "build.cmd ${lowerConfiguration} ${arch} osxmscorlib"
+
+ if (arch == "x64") {
+ buildCommands += "build.cmd ${lowerConfiguration} arm64 linuxmscorlib"
+ }
// Zip up the tests directory so that we don't use so much space/time copying
// 10s of thousands of files around.
@@ -1643,14 +1694,25 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
}
break
case 'arm64':
- // We don't run the cross build except on Ubuntu
- assert os == 'Ubuntu'
+ def standaloneGc = ''
+ if (scenario == 'standalone_gc') {
+ standaloneGc = 'buildstandalonegc'
+ }
- buildCommands += """echo \"Using rootfs in /opt/aarch64-linux-gnu-root\"
- ROOTFS_DIR=/opt/aarch64-linux-gnu-root ./build.sh skipmscorlib arm64 cross verbose ${lowerConfiguration}"""
+ if (!enableCorefxTesting) {
+ buildCommands += "ROOTFS_DIR=/opt/arm64-xenial-rootfs ./build.sh skipmscorlib verbose ${lowerConfiguration} ${architecture} cross clang3.8 skipnuget ${standaloneGc}"
+
+ // HACK -- Arm64 does not have corefx jobs yet.
+ buildCommands += "git clone https://github.com/dotnet/corefx fx"
+ buildCommands += "ROOTFS_DIR=/opt/arm64-xenial-rootfs-corefx ./fx/build-native.sh -release -buildArch=arm64 -- verbose cross clang3.8"
+ buildCommands += "mkdir ./bin/Product/Linux.arm64.${configuration}/corefxNative"
+ buildCommands += "cp fx/bin/Linux.arm64.Release/native/* ./bin/Product/Linux.arm64.${configuration}/corefxNative"
- // Basic archiving of the build, no pal tests
- Utilities.addArchival(newJob, "bin/Product/**", "bin/Product/**/.nuget/**")
+ // Set time out
+ setTestJobTimeOut(newJob, scenario)
+ // Basic archiving of the build
+ Utilities.addArchival(newJob, "bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so", "bin/Product/**/.nuget/**")
+ }
break
case 'arm':
// Cross builds for ARM runs on Ubuntu, Ubuntu16.04 and Tizen currently
@@ -1743,8 +1805,12 @@ combinedScenarios.each { scenario ->
// Skip totally unimplemented (in CI) configurations.
switch (architecture) {
case 'arm64':
- // Windows only
- if (os != 'Windows_NT' || isBuildOnly) {
+ if (os == 'Ubuntu16.04') {
+ os = 'Ubuntu'
+ }
+
+ // Windows and Ubuntu only
+ if ((os != 'Windows_NT' && os != 'Ubuntu') || isBuildOnly) {
return
}
break
@@ -1974,7 +2040,8 @@ combinedScenarios.each { scenario ->
// Create the new job
def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folderName)) {}
- setMachineAffinity(newJob, os, architecture)
+ def machineAffinityOptions = architecture == 'arm64' ? ['is_build_only': true] : null
+ setMachineAffinity(newJob, os, architecture, machineAffinityOptions)
// Add all the standard options
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
@@ -2058,11 +2125,23 @@ combinedScenarios.each { scenario ->
combinedScenarios.each { scenario ->
[true, false].each { isPR ->
// Architectures. x64 only at this point
- ['x64'].each { architecture ->
+ ['x64', 'arm64'].each { architecture ->
// Put the OS's supported for coreclr cross testing here
Constants.crossList.each { os ->
+ if (architecture == 'arm64') {
+ if (os != "Ubuntu") {
+ return
+ }
+ }
+
Constants.configurationList.each { configuration ->
+ if (architecture == 'arm64') {
+ if (scenario != 'default' && scenario != 'pri1r2r' && scenario != 'gcstress0x3' && scenario != 'gcstress0xc') {
+ return
+ }
+ }
+
if (Constants.jitStressModeScenarios.containsKey(scenario)) {
if (configuration != 'Checked') {
return
@@ -2208,13 +2287,18 @@ combinedScenarios.each { scenario ->
testBuildScenario = 'default'
}
def inputWindowTestsBuildName = ''
+ def inputWindowsTestBuildArch = architecture
+ if (architecture == "arm64") {
+ // Use the x64 test build for arm64 unix
+ inputWindowsTestBuildArch = "x64"
+ }
if (Constants.jitStressModeScenarios.containsKey(testBuildScenario)) {
inputWindowTestsBuildName = projectFolder + '/' +
- Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', 'default', true), isPR)
+ Utilities.getFullJobName(project, getJobName(configuration, inputWindowsTestBuildArch, 'windows_nt', 'default', true), isPR)
}
else {
inputWindowTestsBuildName = projectFolder + '/' +
- Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', testBuildScenario, true), isPR)
+ Utilities.getFullJobName(project, getJobName(configuration, inputWindowsTestBuildArch, 'windows_nt', testBuildScenario, true), isPR)
}
// Enable Server GC for Ubuntu PR builds
def serverGCString = ''
@@ -2456,6 +2540,13 @@ combinedScenarios.each { scenario ->
// Unpack the corefx binaries
shell("tar -xf ./bin/build.tar.gz -C ./bin/CoreFxBinDir")
+ // HACK -- Arm64 does not have corefx jobs yet.
+ // Clone corefx and build the native packages overwriting the x64 packages.
+ if (architecture == 'arm64') {
+ shell("cp ./bin/Product/Linux.arm64.${configuration}/corefxNative/* ./bin/CoreFxBinDir")
+ shell("chmod +x ./bin/Product/Linux.arm64.${configuration}/corerun")
+ }
+
// Unzip the tests first. Exit with 0
shell("unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
@@ -2518,6 +2609,11 @@ combinedScenarios.each { scenario ->
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
// Set timeouts to 240.
setTestJobTimeOut(newJob, scenario)
+
+ if (architecture == 'arm64') {
+ Utilities.setJobTimeout(newJob, 480)
+ }
+
Utilities.addXUnitDotNETResults(newJob, '**/coreclrtests.xml')
// Create a build flow to join together the build and tests required to run this