Skip to content

Commit 42ed4d4

Browse files
committed
[MERGE #5307 @dilijev] Modernize CI configuration: Modern = RS4 + Dev 15.7; Legacy = (2008 R2 & 2012 R2) + Dev14
Merge pull request #5307 from dilijev:ci-updated-legacy-110 * Update Windows build matrix to use a modernized CI configuration: Modern = RS4 + Dev 15.7 and Legacy7 = Server 2008 R2 + Dev14 and Legacy8 = Server 2012 R2 + Dev14 * Update script logic for forcing detection of a specific msbuild version Note that the legacy OS is the same as before (2008 R2 ~= Windows 7 SP1) which is the lowest Windows OS version ChakraCore supports, and the legacy version of VS has been updated to VS 2015 / Dev14, which is now the lowest Visual Studio version ChakraCore supports (since Dev12 support was dropped). This change also adds a second legacy configuration for 2012 R2 ~= Windows 8.1 Blue.
2 parents 7368d59 + 282688b commit 42ed4d4

File tree

3 files changed

+85
-27
lines changed

3 files changed

+85
-27
lines changed

Build/scripts/add_msbuild_path.cmd

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
:: add_msbuild_path.cmd
77
::
88
:: Locate msbuild.exe and add it to the PATH
9-
set USE_MSBUILD_12=%1
9+
set FORCE_MSBUILD_VERSION=%1
1010

11-
if "%USE_MSBUILD_12%" == "True" (
12-
echo Skipping Dev15 and trying Dev12...
13-
goto :LABEL_USE_MSBUILD_12
11+
if "%FORCE_MSBUILD_VERSION%" == "msbuild14" (
12+
echo Skipping Dev15 and trying Dev14...
13+
goto :LABEL_USE_MSBUILD_14
1414
)
1515

1616
where /q msbuild.exe
@@ -20,8 +20,10 @@ if "%ERRORLEVEL%" == "0" (
2020

2121
REM Try Dev15 first
2222

23-
set MSBUILD_VERSION=15.0
23+
echo Trying to locate Dev15...
2424

25+
:LABEL_USE_MSBUILD_15
26+
set MSBUILD_VERSION=15.0
2527
set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin"
2628

2729
if not exist "%MSBUILD_PATH%\msbuild.exe" (
@@ -40,8 +42,9 @@ if exist "%MSBUILD_PATH%\msbuild.exe" (
4042
goto :MSBuildFound
4143
)
4244

43-
echo Dev15 not found, trying Dev14...
45+
echo Dev15 not found, trying to locate Dev14...
4446

47+
:LABEL_USE_MSBUILD_14
4548
set MSBUILD_VERSION=14.0
4649
set "MSBUILD_PATH=%ProgramFiles%\msbuild\%MSBUILD_VERSION%\Bin\x86"
4750

@@ -57,7 +60,7 @@ if exist "%MSBUILD_PATH%\msbuild.exe" (
5760
goto :MSBuildFound
5861
)
5962

60-
echo Dev14 not found, trying Dev12...
63+
echo Dev14 not found, trying to locate Dev12...
6164

6265
:LABEL_USE_MSBUILD_12
6366
set MSBUILD_VERSION=12.0

netci.groovy

Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,31 @@ def msbuildTypeMap = [
1818

1919
// convert `machine` parameter to OS component of PR task name
2020
def machineTypeToOSTagMap = [
21-
'Windows_NT': 'Windows', // Windows Server 2012 R2, equivalent to Windows 8.1 (aka Blue)
21+
'Windows 7': 'Windows 7', // 'latest-or-auto' -> Windows Server 2008 R2 ~= Windows 7
22+
'Windows_NT': 'Windows 8.1', // 'latest-or-auto' -> Windows Server 2012 R2 ~= Windows 8.1 aka Blue
23+
'windows.10.amd64.clientrs4.devex.open': 'Windows 10', // = Windows 10 RS4 with Dev 15.7
2224
'Ubuntu16.04': 'Ubuntu',
2325
'OSX10.12': 'OSX'
2426
]
2527

28+
def defaultMachineTag = 'latest-or-auto'
29+
30+
def legacyWindows7Machine = 'Windows 7'
31+
def legacyWindows7MachineTag = defaultMachineTag
32+
33+
def legacyWindows8Machine = 'Windows_NT'
34+
def legacyWindows8MachineTag = defaultMachineTag
35+
36+
def latestWindowsMachine = 'windows.10.amd64.clientrs4.devex.open' // Windows 10 RS4 with Dev 15.7
37+
def latestWindowsMachineTag = null // all information is included in the machine name above
38+
2639
def dailyRegex = 'dailies'
2740

2841
// ---------------
2942
// HELPER CLOSURES
3043
// ---------------
3144

32-
def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
45+
def CreateBuildTask = { isPR, buildArch, buildType, machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
3346
if (excludeConfigIf && excludeConfigIf(isPR, buildArch, buildType)) {
3447
return // early exit: we don't want to create a job for this configuration
3548
}
@@ -75,7 +88,13 @@ def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExt
7588
false, // doNotFailIfNothingArchived=false ~= failIfNothingArchived
7689
false) // archiveOnlyIfSuccessful=false ~= archiveAlways
7790

78-
Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto')
91+
if (machineTag == null) {
92+
// note: this is a different overload and not equivalent to calling setMachineAffinity(_,_,null)
93+
Utilities.setMachineAffinity(newJob, machine)
94+
} else {
95+
Utilities.setMachineAffinity(newJob, machine, machineTag)
96+
}
97+
7998
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
8099

81100
if (nonDefaultTaskSetup == null) {
@@ -95,11 +114,11 @@ def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExt
95114
}
96115
}
97116

98-
def CreateBuildTasks = { machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
117+
def CreateBuildTasks = { machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
99118
[true, false].each { isPR ->
100119
['x86', 'x64', 'arm'].each { buildArch ->
101120
['debug', 'test', 'release'].each { buildType ->
102-
CreateBuildTask(isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup)
121+
CreateBuildTask(isPR, buildArch, buildType, machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup)
103122
}
104123
}
105124
}
@@ -142,7 +161,7 @@ def CreateXPlatBuildTask = { isPR, buildType, staticBuild, machine, platform, co
142161
true, // doNotFailIfNothingArchived=false ~= failIfNothingArchived (true ~= doNotFail)
143162
false) // archiveOnlyIfSuccessful=false ~= archiveAlways
144163

145-
Utilities.setMachineAffinity(newJob, machine, 'latest-or-auto')
164+
Utilities.setMachineAffinity(newJob, machine, defaultMachineTag)
146165
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
147166

148167
if (nonDefaultTaskSetup == null) {
@@ -213,47 +232,83 @@ def CreateStyleCheckTasks = { taskString, taskName, checkName ->
213232
Utilities.addGithubPushTrigger(newJob)
214233
}
215234

216-
Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', 'latest-or-auto')
235+
Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', defaultMachineTag)
217236
}
218237
}
219238

220239
// ----------------
221240
// INNER LOOP TASKS
222241
// ----------------
223242

224-
CreateBuildTasks('Windows_NT', null, null, "-winBlue", true, null, null)
243+
// The latest machine seems to have a configuration problem preventing us from building ARM.
244+
// For now, build ARM on the LKG config, Legacy Windows 8.1 (Blue) config.
245+
// TODO When the configuration is updated, unify this config split.
246+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, null, null, "-win10", true,
247+
/* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') }, null)
248+
CreateBuildTasks(legacyWindows8Machine, legacyWindows8MachineTag, null, null, "-winBlue", true,
249+
/* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch != 'arm') }, null)
225250

226251
// Add some additional daily configs to trigger per-PR as a quality gate:
227252
// x64_debug Slow Tests
228253
CreateBuildTask(true, 'x64', 'debug',
229-
'Windows_NT', 'ci_slow', null, '-winBlue -includeSlow', false, null, null)
254+
latestWindowsMachine, latestWindowsMachineTag, 'ci_slow', null, '-win10 -includeSlow', false, null, null)
230255
// x64_debug DisableJIT
231256
CreateBuildTask(true, 'x64', 'debug',
232-
'Windows_NT', 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null)
257+
latestWindowsMachine, latestWindowsMachineTag, 'ci_disablejit', '"/p:BuildJIT=false"', '-win10 -disablejit', false, null, null)
233258
// x64_debug Lite
234259
CreateBuildTask(true, 'x64', 'debug',
235-
'Windows_NT', 'ci_lite', '"/p:BuildLite=true"', '-winBlue -lite', false, null, null)
260+
latestWindowsMachine, latestWindowsMachineTag, 'ci_lite', '"/p:BuildLite=true"', '-win10 -lite', false, null, null)
261+
// x64_debug Legacy (Windows 7)
262+
CreateBuildTask(true, 'x64', 'debug',
263+
legacyWindows7Machine, legacyWindows7MachineTag, 'ci_legacy7', 'msbuild14', '-win7 -includeSlow', false, null, null)
264+
// x64_debug Legacy (Windows 8.1 (Blue))
265+
CreateBuildTask(true, 'x64', 'debug',
266+
legacyWindows8Machine, legacyWindows8MachineTag, 'ci_legacy8', 'msbuild14', '-winBlue -includeSlow', false, null, null)
236267

237268
// -----------------
238269
// DAILY BUILD TASKS
239270
// -----------------
240271

241272
if (!branch.endsWith('-ci')) {
242-
// build and test on the usual configuration (VS 2015) with -includeSlow
243-
CreateBuildTasks('Windows_NT', 'daily_slow', null, '-winBlue -includeSlow', false,
273+
// build and test on the legacy configuration (Windows 7 + VS 2015 (Dev14))
274+
CreateBuildTasks(legacyWindows7Machine, legacyWindows7MachineTag, 'daily_legacy7', 'msbuild14', '-win7 -includeSlow', false,
275+
/* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') },
276+
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
277+
DailyBuildTaskSetup(newJob, isPR,
278+
"Windows 7 ${config}",
279+
'legacy7?\\s+tests)')})
280+
281+
// build and test on the legacy configuration (Windows 8.1 (Blue) + VS 2015 (Dev14))
282+
CreateBuildTasks(legacyWindows8Machine, legacyWindows8MachineTag, 'daily_legacy8', 'msbuild14', '-winBlue -includeSlow', false,
283+
/* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') },
284+
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
285+
DailyBuildTaskSetup(newJob, isPR,
286+
"Windows 8 ${config}",
287+
'legacy8?\\s+tests')})
288+
289+
// build and test on the latest configuration (RS4 + VS 2017 Dev 15.7) with -includeSlow
290+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_slow', null, '-win10 -includeSlow', false,
244291
/* excludeConfigIf */ null,
245292
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
246293
DailyBuildTaskSetup(newJob, isPR,
247294
"Windows ${config}",
248295
'slow\\s+tests')})
249296

250-
// build and test on the usual configuration (VS 2015) with JIT disabled
251-
CreateBuildTasks('Windows_NT', 'daily_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', true,
297+
// build and test on the latest configuration (RS4 + VS 2017 Dev 15.7) with JIT disabled
298+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_disablejit', '"/p:BuildJIT=false"', '-win10 -disablejit', true,
252299
/* excludeConfigIf */ null,
253300
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
254301
DailyBuildTaskSetup(newJob, isPR,
255302
"Windows ${config}",
256303
'(disablejit|nojit)\\s+tests')})
304+
305+
// build and test on the latest configuration (RS4 + VS 2017 Dev 15.7) with Lite build
306+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_lite', '"/p:BuildLite=true"', '-win10 -lite', true,
307+
/* excludeConfigIf */ null,
308+
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
309+
DailyBuildTaskSetup(newJob, isPR,
310+
"Windows ${config}",
311+
'lite\\s+tests')})
257312
}
258313

