diff options
author | Jose Perez Rodriguez <joperezr@microsoft.com> | 2017-01-13 21:09:03 +0300 |
---|---|---|
committer | Wes Haggard <weshaggard@users.noreply.github.com> | 2017-01-13 21:09:03 +0300 |
commit | 4894b8203dbd963724349e081644e8db9167b232 (patch) | |
tree | 4abc37c3de40159b2d44813300928187d053e655 | |
parent | d4cb9606f1fed174405a2a9f769d99828c3d1a1f (diff) |
Updating CI definition so that the RI PR has the right validation (#15164)
-rw-r--r-- | netci.groovy | 147 |
1 files changed, 74 insertions, 73 deletions
diff --git a/netci.groovy b/netci.groovy index 1826af668b..3b35f1d96a 100644 --- a/netci.groovy +++ b/netci.groovy @@ -27,19 +27,6 @@ def osGroupMap = ['Ubuntu14.04':'Linux', 'RHEL7.2': 'Linux', 'LinuxARMEmulator': 'Linux'] -// Map of osName -> nuget runtime -def targetNugetRuntimeMap = ['OSX' : 'osx.10.10-x64', - 'Ubuntu14.04' : 'ubuntu.14.04-x64', - 'Ubuntu16.04' : 'ubuntu.16.04-x64', - 'Ubuntu16.10' : 'ubuntu.16.10-x64', - 'Fedora23' : 'fedora.23-x64', - 'Fedora24' : 'fedora.24-x64', - 'Debian8.4' : 'debian.8-x64', - 'CentOS7.1' : 'centos.7-x64', - 'OpenSUSE13.2' : 'opensuse.13.2-x64', - 'OpenSUSE42.1' : 'opensuse.42.1-x64', - 'RHEL7.2': 'rhel.7-x64'] - def osShortName = ['Windows 10': 'win10', 'Windows 7' : 'win7', 'Windows_NT' : 'windows_nt', @@ -59,8 +46,6 @@ def osShortName = ['Windows 10': 'win10', def buildArchConfiguration = ['Debug': 'x86', 'Release': 'x64'] -def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', - 'Release': 'win7-x64'] // ************************** // Define code coverage build // ************************** @@ -73,7 +58,7 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', def batchCommand = 'call build.cmd -coverage -outerloop -- /p:WithoutCategories=IgnoreForCI' if (isLocal) { newJobName = "${newJobName}_local" - batchCommand = "${batchCommand} /p:TestWithLocalNativeLibraries=true" + batchCommand = "${batchCommand}" } def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) { steps { @@ -115,7 +100,7 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', shell('python src/Native/Unix/format-code.py checkonly') } } - + // Set up standard options. Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") // Set the machine affinity to Ubuntu14.04 machines @@ -138,7 +123,7 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', ['Debug', 'Release'].each { configurationGroup -> def newJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}" - + def newBuildJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}_bld" def newBuildJob = job(Utilities.getFullJobName(project, newBuildJobName, isPR)) { @@ -155,7 +140,7 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', Utilities.standardJobSetup(newBuildJob, project, isPR, "*/${branch}") // Archive the results Utilities.addArchival(newBuildJob, "bin/build.pack,run-test.cmd,msbuild.log") - + def fullCoreFXBuildJobName = projectFolder + '/' + newBuildJob.name def newTestJobName = "outerloop_${osShortName[osName]}_${configurationGroup.toLowerCase()}_tst" def newTestJob = job(Utilities.getFullJobName(project, newTestJobName, isPR)) { @@ -187,7 +172,8 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', // Set up standard options. Utilities.addStandardOptions(newTestJob, isPR) // Add the unit test results - Utilities.addXUnitDotNETResults(newTestJob, 'bin/tests/**/testResults.xml') + // TODO: Re-enable test analysis when the build refactoring work allows it. + //Utilities.addXUnitDotNETResults(newTestJob, 'bin/tests/**/testResults.xml') def fullCoreFXTestJobName = projectFolder + '/' + newTestJob.name def newJob = buildFlowJob(Utilities.getFullJobName(project, newJobName, isPR)) { @@ -229,13 +215,16 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) { steps { if (osName == 'Windows 10' || osName == 'Windows 7' || osName == 'Windows_NT') { - batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup} -outerloop -- /p:WithoutCategories=IgnoreForCI") + batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup}") + batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build-tests.cmd -${configurationGroup} -outerloop -- /p:WithoutCategories=IgnoreForCI") } else if (osName == 'OSX') { - shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -outerloop -- /p:TestWithLocalNativeLibraries=true /p:TestNugetRuntimeId=${targetNugetRuntimeMap[osName]} /p:WithoutCategories=IgnoreForCI") + shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()}") + shell("HOME=\$WORKSPACE/tempHome ./build-tests.sh -${configurationGroup.toLowerCase()} -outerloop -- /p:WithoutCategories=IgnoreForCI") } else { - shell("sudo HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -outerloop -- /p:TestWithLocalNativeLibraries=true /p:TestNugetRuntimeId=${targetNugetRuntimeMap[osName]} /p:WithoutCategories=IgnoreForCI") + shell("sudo HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()}") + shell("sudo HOME=\$WORKSPACE/tempHome ./build-tests.sh -${configurationGroup.toLowerCase()} -outerloop -- /p:WithoutCategories=IgnoreForCI") } } } @@ -253,7 +242,8 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', // Set up standard options. Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") // Add the unit test results - Utilities.addXUnitDotNETResults(newJob, 'bin/tests/**/testResults.xml') + // TODO: Re-enable test analysis when the build refactoring work allows it. + // Utilities.addXUnitDotNETResults(newJob, 'bin/tests/**/testResults.xml') // Add archival for the built data. Utilities.addArchival(newJob, "msbuild.log", '', doNotFailIfNothingArchived=true, archiveOnlyIfSuccessful=false) // Set up appropriate triggers. PR on demand, otherwise nightly @@ -286,12 +276,12 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', helix("Build.cmd -- /p:Creator=dotnet-bot /p:ArchiveTests=true /p:ConfigurationGroup=${configurationGroup} /p:Configuration=Windows_${configurationGroup} /p:TestDisabled=true /p:EnableCloudTest=true /p:BuildMoniker={uniqueId} /p:TargetQueue=Windows.10.Amd64 /p:TestProduct=CoreFx /p:Branch=master /p:OSGroup=Windows_NT /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken={CloudDropAccessToken} /p:CloudResultsAccessToken={CloudResultsAccessToken} /p:BuildCompleteConnection={BuildCompleteConnection} /p:BuildIsOfficialConnection={BuildIsOfficialConnection} /p:DocumentDbKey={DocumentDbKey} /p:DocumentDbUri=https://hms.documents.azure.com:443/ /p:FuncTestsDisabled=true /p:Performance=true") } } - + Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto') // Set up standard options. Utilities.standardJobSetup(newJob, project, /* isPR */ false, "*/${branch}") - + // Set a periodic trigger Utilities.addPeriodicTrigger(newJob, '@daily') @@ -304,62 +294,71 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', // that don't run per PR can be requested via a magic phrase. // ************************** [true, false].each { isPR -> - ['Debug', 'Release'].each { configurationGroup -> - ['Windows_NT', 'Ubuntu14.04', 'Ubuntu16.04', 'Ubuntu16.10', 'Debian8.4', 'CentOS7.1', 'OpenSUSE13.2', 'OpenSUSE42.1', 'Fedora23', 'Fedora24', 'RHEL7.2', 'OSX'].each { osName -> - def osGroup = osGroupMap[osName] - def newJobName = "${osName.toLowerCase()}_${configurationGroup.toLowerCase()}" + ['netcoreapp'].each { targetGroup -> + ['Debug', 'Release'].each { configurationGroup -> + ['Windows_NT', 'Ubuntu14.04', 'Ubuntu16.04', 'Ubuntu16.10', 'Debian8.4', 'CentOS7.1', 'OpenSUSE13.2', 'OpenSUSE42.1', 'Fedora23', 'Fedora24', 'RHEL7.2', 'OSX'].each { osName -> + def osGroup = osGroupMap[osName] + def newJobName = "${osName.toLowerCase()}_${configurationGroup.toLowerCase()}" - def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) { - // On Windows we use the packer to put together everything. On *nix we use tar - steps { - if (osName == 'Windows 10' || osName == 'Windows 7' || osName == 'Windows_NT') { - batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup} -os:${osGroup} -buildArch:${buildArchConfiguration[configurationGroup]} -TestNugetRuntimeId:${testNugetRuntimeIdConfiguration[configurationGroup]} -- /p:WithoutCategories=IgnoreForCI") - batchFile("C:\\Packer\\Packer.exe .\\bin\\build.pack .\\bin") - } - else { - // Use Server GC for Ubuntu/OSX Debug PR build & test - def useServerGC = (configurationGroup == 'Release' && isPR) ? 'useServerGC' : '' - shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -- ${useServerGC} /p:TestWithLocalNativeLibraries=true /p:TestNugetRuntimeId=${targetNugetRuntimeMap[osName]} /p:WithoutCategories=IgnoreForCI") - // Tar up the appropriate bits. On OSX the tarring is a different syntax for exclusion. - if (osName == 'OSX') { - shell("tar -czf bin/build.tar.gz --exclude *.Tests bin/*.${configurationGroup} bin/ref bin/packages") + def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) { + // On Windows we use the packer to put together everything. On *nix we use tar + steps { + if (osName == 'Windows 10' || osName == 'Windows 7' || osName == 'Windows_NT') { + batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup} -os:${osGroup} -buildArch:${buildArchConfiguration[configurationGroup]} -framework:${targetGroup}") + batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build-tests.cmd -${configurationGroup} -os:${osGroup} -buildArch:${buildArchConfiguration[configurationGroup]} -framework:${targetGroup} -- /p:WithoutCategories=IgnoreForCI") + batchFile("C:\\Packer\\Packer.exe .\\bin\\build.pack .\\bin") } else { - shell("tar -czf bin/build.tar.gz bin/*.${configurationGroup} bin/ref bin/packages --exclude=*.Tests") + // Use Server GC for Ubuntu/OSX Debug PR build & test + def useServerGC = (configurationGroup == 'Release' && isPR) ? 'useServerGC' : '' + shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -framework:${targetGroup} -os:${osGroup}") + shell("HOME=\$WORKSPACE/tempHome ./build-tests.sh -${configurationGroup.toLowerCase()} -framework:${targetGroup} -os:${osGroup} -- ${useServerGC} /p:WithoutCategories=IgnoreForCI") + // Tar up the appropriate bits. On OSX the tarring is a different syntax for exclusion. + if (osName == 'OSX') { + // TODO: Re-enable package archival when the build refactoring work allows it. + // shell("tar -czf bin/build.tar.gz --exclude *.Tests bin/*.${configurationGroup} bin/ref bin/packages") + shell("tar -czf bin/build.tar.gz --exclude *.Tests bin/*.${configurationGroup} bin/ref") + } + else { + // TODO: Re-enable package archival when the build refactoring work allows it. + // shell("tar -czf bin/build.tar.gz bin/*.${configurationGroup} bin/ref bin/packages --exclude=*.Tests") + shell("tar -czf bin/build.tar.gz bin/*.${configurationGroup} bin/ref --exclude=*.Tests") + } } } } - } - // Set the affinity. - Utilities.setMachineAffinity(newJob, osName, 'latest-or-auto') - // Set up standard options. - Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") - // Add the unit test results - Utilities.addXUnitDotNETResults(newJob, 'bin/tests/**/testResults.xml') - def archiveContents = "msbuild.log" - if (osName.contains('Windows')) { - // Packer.exe is a .NET Framework application. When we can use it from the tool-runtime, we can archive the ".pack" file here. - archiveContents += ",bin/build.pack" - } - else { - archiveContents += ",bin/build.tar.gz" - } - // Add archival for the built data. - Utilities.addArchival(newJob, archiveContents, '', doNotFailIfNothingArchived=true, archiveOnlyIfSuccessful=false) - // Set up triggers - if (isPR) { - // Set PR trigger, we run Windows_NT, Ubuntu 14.04, CentOS 7.1 and OSX on every PR. - if ( osName == 'Windows_NT' || osName == 'Ubuntu14.04' || osName == 'CentOS7.1' || osName == 'OSX' ) { - Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${osName} ${configurationGroup} Build and Test") + // Set the affinity. + Utilities.setMachineAffinity(newJob, osName, 'latest-or-auto') + // Set up standard options. + Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") + // Add the unit test results + // TODO: Re-enable test analysis when the build refactoring work allows it. + // Utilities.addXUnitDotNETResults(newJob, 'bin/tests/**/testResults.xml') + def archiveContents = "msbuild.log" + if (osName.contains('Windows')) { + // Packer.exe is a .NET Framework application. When we can use it from the tool-runtime, we can archive the ".pack" file here. + archiveContents += ",bin/build.pack" } else { - Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${osName} ${configurationGroup} Build and Test", "(?i).*test\\W+innerloop\\W+${osName}\\W+${configurationGroup}.*") + archiveContents += ",bin/build.tar.gz" + } + // Add archival for the built data. + Utilities.addArchival(newJob, archiveContents, '', doNotFailIfNothingArchived=true, archiveOnlyIfSuccessful=false) + // Set up triggers + if (isPR) { + // Set PR trigger, we run Windows_NT, Ubuntu 14.04, CentOS 7.1 and OSX on every PR. + if ( osName == 'Windows_NT' || osName == 'Ubuntu14.04' || osName == 'CentOS7.1' || osName == 'OSX' ) { + Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${osName} ${configurationGroup} Build and Test") + } + else { + Utilities.addGithubPRTriggerForBranch(newJob, branch, "Innerloop ${osName} ${configurationGroup} Build and Test", "(?i).*test\\W+innerloop\\W+${osName}\\W+${configurationGroup}.*") + } + } + else { + // Set a push trigger + Utilities.addGithubPushTrigger(newJob) } - } - else { - // Set a push trigger - Utilities.addGithubPushTrigger(newJob) } } } @@ -394,7 +393,9 @@ def testNugetRuntimeIdConfiguration = ['Debug': 'win7-x86', shell(script) // Archive the native and managed binaries - shell("tar -czf bin/build.tar.gz bin/*.${configurationGroup} bin/ref bin/packages --exclude=*.Tests") + // TODO: Re-enable package archival when the build refactoring work allows it. + // shell("tar -czf bin/build.tar.gz bin/*.${configurationGroup} bin/ref bin/packages --exclude=*.Tests") + shell("tar -czf bin/build.tar.gz bin/*.${configurationGroup} bin/ref --exclude=*.Tests") } } |