diff options
author | Jarret Shook <jashoo@microsoft.com> | 2016-06-15 14:38:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 14:38:29 -0700 |
commit | ab4cc73d46fd733fb3976b4fe53d8837257cc948 (patch) | |
tree | 3ba58ee70e1b071380ab8baf9d8b7e5be656d73f /netci.groovy | |
parent | b3b183e7b4b384792370fae56dcb702afbfcb2a9 (diff) | |
parent | c74d309b22080e58d76a1eb7f9ea0c8262fc135b (diff) | |
download | coreclr-ab4cc73d46fd733fb3976b4fe53d8837257cc948.tar.gz coreclr-ab4cc73d46fd733fb3976b4fe53d8837257cc948.tar.bz2 coreclr-ab4cc73d46fd733fb3976b4fe53d8837257cc948.zip |
Merge pull request #5786 from prajwal-aithal/devel/arm-ci-cross-build-fix
ARM-CI: Convert Linux ARM emulator CI check to cross build (fixes PR #5680)
Diffstat (limited to 'netci.groovy')
-rwxr-xr-x | netci.groovy | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/netci.groovy b/netci.groovy index e15d677fec..29b640f90e 100755 --- a/netci.groovy +++ b/netci.groovy @@ -1018,7 +1018,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build") } else { - Utilities.addGithubPRTriggerForBranch(job, branch, "Linux ARM Emulator Build", "(?i).*test\\W+Linux\\W+arm\\W+emulator.*") + Utilities.addGithubPRTriggerForBranch(job, branch, "Linux ARM Emulator Cross ${configuration} Build", "(?i).*test\\W+Linux\\W+arm\\W+emulator\\W+${configuration}.*") } break default: @@ -1728,19 +1728,29 @@ combinedScenarios.each { scenario -> break } else { + // Build only for Debug or Release + if ( lowerConfiguration != 'debug' && lowerConfiguration != 'release' ) { + break + } + + // Setup variables to hold emulator folder path and the rootfs mount path + def armemul_path = '/opt/linux-arm-emulator' + def armrootfs_mountpath = '/opt/linux-arm-emulator-root' // Unmount previously mounted rootfs and mount the Linux ARM emulator rootfs at /opt/linux-arm-emulator-root/ - buildCommands += "if grep -qs '/opt/linux-arm-emulator-root' /proc/mounts; then sudo umount /opt/linux-arm-emulator-root; fi ; sudo mount /opt/linux-arm-emulator/platform/rootfs-t30.ext4 /opt/linux-arm-emulator-root/" - // Remove old copy of coreclr and copy the latest version of coreclr - // This need to be done as it is not possible to clone the repository inside the chroot jail - buildCommands += "sudo rm -rf /opt/linux-arm-emulator-root/home/coreclr; sudo mkdir /opt/linux-arm-emulator-root/home/coreclr; sudo cp -R ./ /opt/linux-arm-emulator-root/home/coreclr" - - // Chroot into the Linux ARM emulator environment and execute the build - buildCommands += """echo \"Chrooting into Linux ARM emulator environment\" - sudo chroot /opt/linux-arm-emulator-root/ /bin/bash -x <<EOF - source /dotnet/setenv/setenv_coreclr.sh - cd home/coreclr - ./build.sh arm clean verbose skipmscorlib -EOF""" + buildCommands += "if grep -qs ${armrootfs_mountpath} /proc/mounts; then sudo umount ${armrootfs_mountpath}; fi ; sudo mount ${armemul_path}/platform/rootfs-t30.ext4 ${armrootfs_mountpath}" + + // Export LINUX_ARM_INCPATH to hold the include paths to be used by CPLUS_INCLUDE_PATH environment variable + // Apply the changes needed to the library search paths to build for the emulator rootfs + buildCommands += """echo \"Exporting LINUX_ARM_INCPATH environment variable\" + source ${armrootfs_mountpath}/dotnet/setenv/setenv_incpath.sh ${armrootfs_mountpath} + + echo \"Applying cross build patch to suit Linux ARM emulator rootfs\" + git am < ${armrootfs_mountpath}/dotnet/setenv/coreclr_cross.patch + + ROOTFS_DIR=${armrootfs_mountpath} CPLUS_INCLUDE_PATH=\$LINUX_ARM_INCPATH CXXFLAGS=\$LINUX_ARM_CXXFLAGS ./build.sh arm-softfp clean cross verbose skipmscorlib clang3.5 ${lowerConfiguration} + + echo \"Rewinding HEAD to master code\" + git reset --hard HEAD^""" // Basic archiving of the build, no pal tests Utilities.addArchival(newJob, "/opt/linux-arm-emulator-root/home/coreclr/bin/Product/**") |