259314
// ----------------
@@ -292,7 +347,7 @@ if (isXPlatCompatibleBranch) {
292347
CreateXPlatBuildTasks(osString, "linux", "ubuntu", branch, null, "")
293348

294349
// Create a PR/continuous task to check ubuntu/static/debug/no-icu
295-
[true, false].each { isPR ->
350+
[true, false].each { isPR ->
296351
CreateXPlatBuildTask(isPR, "debug", true, osString, "linux",
297352
"ubuntu", branch, null, "--no-icu", "--not-tag exclude_noicu", "")
298353
}

test/jenkins.build.init.cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ if not "%JENKINS_BUILD%" == "True" (
1313
set REPO_ROOT=%~dp0\..
1414

1515
set JENKINS_BUILD_ARGS=
16-
set JENKINS_USE_MSBUILD_12=
16+
set JENKINS_FORCE_MSBUILD_VERSION=
1717
:ContinueArgParse
1818
if not [%1]==[] (
19-
if [%1]==[msbuild12] (
20-
set JENKINS_USE_MSBUILD_12=True
19+
if [%1]==[msbuild14] (
20+
set JENKINS_FORCE_MSBUILD_VERSION=%1
2121
goto :ContinueArgParseEnd
2222
)
2323

@@ -36,4 +36,4 @@ if not [%1]==[] (
3636
:: Set up msbuild.exe
3737
:: ========================================
3838

39-
call %REPO_ROOT%\Build\scripts\add_msbuild_path.cmd %JENKINS_USE_MSBUILD_12%
39+
call %REPO_ROOT%\Build\scripts\add_msbuild_path.cmd %JENKINS_FORCE_MSBUILD_VERSION%

0 commit comments

Comments
 (0)