Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[ARM/CI] Add manual triggering CI for arm and armel
Browse files Browse the repository at this point in the history
Add follwoing manual triggering CI for arm and armel.
This will be used by new arm32 CI script which is already applied to Core-Setup and CoreFX.

  Ubuntu arm Cross Release Build
  Ubuntu arm Cross Debug Build
  Ubuntu16.04 arm Cross Release Build
  Ubuntu16.04 arm Cross Debug Build
  Tizen arm Cross Release Build
  Tizen arm Cross Debug Build

Currently there are two default CI for ARM cross using ARM emulator
which will be disabled after enabling new arm32 CI.
  Linux ARM Emulator Cross Release Build
  Linux ARM Emulator Cross Debug Build

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
  • Loading branch information
hqueue committed Feb 28, 2017
1 parent f8c2a6d commit 2736984
Showing 1 changed file with 109 additions and 8 deletions.
117 changes: 109 additions & 8 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def static getOSGroup(def os) {
'FreeBSD':'FreeBSD',
'CentOS7.1': 'Linux',
'OpenSUSE42.1': 'Linux',
'Tizen': 'Linux',
'LinuxARMEmulator': 'Linux']
def osGroup = osGroupMap.get(os, null)
assert osGroup != null : "Could not find os group for ${os}"
Expand All @@ -49,6 +50,7 @@ class Constants {
'LinuxARMEmulator',
'Ubuntu16.04',
'Ubuntu16.10',
'Tizen',
'Fedora23']

