Skip to content

Commit 98cbeff

Browse files
committed
Modernize CI configuration: Modern = RS4 + Dev 15.7; Legacy = 2008 R2 + Dev14
* Update Windows build matrix to use a modernized CI configuration: Modern = RS4 + Dev 15.7 and Legacy = Server 2008 R2 + Dev14 * Update script logic for forcing detection of a specific msbuild version Note that the legacy config is the same as before (2008 R2 ~= Windows 7 SP1) which is the lowest Windows OS version ChakraCore supports, and VS 2015 / Dev14 is the lowest Visual Studio version ChakraCore supports. Unfortunately this configuration leaves out coverage for any Windows 8 versions (Modern config was previously 2012 R2 ~= Windows 8.1).
1 parent c52f68a commit 98cbeff

File tree

3 files changed

+57
-27
lines changed

3 files changed

+57
-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: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,28 @@ 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', // Windows Server 2008 R2 ~= Windows 7
22+
'Windows_NT': 'Windows', // 'latest-or-auto' -> Windows Server 2012 R2 ~= Windows 8.1 aka Blue
23+
'windows.10.amd64.clientrs4.devex.open': 'Windows', // = 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 legacyWindowsMachine = 'Windows 7'
31+
def legacyWindowsMachineTag = defaultMachineTag
32+
33+
def latestWindowsMachine = 'windows.10.amd64.clientrs4.devex.open' // Windows 10 RS4 with Dev 15.7
34+
def latestWindowsMachineTag = null // all information is included in the machine name above
35+
2636
def dailyRegex = 'dailies'
2737

2838
// ---------------
2939
// HELPER CLOSURES
3040
// ---------------
3141

32-
def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
42+
def CreateBuildTask = { isPR, buildArch, buildType, machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
3343
if (excludeConfigIf && excludeConfigIf(isPR, buildArch, buildType)) {
3444
return // early exit: we don't want to create a job for this configuration
3545
}
@@ -75,7 +85,13 @@ def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExt
7585
false, // doNotFailIfNothingArchived=false ~= failIfNothingArchived
7686
false) // archiveOnlyIfSuccessful=false ~= archiveAlways
7787

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

8197
if (nonDefaultTaskSetup == null) {
@@ -95,11 +111,11 @@ def CreateBuildTask = { isPR, buildArch, buildType, machine, configTag, buildExt
95111
}
96112
}
97113

98-
def CreateBuildTasks = { machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
114+
def CreateBuildTasks = { machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup ->
99115
[true, false].each { isPR ->
100116
['x86', 'x64', 'arm'].each { buildArch ->
101117
['debug', 'test', 'release'].each { buildType ->
102-
CreateBuildTask(isPR, buildArch, buildType, machine, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup)
118+
CreateBuildTask(isPR, buildArch, buildType, machine, machineTag, configTag, buildExtra, testExtra, runCodeAnalysis, excludeConfigIf, nonDefaultTaskSetup)
103119
}
104120
}
105121
}
@@ -142,7 +158,7 @@ def CreateXPlatBuildTask = { isPR, buildType, staticBuild, machine, platform, co
142158
true, // doNotFailIfNothingArchived=false ~= failIfNothingArchived (true ~= doNotFail)
143159
false) // archiveOnlyIfSuccessful=false ~= archiveAlways
144160

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

148164
if (nonDefaultTaskSetup == null) {
@@ -213,42 +229,53 @@ def CreateStyleCheckTasks = { taskString, taskName, checkName ->
213229
Utilities.addGithubPushTrigger(newJob)
214230
}
215231

216-
Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', 'latest-or-auto')
232+
Utilities.setMachineAffinity(newJob, 'Ubuntu16.04', defaultMachineTag)
217233
}
218234
}
219235

220236
// ----------------
221237
// INNER LOOP TASKS
222238
// ----------------
223239

224-
CreateBuildTasks('Windows_NT', null, null, "-winBlue", true, null, null)
240+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, null, null, "-winBlue", true, null, null)
225241

226242
// Add some additional daily configs to trigger per-PR as a quality gate:
227243
// x64_debug Slow Tests
228244
CreateBuildTask(true, 'x64', 'debug',
229-
'Windows_NT', 'ci_slow', null, '-winBlue -includeSlow', false, null, null)
245+
latestWindowsMachine, latestWindowsMachineTag, 'ci_slow', null, '-winBlue -includeSlow', false, null, null)
230246
// x64_debug DisableJIT
231247
CreateBuildTask(true, 'x64', 'debug',
232-
'Windows_NT', 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null)
248+
latestWindowsMachine, latestWindowsMachineTag, 'ci_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', false, null, null)
233249
// x64_debug Lite
234250
CreateBuildTask(true, 'x64', 'debug',
235-
'Windows_NT', 'ci_lite', '"/p:BuildLite=true"', '-winBlue -lite', false, null, null)
251+
latestWindowsMachine, latestWindowsMachineTag, 'ci_lite', '"/p:BuildLite=true"', '-winBlue -lite', false, null, null)
252+
// x64_debug Legacy
253+
CreateBuildTask(true, 'x64', 'debug',
254+
legacyWindowsMachine, legacyWindowsMachineTag, 'ci_legacy', 'msbuild14', '-win7 -includeSlow', false, null, null)
236255

237256
// -----------------
238257
// DAILY BUILD TASKS
239258
// -----------------
240259

241260
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,
261+
// build and test on the legacy configuration (Windows 7 + VS 2015 (Dev14))
262+
CreateBuildTasks(legacyWindowsMachine, legacyWindowsMachineTag, 'daily_legacy', 'msbuild14', '-win7 -includeSlow', false,
263+
/* excludeConfigIf */ { isPR, buildArch, buildType -> (buildArch == 'arm') },
264+
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
265+
DailyBuildTaskSetup(newJob, isPR,
266+
"Windows 7 ${config}",
267+
'legacy\\s+tests')})
268+
269+
// build and test on the latest configuration (RS4 + VS 2017 Dev 15.7) with -includeSlow
270+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_slow', null, '-winBlue -includeSlow', false,
244271
/* excludeConfigIf */ null,
245272
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
246273
DailyBuildTaskSetup(newJob, isPR,
247274
"Windows ${config}",
248275
'slow\\s+tests')})
249276

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,
277+
// build and test on the latest configuration (RS4 + VS 2017 Dev 15.7) with JIT disabled
278+
CreateBuildTasks(latestWindowsMachine, latestWindowsMachineTag, 'daily_disablejit', '"/p:BuildJIT=false"', '-winBlue -disablejit', true,
252279
/* excludeConfigIf */ null,
253280
/* nonDefaultTaskSetup */ { newJob, isPR, config ->
254281
DailyBuildTaskSetup(newJob, isPR,
@@ -292,7 +319,7 @@ if (isXPlatCompatibleBranch) {
292319
CreateXPlatBuildTasks(osString, "linux", "ubuntu", branch, null, "")
293320

294321
// Create a PR/continuous task to check ubuntu/static/debug/no-icu
295-
[true, false].each { isPR ->
322+
[true, false].each { isPR ->
296323
CreateXPlatBuildTask(isPR, "debug", true, osString, "linux",
297324
"ubuntu", branch, null, "--no-icu", "--not-tag exclude_noicu", "")
298325
}

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)