-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize Windows Modern and Legacy Jenkins CI #4767
Changes from 3 commits
8cbb049
bb059ae
b35e066
484f177
6a529fb
d382ecc
22cc5d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,18 +18,28 @@ def msbuildTypeMap = [ | |
|
||
// convert `machine` parameter to OS component of PR task name | ||
def machineTypeToOSTagMap = [ | ||
'Windows_NT': 'Windows', // Windows Server 2012 R2, equivalent to Windows 8.1 (aka Blue) | ||
'Windows 7': 'Windows 7', // Windows Server 2008 R2 ~= Windows 7 | ||
'Windows_NT': 'Windows', // 'latest-or-auto' -> Windows Server 2012 R2 ~= Windows 8.1 aka Blue | ||
// 'latest-dev15-5' -> Windows Server 2016 ~= Windows 10 RS2/RS3, with Dev15.5 | ||
'Ubuntu16.04': 'Ubuntu', | ||
'OSX': 'OSX' | ||
] | ||
|
||
def defaultMachineTag = 'latest-or-auto' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
|
||
def legacyWindowsMachine = 'Windows 7' | ||
def legacyWindowsMachineTag = defaultMachineTag | ||
|
||
def latestWindowsMachine = 'Windows_NT' | ||
def latestWindowsMachineTag = 'latest-dev15-5' | ||
|
||
def dailyRegex = 'dailies' | ||
|
||
// --------------- | ||
// HELPER CLOSURES | ||
// --------------- | ||
|
||
def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup -> | ||
def CreateBuildTask = { isPR, buildArch, buildType, machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup -> | ||
if (excludeConfigIf && excludeConfigIf(isPR, buildArch, buildType)) { | ||
return // early exit: we don't want to create a job for this configuration | ||
} | ||
|
@@ -75,7 +85,7 @@ def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExt | |
false, // doNotFailIfNothingArchived=false ~= failIfNothingArchived | ||
false) // archiveOnlyIfSuccessful=false ~= archiveAlways | ||
|
||
Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto') | ||
Utilities.setMachineAffinity(newJob, machine, machineTag ?: defaultMachineTag) | ||
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") | ||
|
||
if (nonDefaultTaskSetup == null) { | ||
|
@@ -95,11 +105,11 @@ def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExt | |
} | ||
} | ||
|
||
def CreateBuildTasks = { machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup -> | ||
def CreateBuildTasks = { machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup -> | ||
[true, false].each { isPR -> | ||
['x86', 'x64', 'arm'].each { buildArch -> | ||
['debug', 'test', 'release'].each { buildType -> | ||
CreateBuildTask(isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup) | ||
CreateBuildTask(isPR, buildArch, buildType, machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup) | ||
} | ||
} | ||
} | ||
|
@@ -221,34 +231,45 @@ def CreateStyleCheckTasks = { taskString, taskName, checkName -> | |
// INNER LOOP TASKS | ||
// ---------------- | ||
|
||
CreateBuildTasks('Windows_NT', null, null, "-winBlue", true, null, null) | ||
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, null, "-winBlue", true, null, null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah; you removed an additional null that you didn't need to. Needs a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, good catch, thanks. |
||
|
||
// Add some additional daily configs to trigger per-PR as a quality gate: | ||
// x64_debug Slow Tests | ||
CreateBuildTask(true, 'x64', 'debug', | ||
'Windows_NT', 'ci_slow', null, '-winBlue -includeSlow', false, null, null) | ||
latestWindowsMachine, latestWindowsMachineTag, 'ci_slow', null, '-winBlue -includeSlow', false, null, null) | ||
// x64_debug DisableJIT | ||
CreateBuildTask(true, 'x64', 'debug', | ||
'Windows_NT', 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null) | ||
latestWindowsMachine, latestWindowsMachineTag, 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null) | ||
// x64_debug Lite | ||
CreateBuildTask(true, 'x64', 'debug', | ||
'Windows_NT', 'ci_lite', '"/p:BuildLite=true"', '-winBlue -lite', false, null, null) | ||
latestWindowsMachine, latestWindowsMachineTag, 'ci_lite', '"/p:BuildLite=true"', '-winBlue -lite', false, null, null) | ||
// x64_debug Legacy | ||
CreateBuildTask(true, 'x64', 'debug', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So ci_lite and ci_disablejit don't get rolling builds. Is that intentional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no need for rolling builds since they're intended to be daily builds. The PR-only tasks for these daily build configs were added as a minimal sanity check. This is by design. We can revisit this (or the general distinction of daily|rolling) as a separate discussion and work item if you think that's worthwhile. |
||
legacyWindowsMachine, legacyWindowsMachineTag, 'ci_legacy', 'msbuild14', '-win7 -includeSlow', false, null, null) | ||
|
||
// ----------------- | ||
// DAILY BUILD TASKS | ||
// ----------------- | ||
|
||
if (!branch.endsWith('-ci')) { | ||
// build and test on the usual configuration (VS 2015) with -includeSlow | ||
CreateBuildTasks('Windows_NT', 'daily_slow', null, '-winBlue -includeSlow', false, | ||
// build and test on the legacy configuration (Windows 7 + VS 2015 (Dev14)) | ||
CreateBuildTasks(legacyWindowsMachine, legacyWindowsMachineTag, 'daily_legacy', 'msbuild14', '-win7 -includeSlow', false, | ||
/* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') }, | ||
/* nonDefaultTaskSetup */ { newJob, isPR, config -> | ||
DailyBuildTaskSetup(newJob, isPR, | ||
"Windows 7 ${config}", | ||
'legacy\\s+tests')}) | ||
|
||
// build and test on the latest configuration (Server 2016 + VS 2017 (Dev15)) with -includeSlow | ||
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_slow', null, '-winBlue -includeSlow', false, | ||
/* excludeConfigIf */ null, | ||
/* nonDefaultTaskSetup */ { newJob, isPR, config -> | ||
DailyBuildTaskSetup(newJob, isPR, | ||
"Windows ${config}", | ||
'slow\\s+tests')}) | ||
|
||
// build and test on the usual configuration (VS 2015) with JIT disabled | ||
CreateBuildTasks('Windows_NT', 'daily_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', true, | ||
// build and test on the latest configuration (Server 2016 + VS 2017 (Dev15)) with JIT disabled | ||
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', true, | ||
/* excludeConfigIf */ null, | ||
/* nonDefaultTaskSetup */ { newJob, isPR, config -> | ||
DailyBuildTaskSetup(newJob, isPR, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we still bother trying to find dev12?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.