def static crossList = ['Ubuntu', 'OSX', 'CentOS7.1', 'RHEL7.2', 'Debian8.4']
Expand Down Expand Up @@ -139,7 +141,9 @@ def static setMachineAffinity(def job, def os, def architecture) {
job.with {
label('arm64')
}
} else if ((architecture == 'arm' || architecture == 'arm64') && os == 'Ubuntu') {
} else if (architecture == 'arm64' && os == 'Ubuntu') {
Utilities.setMachineAffinity(job, os, 'arm-cross-latest');
} else if ((architecture == 'arm') && (os == 'Ubuntu' || os == 'Ubuntu16.04' || os == 'Tizen')) {
Utilities.setMachineAffinity(job, os, 'arm-cross-latest');
} else {
Utilities.setMachineAffinity(job, os, 'latest-or-auto');
Expand Down Expand Up @@ -295,7 +299,6 @@ def static getJobName(def configuration, def architecture, def os, def scenario,
}
break
case 'arm64':
case 'arm':
// These are cross builds
if (isLinuxEmulatorBuild == false) {
baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
Expand All @@ -304,6 +307,22 @@ def static getJobName(def configuration, def architecture, def os, def scenario,
baseName = architecture.toLowerCase() + '_emulator_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
}
break
case 'arm':
// These are cross builds
if (isLinuxEmulatorBuild == false) {
if (os == 'Tizen') {
// ABI: softfp
baseName = 'armel_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
}
else {
// ABI: hardfp
baseName = 'arm_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
}
}
else {
baseName = architecture.toLowerCase() + '_emulator_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
}
break
case 'x86':
baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase()
break
Expand Down Expand Up @@ -1151,12 +1170,21 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
case 'Ubuntu':
if (isLinuxEmulatorBuild == false) {
// Removing the regex will cause this to run on each PR.
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build", "(?i).*test\\W+Linux\\W+arm\\W+cross\\W+${configuration}.*")
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build", "(?i).*test\\W+Ubuntu\\W+arm\\W+cross\\W+${configuration}.*")
}
else {
Utilities.addGithubPRTriggerForBranch(job, branch, "Linux ARM Emulator Cross ${configuration} Build")
}
break
case 'Ubuntu16.04'
// Removing the regex will cause this to run on each PR.
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build", "(?i).*test\\W+Ubuntu16.04\\W+arm\\W+cross\\W+${configuration}.*")
break;
case 'Tizen':
architecture='armel'
// Removing the regex will cause this to run on each PR.
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build", "(?i).*test\\W+Tizen\\W+armel\\W+cross\\W+${configuration}.*")
break;
case 'Windows_NT':
if (configuration == 'Debug' || configuration == 'Release')
{
Expand Down Expand Up @@ -2066,6 +2094,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
case 'CentOS7.1':
case 'RHEL7.2':
case 'OpenSUSE42.1':
case 'Tizen':
case 'Fedora23': // editor brace matching: {
switch (architecture) {
case 'x64':
Expand Down Expand Up @@ -2147,17 +2176,48 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
Utilities.addArchival(newJob, "bin/Product/**")
break
case 'arm':
// All builds for ARM architecture are run on Ubuntu currently
assert os == 'Ubuntu'
if (isLinuxEmulatorBuild == false) {
buildCommands += """echo \"Using rootfs in /opt/arm-liux-genueabihf-root\"
ROOTFS_DIR=/opt/arm-linux-genueabihf-root ./build.sh skipmscorlib arm cross verbose ${lowerConfiguration}"""
// Cross builds for ARM runs on Ubuntu, Ubuntu16.04 and Tizen currently
assert (os == 'Ubuntu') || (os == 'Ubuntu16.04') || (os == 'Tizen')

// Make sure the build configuration is either of debug or release
assert ( lowerConfiguration == 'debug' ) || ( lowerConfiguration == 'release' )

if (os == 'Ubuntu') {
arm_abi="arm"
linuxCodeName="trusty"
} else if (os == 'Ubuntu16.04') {
arm_abi="arm"
linuxCodeName="xenial"
}
else if (os == Tizen) {
arm_abi="armel"
linuxCodeName="tizen"
}

// Unzip the Windows test binaries first. Exit with 0
buildCommands += "unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.x64.${configuration} || exit 0"

// Unpack the corefx binaries
buildCommands += "mkdir ./bin/CoreFxBinDir"
buildCommands += "tar -xf ./bin/build.tar.gz -C ./bin/CoreFxBinDir"

// Call the ARM CI script to cross build and test using docker
buildCommands += """./tests/scripts/arm32_ci_script.sh \\
--mode=docker \\
--${arm_abi} \\
--linuxCodeName=${linuxCodeName} \\
--buildConfig=${lowerConfiguration} \\
--testRootDir=./bin/tests/Windows_NT.x64.${configuration} \\
--coreFxBinDir=./bin/CoreFxBinDir \\
--testDirFile=./tests/testsRunningInsideARM.txt"""

// Basic archiving of the build, no pal tests
Utilities.addArchival(newJob, "bin/Product/**")
break
}
else {
assert os == 'Ubuntu'
// Make sure the build configuration is either of debug or release
assert ( lowerConfiguration == 'debug' ) || ( lowerConfiguration == 'release' )

Expand Down Expand Up @@ -2254,7 +2314,7 @@ combinedScenarios.each { scenario ->
}
break
case 'arm':
if ((os != 'Ubuntu') && (os != 'Windows_NT')) {
if ((os != 'Ubuntu') && (os != 'Ubuntu16.04') && (os != 'Tizen') && (os != 'Windows_NT')) {
return
}
break
Expand Down Expand Up @@ -2488,6 +2548,7 @@ combinedScenarios.each { scenario ->
}
else {
// Setup corefx and Windows test binaries for Linux ARM Emulator Build
// and cross build for ubuntu-arm, ubuntu16.04-arm and tizen-armel
if (isLinuxEmulatorBuild) {
// Define the Windows Tests and Corefx build job names
def WindowTestsName = projectFolder + '/' +
Expand Down Expand Up @@ -2515,6 +2576,46 @@ combinedScenarios.each { scenario ->
}
}
}
else if ( architecture == 'arm' && ( os == 'Ubuntu' || os == 'Ubuntu16.04' || os == 'Tizen')) {
// Cross build for ubuntu-arm, ubuntu16.04-arm and tizen-armel
// Define the Windows Tests and Corefx build job names
def WindowTestsName = projectFolder + '/' +
Utilities.getFullJobName(project,
getJobName(lowerConfiguration,
'x64' ,
'windows_nt',
'default',
true),
false)
def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' +
Utilities.getFolderName(branch)

// Copy the Windows test binaries and the Corefx build binaries
copyArtifacts(WindowTestsName) {
excludePatterns('**/testResults.xml', '**/*.ni.dll')
buildSelector {
latestSuccessful(true)
}
}

if (os == 'Ubuntu') {
arm_abi="arm"
corefx_os="ubuntu14.04"
} else if (os == 'Ubuntu16.04') {
arm_abi="arm"
corefx_os="ubuntu16.04"
}
else if (os == Tizen) {
arm_abi="arm"
corefx_os="tizen"
}
copyArtifacts("${corefxFolder}/${corefx_os}_${arm_abi}_cross_${lowerConfiguration}") {
includePatterns('bin/build.tar.gz')
buildSelector {
latestSuccessful(true)
}
}
}

buildCommands.each { buildCommand ->
shell(buildCommand)
Expand Down

0 comments on commit 2736984

Please sign in to comment.