From: Gaurav Khanna Date: Wed, 31 May 2017 15:53:47 +0000 (-0700) Subject: Default to portable build in dev and official builds (#11985) X-Git-Tag: accepted/tizen/base/20180629.140029~1083^2~593 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2abadfe7f67249cbe2b107d0b3f1b8d6f2ee06b;p=platform%2Fupstream%2Fcoreclr.git Default to portable build in dev and official builds (#11985) --- diff --git a/build-packages.sh b/build-packages.sh index 382e24d..a418464 100755 --- a/build-packages.sh +++ b/build-packages.sh @@ -3,16 +3,15 @@ usage() { echo "Builds the NuGet packages from the binaries that were built in the Build product binaries step." - echo "Usage: build-packages -BuildArch -BuildType [-portable]" + echo "Usage: build-packages -BuildArch -BuildType" echo "BuildArch can be x64, x86, arm, arm64 (default is x64)" echo "BuildType can be release, checked, debug (default is debug)" - echo "-portable - build for Portable Distribution" echo exit 1 } __ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -__PortableBuild=0 +__IsPortableBuild=1 # Use uname to determine what the OS is. OSName=$(uname -s) @@ -71,8 +70,9 @@ while :; do __Arch=$(echo $1| cut -d'=' -f 2) ;; - -portableBuild) - __PortableBuild=1 + -PortableBuild=false) + unprocessedBuildArgs="$unprocessedBuildArgs $1" + __IsPortableBuild=0 ;; *) unprocessedBuildArgs="$unprocessedBuildArgs $1" @@ -81,7 +81,7 @@ while :; do done # Portable builds target the base RID -if [ $__PortableBuild == 1 ]; then +if [ $__IsPortableBuild == 1 ]; then if [ "$__BuildOS" == "Linux" ]; then export __DistroRid="linux-$__Arch" elif [ "$__BuildOS" == "OSX" ]; then diff --git a/build.cmd b/build.cmd index 495df27..b3706ba 100644 --- a/build.cmd +++ b/build.cmd @@ -97,9 +97,6 @@ set __BuildPackages=1 set __BuildNativeCoreLib=1 set __RestoreOptData=1 -REM Is this a portable build? -set __IsPortableBuild= - :Arg_Loop if "%1" == "" goto ArgsDone @@ -117,8 +114,6 @@ if /i "%1" == "debug" (set __BuildTypeDebug=1&set processedArgs=!p if /i "%1" == "checked" (set __BuildTypeChecked=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "release" (set __BuildTypeRelease=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-portable" (set __IsPortableBuild=-portable&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) - REM All arguments after this point will be passed through directly to build.cmd on nested invocations REM using the "all" argument, and must be added to the __PassThroughArgs variable. if [!__PassThroughArgs!]==[] ( @@ -468,7 +463,7 @@ if %__BuildPackages% EQU 1 ( set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.err" REM The conditions as to what to build are captured in the builds file. - @call %__ProjectDir%\run.cmd build -Project=%__SourceDir%\.nuget\packages.builds %__IsPortableBuild% -platform=%__BuildArch% -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! %__RunArgs% %__UnprocessedBuildArgs% + @call %__ProjectDir%\run.cmd build -Project=%__SourceDir%\.nuget\packages.builds -platform=%__BuildArch% -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! %__RunArgs% %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( echo %__MsgPrefix%Error: Nuget package generation failed build failed. Refer to the build log files for details: diff --git a/build.sh b/build.sh index 39e96dd..976e18b 100755 --- a/build.sh +++ b/build.sh @@ -38,7 +38,6 @@ usage() echo "skiptests - skip the tests in the 'tests' subdirectory." echo "skipnuget - skip building nuget packages." echo "skiprestoreoptdata - skip restoring optimization data used by profile-based optimizations." - echo "portable - build for portable RID." echo "verbose - optional argument to enable verbose build output." echo "-skiprestore: skip restoring packages ^(default: packages are restored during build^)." echo "-disableoss: Disable Open Source Signing for System.Private.CoreLib." @@ -617,7 +616,7 @@ __DistroRid="" __cmakeargs="" __SkipGenerateVersion=0 __DoCrossArchBuild=0 -__PortableBuild=0 +__PortableBuild=1 __msbuildonunsupportedplatform=0 __PgoOptDataVersion="" __IbcOptDataVersion="" @@ -674,8 +673,8 @@ while :; do __CrossBuild=1 ;; - -portable) - __PortableBuild=1 + -portablebuild=false) + __PortableBuild=0 ;; verbose) @@ -832,12 +831,22 @@ if [[ $__ClangMajorVersion == 0 && $__ClangMinorVersion == 0 ]]; then __ClangMajorVersion=3 __ClangMinorVersion=6 fi + + if [[ "$__BuildArch" == "armel" ]]; then + # Armel cross build is Tizen specific and does not support Portable RID build + __PortableBuild=0 + fi + else __ClangMajorVersion=3 __ClangMinorVersion=5 fi fi +if [ $__PortableBuild == 0 ]; then + __RunArgs="$__RunArgs -PortableBuild=false" +fi + # Set dependent variables __LogsDir="$__RootBinDir/Logs" diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json b/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json index 5a945a2..6432a88 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json @@ -139,7 +139,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm -e ROOTFS_DIR $(DockerCommonRunArgs) ./build.sh $(PB_BuildType) $(Architecture) $(portableBuild) skipnuget cross -skiprestore stripSymbols -OfficialBuildId=$(OfficialBuildId) -- /flp:\"v=diag\"", + "arguments": "run --rm -e ROOTFS_DIR $(DockerCommonRunArgs) ./build.sh $(PB_BuildType) $(Architecture) skipnuget cross -skiprestore stripSymbols -OfficialBuildId=$(OfficialBuildId) -- /flp:\"v=diag\"", "workingFolder": "", "failOnStandardError": "false" } @@ -157,7 +157,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh $(portableBuild) -BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", + "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh -BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", "workingFolder": "", "failOnStandardError": "false" } @@ -415,9 +415,6 @@ "DockerCopyDest": { "value": "$(Build.BinariesDirectory)/docker_repo" }, - "portableBuild": { - "value": "" - }, "ROOTFS_DIR": { "value": "/crossrootfs/$(Architecture)" }, @@ -450,7 +447,7 @@ "deleteTestResults": true } ], - "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)-$(DockerTag)$(portableBuild)", + "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)-$(DockerTag)", "jobAuthorizationScope": "projectCollection", "jobTimeoutInMinutes": 90, "repository": { diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Linux.json b/buildpipeline/DotNet-CoreClr-Trusted-Linux.json index 5524209..82c282d 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Linux.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Linux.json @@ -121,7 +121,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./build.sh $(PB_BuildType) $(Architecture) $(portableBuild) skipnuget -skiprestore stripSymbols -OfficialBuildId=$(OfficialBuildId) -- /flp:\"v=diag\"", + "arguments": "run --rm $(DockerCommonRunArgs) ./build.sh $(PB_BuildType) $(Architecture) skipnuget -skiprestore stripSymbols -OfficialBuildId=$(OfficialBuildId) -- /flp:\"v=diag\"", "workingFolder": "", "failOnStandardError": "false" } @@ -139,7 +139,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh $(portableBuild) -BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", + "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh -BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", "workingFolder": "", "failOnStandardError": "false" } @@ -376,9 +376,6 @@ "value": "HEAD", "allowOverride": true }, - "portableBuild": { - "value": "" - }, "DockerVolumeName": { "value": "coreclr-$(Build.BuildId)" }, @@ -411,7 +408,7 @@ "deleteTestResults": true } ], - "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)-$(DockerTag)$(portableBuild)", + "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)-$(DockerTag)", "jobAuthorizationScope": "projectCollection", "jobTimeoutInMinutes": 90, "repository": { diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Mac.json b/buildpipeline/DotNet-CoreClr-Trusted-Mac.json index 9770efc..ae289d1 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Mac.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Mac.json @@ -49,7 +49,7 @@ }, "inputs": { "filename": "$(Agent.BuildDirectory)/s/build.sh", - "arguments": "$(PB_BuildType) $(Architecture) $(portableBuild) skipnuget -skiprestore stripSymbols -OfficialBuildId=$(OfficialBuildId)", + "arguments": "$(PB_BuildType) $(Architecture) skipnuget -skiprestore stripSymbols -OfficialBuildId=$(OfficialBuildId)", "workingFolder": "", "failOnStandardError": "false" } @@ -67,7 +67,7 @@ }, "inputs": { "filename": "$(Agent.BuildDirectory)/s/build-packages.sh", - "arguments": "-BuildType=$(PB_BuildType) -BuildArch=$(Architecture) $(portableBuild)", + "arguments": "-BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", "workingFolder": "", "failOnStandardError": "false" } @@ -176,9 +176,6 @@ }, "Label": { "value": "$(Build.BuildNumber)" - }, - "portableBuild": { - "value": "" } }, "demands": [ diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json index a4d0f87..f6a852f 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json @@ -86,7 +86,7 @@ }, "inputs": { "filename": "build.cmd", - "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages -OfficialBuildId=$(OfficialBuildId) -skiprestore -Priority=$(Priority) $(portableBuild)", + "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages -OfficialBuildId=$(OfficialBuildId) -skiprestore -Priority=$(Priority)", "workingFolder": "", "failOnStandardError": "false" } @@ -131,7 +131,7 @@ }, "inputs": { "filename": "build-packages.cmd", - "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) $(portableBuild)", + "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } @@ -294,9 +294,6 @@ "VsoPassword": { "value": null, "isSecret": true - }, - "portableBuild": { - "value": "" } }, "retentionRules": [ diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json index 8a159a8..cb2e570 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json @@ -86,7 +86,7 @@ }, "inputs": { "filename": "build.cmd", - "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages toolset_dir C:\\tools\\clr -OfficialBuildId=$(OfficialBuildId) -Priority=$(Priority) -skiprestore -disableoss $(portableBuild) -- /flp:\"v=diag\"", + "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages toolset_dir C:\\tools\\clr -OfficialBuildId=$(OfficialBuildId) -Priority=$(Priority) -skiprestore -disableoss -- /flp:\"v=diag\"", "workingFolder": "", "failOnStandardError": "false" } @@ -131,7 +131,7 @@ }, "inputs": { "filename": "build-packages.cmd", - "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) $(portableBuild)", + "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType)", "workingFolder": "", "failOnStandardError": "false" } @@ -284,9 +284,6 @@ }, "TeamName": { "value": "DotNetCore" - }, - "portableBuild": { - "value": "" } }, "retentionRules": [ diff --git a/buildpipeline/pipelines.json b/buildpipeline/pipelines.json index 74d1ddc..54fa811 100644 --- a/buildpipeline/pipelines.json +++ b/buildpipeline/pipelines.json @@ -12,99 +12,7 @@ { "Name": "DotNet-CoreClr-Trusted-Linux", "Parameters": { - "DockerTag": "debian82_prereqs_2", - "Rid": "debian.8" - }, - "ReportingParameters": { - "OperatingSystem": "Debian 8.2", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { - "DockerTag": "rhel7_prereqs_2", - "Rid": "rhel.7" - }, - "ReportingParameters": { - "OperatingSystem": "RedHat 7", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { - "DockerTag": "ubuntu1404_prereqs_v3", - "Rid": "ubuntu.14.04" - }, - "ReportingParameters": { - "OperatingSystem": "Ubuntu 14.04", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { - "DockerTag": "ubuntu1604_prereqs", - "Rid": "ubuntu.16.04" - }, - "ReportingParameters": { - "OperatingSystem": "Ubuntu 16.04", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { - "DockerTag": "ubuntu1610_prereqs_v2", - "Rid": "ubuntu.16.10" - }, - "ReportingParameters": { - "OperatingSystem": "Ubuntu 16.10", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { - "DockerTag": "fedora24_prereqs_v4", - "Rid": "fedora.24" - }, - "ReportingParameters": { - "OperatingSystem": "Fedora 24", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { - "DockerTag": "opensuse421_prereqs_v3", - "Rid": "opensuse.42.1" - }, - "ReportingParameters": { - "OperatingSystem": "openSUSE 42.1", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux", - "Parameters": { "DockerTag": "rhel7_prereqs_2", - "portableBuild": "-portable", "Rid": "linux" }, "ReportingParameters": { @@ -117,20 +25,7 @@ { "Name": "DotNet-CoreClr-Trusted-Mac", "Parameters": { - "Rid": "osx.10.12" - }, - "ReportingParameters": { - "OperatingSystem": "OSX 10.12", - "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Mac", - "Parameters": { - "Rid": "osx", - "portableBuild": "-portable" + "Rid": "osx" }, "ReportingParameters": { "OperatingSystem": "OSX", @@ -148,19 +43,6 @@ "ReportingParameters": { "OperatingSystem": "Windows", "Type": "build/product/", - "Architecture": "x64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Windows", - "Parameters": { - "Architecture": "x64", - "portableBuild": "-portable" - }, - "ReportingParameters": { - "OperatingSystem": "Windows", - "Type": "build/product/", "SubType" : "PortableBuild", "Architecture": "x64", "PB_BuildType": null @@ -174,19 +56,6 @@ "ReportingParameters": { "OperatingSystem": "Windows", "Type": "build/product/", - "Architecture": "arm64", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Windows", - "Parameters": { - "Architecture": "arm64", - "portableBuild": "-portable" - }, - "ReportingParameters": { - "OperatingSystem": "Windows", - "Type": "build/product/", "SubType" : "PortableBuild", "Architecture": "arm64", "PB_BuildType": null @@ -200,19 +69,6 @@ "ReportingParameters": { "OperatingSystem": "Windows", "Type": "build/product/", - "Architecture": "arm", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Windows", - "Parameters": { - "Architecture": "arm", - "portableBuild": "-portable" - }, - "ReportingParameters": { - "OperatingSystem": "Windows", - "Type": "build/product/", "SubType" : "PortableBuild", "Architecture": "arm", "PB_BuildType": null @@ -220,17 +76,8 @@ }, { "Name": "DotNet-CoreClr-Trusted-Windows-x86", - "ReportingParameters": { - "OperatingSystem": "Windows", - "Type": "build/product/", - "Architecture": "x86", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Windows-x86", "Parameters": { - "portableBuild": "-portable" + "Architecture": "x86" }, "ReportingParameters": { "OperatingSystem": "Windows", @@ -250,23 +97,7 @@ "Parameters": { "DockerTag": "ubuntu-14.04-cross-0cd4667-20172211042239", "Architecture": "arm", - "Rid": "ubuntu.14.04" - }, - "ReportingParameters": { - "OperatingSystem": "Ubuntu 14.04", - "SubType": "CrossBuild", - "Type": "build/product/", - "Architecture": "arm", - "PB_BuildType": null - } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux-Crossbuild", - "Parameters": { - "DockerTag": "ubuntu-14.04-cross-0cd4667-20172211042239", - "Architecture": "arm", - "portableBuild": "-portable", - "Rid": "ubuntu.14.04" + "Rid": "linux" }, "ReportingParameters": { "OperatingSystem": "Linux", @@ -275,21 +106,6 @@ "Architecture": "arm", "PB_BuildType": null } - }, - { - "Name": "DotNet-CoreClr-Trusted-Linux-Crossbuild", - "Parameters": { - "DockerTag": "ubuntu-16.04-cross-ef0ac75-20175511035548", - "Architecture": "arm", - "Rid": "ubuntu.16.04" - }, - "ReportingParameters": { - "OperatingSystem": "Ubuntu 16.04", - "SubType": "CrossBuild", - "Type": "build/product/", - "Architecture": "arm", - "PB_BuildType": null - } } ] } diff --git a/config.json b/config.json index 7b4bb8e..a5f98aa 100644 --- a/config.json +++ b/config.json @@ -225,8 +225,8 @@ "PortableBuild": { "description": "Indicates if this is a portable build.", "valueType": "property", - "values": [ "0", "1"], - "defaultValue": "0" + "values": [ "false", "true"], + "defaultValue": "true" }, "Rebuild": { "description": "Specifies rebuild target.", @@ -462,12 +462,6 @@ "RestoreDuringBuild": false } }, - "portable": { - "description": "Triggers a portable build.", - "settings": { - "PortableBuild": "1" - } - }, "BuildTarget": { "description": "Runs the build target.", "settings": { @@ -483,6 +477,7 @@ "MsBuildErr": "default", "MsBuildEventLogging": "default", "RestoreDefaultOptimizationDataPackage": "false", + "PortableBuild": "true", "UsePartialNGENOptimization": "false" } } @@ -636,12 +631,6 @@ "__BuildArch": "default" } }, - "portable": { - "description": "Triggers a portable build.", - "settings": { - "PortableBuild": "1" - } - }, "buildType": { "description": "Specifies configuration to publish, can be Release, Debug or Checked.", "settings": { @@ -661,6 +650,7 @@ "__BuildOS": "default", "MsBuildFileLogging": "/flp:v=detailed;Append;LogFile=build-packages.log", "MsBuildEventLogging": "default", + "PortableBuild": "true", "Project": "src/.nuget/packages.builds" } } diff --git a/dir.props b/dir.props index cac0ace..0ceb7fe 100644 --- a/dir.props +++ b/dir.props @@ -78,6 +78,9 @@ $(BuildArch) x64 + + + true diff --git a/src/.nuget/dir.props b/src/.nuget/dir.props index d50c3d0..2ff88d9 100644 --- a/src/.nuget/dir.props +++ b/src/.nuget/dir.props @@ -26,8 +26,12 @@ Windows_NT;OSX;Linux ;$(SupportedPackageOSGroups); + <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789")) <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex))) + <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' == '-1'">$(RuntimeOS) <_isSupportedOSGroup>true @@ -66,7 +70,7 @@ win10 - win + win $(RIDPlatform)-$(ArchGroup) @@ -74,21 +78,21 @@ osx.10.12-$(ArchGroup) - osx-$(ArchGroup) + osx-$(ArchGroup) rhel.7-$(ArchGroup) - linux-$(ArchGroup) + linux-$(ArchGroup) $(RuntimeOS)-$(ArchGroup) - linux-$(ArchGroup) + linux-$(ArchGroup) @@ -111,48 +115,22 @@ - - - - arm - - armel - - arm - - - - arm - - - - - - x86 - x86 - - - arm - - - arm64 - arm