Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit ccae500

Browse files
committed
Merge pull request #3086 from gkhanna79/CIMscorlib
Update CI to no longer request mscorlib build for osx/ubuntu on Windows.
2 parents f494e8f + 10a478e commit ccae500

File tree

2 files changed

+33
-24
lines changed

2 files changed

+33
-24
lines changed

build.sh

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,21 @@ restoreBuildTools()
192192

193193
isMSBuildOnNETCoreSupported()
194194
{
195+
# This needs to be updated alongwith corresponding changes to netci.groovy.
195196
__isMSBuildOnNETCoreSupported=0
196197

197-
if [ "$__BuildOS" == "Linux" ]; then
198-
if [ "$__DistroName" == "ubuntu" ]; then
198+
if [ "$__BuildArch" == "x64" ]; then
199+
if [ "$__BuildOS" == "Linux" ]; then
200+
if [ "$__DistroName" == "ubuntu" ]; then
201+
__OSVersion=$(lsb_release -sr)
202+
if [ "$__OSVersion" == "14.04" ]; then
203+
__isMSBuildOnNETCoreSupported=1
204+
fi
205+
fi
206+
elif [ "$__BuildOS" == "OSX" ]; then
199207
__isMSBuildOnNETCoreSupported=1
200-
fi
201-
elif [ "$__BuildOS" == "OSX" ]; then
202-
__isMSBuildOnNETCoreSupported=1
203-
fi
208+
fi
209+
fi
204210
}
205211

206212
build_mscorlib()
@@ -211,12 +217,10 @@ build_mscorlib()
211217
return
212218
fi
213219

214-
# CI_TODO: Until we switch CI to stop building mscorlib for platforms supported by isMSBuildOnNETCoreSupported function,
215-
# we should ignore skipping building mscorlib.
216-
# if [ $__SkipMSCorLib == 1 ]; then
217-
# echo "Skipping building mscorlib."
218-
# return
219-
# fi
220+
if [ $__SkipMSCorLib == 1 ]; then
221+
echo "Skipping building mscorlib."
222+
return
223+
fi
220224

221225
# Restore buildTools
222226

@@ -256,12 +260,10 @@ generate_NugetPackages()
256260
return
257261
fi
258262

259-
# CI_TODO: Until we switch CI to stop building mscorlib for platforms supported by isMSBuildOnNETCoreSupported function,
260-
# we should ignore skipping building mscorlib.
261-
# if [ $__SkipMSCorLib == 1 ]; then
262-
# echo "Unable to generate Microsoft.NETCore.Runtime.CoreCLR nuget package since mscorlib was not built."
263-
# return
264-
# fi
263+
if [ $__SkipMSCorLib == 1 ]; then
264+
echo "Unable to generate Microsoft.NETCore.Runtime.CoreCLR nuget package since mscorlib was not built."
265+
return
266+
fi
265267

266268
echo "Generating nuget packages for "$__BuildOS
267269

netci.groovy

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,13 @@ combinedScenarios.each { scenario ->
666666
}
667667

668668
// Run the rest of the build
669-
// Build the mscorlib for the other OS's
669+
670+
// Remove this command step once we can build mscorlib on CentOS/OpenSuse
670671
buildCommands += "build.cmd ${lowerConfiguration} ${architecture} linuxmscorlib"
672+
673+
// Remove this command step once we can build mscorlib on FreeBSD
671674
buildCommands += "build.cmd ${lowerConfiguration} ${architecture} freebsdmscorlib"
672-
buildCommands += "build.cmd ${lowerConfiguration} ${architecture} osxmscorlib"
673-
675+
674676
if (!enableCorefxTesting) {
675677
// Zip up the tests directory so that we don't use so much space/time copying
676678
// 10s of thousands of files around.
@@ -719,10 +721,15 @@ combinedScenarios.each { scenario ->
719721
switch (architecture) {
720722
case 'x64':
721723
case 'x86':
722-
// Build commands are the same regardless of scenario on non-Windows other OS's.
723-
724724
// On other OS's we skipmscorlib but run the pal tests
725-
buildCommands += "./build.sh skipmscorlib verbose ${lowerConfiguration} ${architecture}"
725+
if ((architecture == 'x64') && ((os == 'Ubuntu') || (os == 'OSX')))
726+
{
727+
buildCommands += "./build.sh verbose ${lowerConfiguration} ${architecture}"
728+
}
729+
else
730+
{
731+
buildCommands += "./build.sh skipmscorlib verbose ${lowerConfiguration} ${architecture}"
732+
}
726733
buildCommands += "src/pal/tests/palsuite/runpaltests.sh \${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration} \${WORKSPACE}/bin/paltestout"
727734

728735
// Basic archiving of the build

0 commit comments

Comments
 (0)