diff options
author | Elinor Fung <47805090+elinor-fung@users.noreply.github.com> | 2019-05-21 12:05:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 12:05:49 -0700 |
commit | 0d6facf7afac5868db3dce55a1fb940a02365687 (patch) | |
tree | 82abee2cd5540684fe9e26796f66d8924b574f4a | |
parent | 11c8d92992f56fb481f9479219671652af7b04a1 (diff) | |
download | coreclr-0d6facf7afac5868db3dce55a1fb940a02365687.tar.gz coreclr-0d6facf7afac5868db3dce55a1fb940a02365687.tar.bz2 coreclr-0d6facf7afac5868db3dce55a1fb940a02365687.zip |
Switch NuGet package build to use Arcade instead of BuildTools (#24619)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Directory.Build.props | 2 | ||||
-rw-r--r-- | build-packages.cmd | 21 | ||||
-rwxr-xr-x | build-packages.sh | 15 | ||||
-rw-r--r-- | build.cmd | 75 | ||||
-rw-r--r-- | build.proj | 2 | ||||
-rwxr-xr-x | build.sh | 35 | ||||
-rw-r--r-- | dependencies.props | 14 | ||||
-rw-r--r-- | dir.common.props | 58 | ||||
-rw-r--r-- | dir.props | 112 | ||||
-rw-r--r-- | dir.targets | 7 | ||||
-rw-r--r-- | eng/Tools.props | 14 | ||||
-rw-r--r-- | eng/Versions.props | 7 | ||||
-rw-r--r-- | eng/build-job.yml | 7 | ||||
-rw-r--r-- | eng/configure-toolset.ps1 | 4 | ||||
-rw-r--r-- | eng/configure-toolset.sh | 4 | ||||
-rw-r--r-- | src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props | 12 | ||||
-rw-r--r-- | src/.nuget/dir.props | 5 | ||||
-rw-r--r-- | src/.nuget/dir.targets | 29 | ||||
-rw-r--r-- | src/.nuget/init/init.csproj | 24 | ||||
-rw-r--r-- | src/.nuget/optdata/ibcmerge.csproj | 3 | ||||
-rw-r--r-- | src/.nuget/optdata/optdata.csproj | 2 | ||||
-rw-r--r-- | src/.nuget/packages.builds | 36 | ||||
-rw-r--r-- | src/.nuget/packaging.props | 62 | ||||
-rw-r--r-- | src/Directory.Build.props | 7 | ||||
-rw-r--r-- | src/build.proj | 3 | ||||
-rw-r--r-- | src/restorearcadepublishtasks.proj | 16 |
27 files changed, 300 insertions, 277 deletions
diff --git a/.gitignore b/.gitignore index 232c1841ac..ceffb7d5d8 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ bld/ [Bb]in/ [Oo]bj/ msbuild.log +msbuild.binlog # add back architecture directories ignored in 'Build results' !tests/x86 diff --git a/Directory.Build.props b/Directory.Build.props index 1b43fd479a..917b9a84b6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,7 +8,7 @@ <Copyright>$(CopyrightNetFoundation)</Copyright> <PackageLicenseExpression>MIT</PackageLicenseExpression> </PropertyGroup> - + <PropertyGroup> <CL_MPCount>$(NumberOfCores)</CL_MPCount> </PropertyGroup> diff --git a/build-packages.cmd b/build-packages.cmd index 1fa93ebda7..6cce75bc11 100644 --- a/build-packages.cmd +++ b/build-packages.cmd @@ -33,19 +33,18 @@ if [!processedArgs!]==[] ( :ArgsDone -call "%__ProjectDir%"\setup_vs_tools.cmd +set logFile=%__ProjectDir%bin\Logs\build-packages.binlog +powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%~dp0eng\common\build.ps1"^ + -r -b -projects %__ProjectDir%src\.nuget\packages.builds^ + -verbosity minimal /bl:%logFile% /nodeReuse:false^ + /p:__BuildOS=Windows_NT /p:ArcadeBuild=true^ + /p:PortableBuild=true /p:FilterToOSGroup=Windows_NT^ + %__MSBuildArgs% %unprocessedArgs% -REM setup_vs_tools.cmd will correctly echo error message. -if NOT '%ERRORLEVEL%' == '0' exit /b 1 - -call %__ProjectDir%/dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /p:__BuildOS=Windows_NT /flp:v=detailed;Append;LogFile=build-packages.log^ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ - /p:PortableBuild=true %__ProjectDir%\src\.nuget\packages.builds^ - /p:FilterToOSGroup=Windows_NT %__MSBuildArgs% %unprocessedArgs% if NOT [!ERRORLEVEL!]==[0] ( - echo ERROR: An error occurred while building packages, see build-packages.log for more details. - exit /b 1 + echo ERROR: An error occurred while building packages. See log for more details: + echo %logFile% + exit /b !ERRORLEVEL! ) echo Done Building Packages. diff --git a/build-packages.sh b/build-packages.sh index 8dfab68baf..bd0fc8da00 100755 --- a/build-packages.sh +++ b/build-packages.sh @@ -125,15 +125,16 @@ if [ "${__DistroRid}" = "linux-musl-arm64" ]; then export OutputRID=${__DistroRid} fi -$__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \ - /p:__BuildOS=$__BuildOS /flp:v=detailed\;Append\;LogFile=build-packages.log \ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \ - /p:PortableBuild=true src/.nuget/packages.builds \ - /p:__DistroRid=$__DistroRid /p:BuildNugetPackage=false \ - $buildArgs $unprocessedBuildArgs +logFile=$__ProjectRoot/bin/Logs/build-packages.binlog +$__ProjectRoot/eng/common/build.sh -r -b -projects $__ProjectRoot/src/.nuget/packages.builds \ + -verbosity minimal -bl:$logFile \ + /p:__BuildOS=$__BuildOS /p:ArcadeBuild=true \ + /p:PortableBuild=true /p:__DistroRid=$__DistroRid \ + $buildArgs $unprocessedBuildArgs if [ $? -ne 0 ] then - echo "ERROR: An error occurred while building packages; See build-packages.log for more details." + echo "ERROR: An error occurred while building packages; See log for more details:" + echo " $logFile" exit 1 fi @@ -103,7 +103,6 @@ set __CrossgenAltJit= set __SkipRestoreArg=/p:RestoreDuringBuild=true set __OfficialBuildIdArg= set __CrossArch= -set __SkipNugetPackage=0 set __PgoOptDataVersion= set __IbcOptDataVersion= set __IbcMergeVersion= @@ -168,11 +167,11 @@ if [!__PassThroughArgs!]==[] ( set __PassThroughArgs=%__PassThroughArgs% %1 ) -if /i "%1" == "-freebsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=FreeBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-linuxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-netbsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=NetBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-osxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=OSX&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-windowsmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Windows_NT&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-freebsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-linuxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-netbsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-osxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-windowsmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-nativemscorlib" (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -197,11 +196,11 @@ if /i "%1" == "-OfficialBuildId" (set __OfficialBuildIdArg=/p:OfficialBuildI REM TODO these are deprecated remove them eventually REM don't add more, use the - syntax instead -if /i "%1" == "freebsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=FreeBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "linuxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "netbsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=NetBSD&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "osxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=OSX&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "windowsmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Windows_NT&set __SkipNugetPackage=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "freebsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "linuxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "netbsdmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "osxmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "windowsmscorlib" (set __BuildSOS=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "nativemscorlib" (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -300,9 +299,6 @@ REM Set the remaining variables based upon the determined build configuration if %__PgoOptimize%==0 set __RestoreOptData=0 if /i %__BuildType% NEQ Release set __RestoreOptData=0 -REM REVIEW: why no System.Private.CoreLib NuGet package build for ARM64? -if /i "%__BuildArch%"=="arm64" set __SkipNugetPackage=0 - set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%" set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%" if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__BuildOS%.%__BuildArch%.%__BuildType%") @@ -372,6 +368,10 @@ call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary / /p:UsePartialNGENOptimization=false /maxcpucount^ %__ProjectDir%\build.proj /t:GenerateVersionHeader /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile="%__RootBinDir%\obj\_version.h"^ %__CommonMSBuildArgs% %__UnprocessedBuildArgs% +if not !errorlevel! == 0 ( + echo %__MsgPrefix%Error: Failed to generate version headers. + exit /b !errorlevel! +) REM ========================================================================================= REM === @@ -394,10 +394,10 @@ if %__RestoreOptData% EQU 1 ( REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj -for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo') do ( +for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /p:ArcadeBuild^=true /nologo') do ( set __PgoOptDataVersion=%%s ) -for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo') do ( +for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /p:ArcadeBuild^=true /nologo') do ( set __IbcOptDataVersion=%%s ) @@ -604,12 +604,6 @@ if %__BuildCoreLib% EQU 1 ( set __ExtraBuildArgs=!__ExtraBuildArgs! /p:BuildManagedTools=true ) - if "%__SkipNugetPackage%" == "1" ( - set __ExtraBuildArgs=!__ExtraBuildArgs! /p:BuildNugetPackage=false - ) else ( - set __ExtraBuildArgs=!__ExtraBuildArgs! /p:BuildNugetPackage=true - ) - set __BuildLogRootName=System.Private.CoreLib set __BuildLog="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" set __BuildWrn="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" @@ -636,7 +630,7 @@ if %__BuildCoreLib% EQU 1 ( call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ - /p:UsePartialNGENOptimization=false /maxcpucount /p:DotNetUseShippingVersions=true /p:ArcadeBuild=true^ + /p:UsePartialNGENOptimization=false /maxcpucount /p:ArcadeBuild=true^ %__ProjectDir%\src\build.proj^ !__Logging! %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( @@ -650,10 +644,10 @@ if %__BuildCoreLib% EQU 1 ( if %__IbcOptimize% EQU 1 ( echo %__MsgPrefix%Commencing IBCMerge of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType% set IbcMergeProjectFilePath=%__ProjectDir%\src\.nuget\optdata\ibcmerge.csproj - for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /nologo') do @( + for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /p:ArcadeBuild=true /nologo') do @( set __IbcMergeVersion=%%s ) - + set IbcMergePath=%__PackagesDir%\microsoft.dotnet.ibcmerge\!__IbcMergeVersion!\tools\netcoreapp2.0\ibcmerge.dll if exist !IbcMergePath! ( echo %__MsgPrefix%Optimizing using IBC training data @@ -714,7 +708,7 @@ if %__BuildCoreLib% EQU 1 ( type %__CrossGenCoreLibLog% goto CrossgenFailure ) - + REM Verify that the optimization data has been applied set NEXTCMD=!IBCMergeCommand! -mi "%__BinDir%\IL\System.Private.CoreLib.dll" echo %__MsgPrefix%!NEXTCMD! >> "%__CrossGenCoreLibLog%" @@ -834,29 +828,20 @@ if %__BuildPackages% EQU 1 ( echo %__MsgPrefix%Building Packages for %__BuildOS%.%__BuildArch%.%__BuildType% - set __BuildLogRootName=Nuget - set __BuildLog="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" - set __BuildWrn="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" - set __BuildErr="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" - set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog! - set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn! - set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! - set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! + set __BuildLog="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" REM The conditions as to what to build are captured in the builds file. - call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ - /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ - /p:UsePartialNGENOptimization=false /maxcpucount^ - %__SourceDir%\.nuget\packages.builds^ - !__Logging! /p:Platform=%__BuildArch% %__CommonMSBuildArgs% %__UnprocessedBuildArgs% - + REM Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build + powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%~dp0eng\common\build.ps1"^ + -r -b -projects %__SourceDir%\.nuget\packages.builds^ + -verbosity minimal /nodeReuse:false /bl:!__BuildLog!^ + /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ + /p:UsePartialNGENOptimization=false /p:ArcadeBuild=true^ + /p:Platform=%__BuildArch% %__CommonMSBuildArgs% %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( - echo %__MsgPrefix%Error: Nuget package generation failed. Refer to the build log files for details: + echo %__MsgPrefix%Error: Nuget package generation failed. Refer to the build log file for details: echo !__BuildLog! - echo !__BuildWrn! - echo !__BuildErr! - exit /b 1 + exit /b !errorlevel! ) REM } Scope environment changes end diff --git a/build.proj b/build.proj index 3ccf06db2e..f723179b18 100644 --- a/build.proj +++ b/build.proj @@ -7,7 +7,7 @@ <Import Project="dir.traversal.targets" /> <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'"> - <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj" StandardOutputImportance="Low" /> + <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj /p:ArcadeBuild=true" StandardOutputImportance="Low" /> </Target> <Import Project="$(ToolsDir)clean.targets" /> @@ -160,8 +160,18 @@ restore_optdata() fi fi local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj" - __PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo | sed 's/^\s*//') - __IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo | sed 's/^[[:blank:]]*//') + __PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /p:ArcadeBuild=true /nologo) + if [ $? != 0 ]; then + echo "Failed to get PGO data package version." + exit $? + fi + __PgoOptDataVersion=$(echo $__PgoOptDataVersion | sed 's/^\s*//') + __IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /p:ArcadeBuild=true /nologo) + if [ $? != 0 ]; then + echo "Failed to get IBC data package version." + exit $? + fi + __IbcOptDataVersion=$(echo $__IbcOptDataVersion | sed 's/^[[:blank:]]*//') fi } @@ -413,7 +423,7 @@ build_CoreLib() /p:UsePartialNGENOptimization=false /maxcpucount /p:IncludeRestoreOnlyProjects=true /p:ArcadeBuild=true\ $__ProjectDir/src/build.proj \ /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \ - /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false \ + /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \ $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs if [ $? -ne 0 ]; then @@ -424,10 +434,10 @@ build_CoreLib() $__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \ /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \ - /p:UsePartialNGENOptimization=false /maxcpucount /p:DotNetUseShippingVersions=true /p:ArcadeBuild=true\ + /p:UsePartialNGENOptimization=false /maxcpucount /p:ArcadeBuild=true\ $__ProjectDir/src/build.proj \ /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \ - /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false \ + /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \ $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs if [ $? -ne 0 ]; then @@ -490,14 +500,13 @@ generate_NugetPackages() echo "DistroRid is "$__DistroRid echo "ROOTFS_DIR is "$ROOTFS_DIR # Build the packages - $__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \ - /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \ - /p:UsePartialNGENOptimization=false /maxcpucount \ - $__SourceDir/.nuget/packages.builds \ - /flp:Verbosity=normal\;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log \ - /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackages=false /p:__DoCrossArchBuild=$__CrossBuild \ - $__CommonMSBuildArgs $__UnprocessedBuildArgs + # Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build + $__ProjectRoot/eng/common/build.sh -r -b -projects $__SourceDir/.nuget/packages.builds \ + -verbosity minimal -bl:$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.binlog \ + /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \ + /p:UsePartialNGENOptimization=false /p:ArcadeBuild=true \ + /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:__DoCrossArchBuild=$__CrossBuild \ + $__CommonMSBuildArgs $__UnprocessedBuildArgs if [ $? -ne 0 ]; then echo "Failed to generate Nuget packages." diff --git a/dependencies.props b/dependencies.props index 6b058f09cf..7959410185 100644 --- a/dependencies.props +++ b/dependencies.props @@ -13,17 +13,6 @@ <Import Project="eng/Versions.props" /> - <PropertyGroup> - <!-- Central place to set the versions of all nuget packages produced in the repo --> - <PackageVersion Condition="'$(PackageVersion)' == ''">3.0.0</PackageVersion> - - <!-- Set the boolean below to true to generate packages with stabilized versions --> - <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion> - <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion> - - <PreReleaseLabel>preview6</PreReleaseLabel> - </PropertyGroup> - <!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. --> <PropertyGroup> <CoreClrCurrentRef>f1ee12b0dab462d0f58b87e878250146a125d9ff</CoreClrCurrentRef> @@ -36,7 +25,6 @@ <XunitPackageVersion>2.4.1-pre.build.4059</XunitPackageVersion> <XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion> <MicrosoftDiagnosticsTracingTraceEventPackageVersion>2.0.40</MicrosoftDiagnosticsTracingTraceEventPackageVersion> - <IbcMergePackageVersion>5.0.6-beta.19203.1</IbcMergePackageVersion> <CommandLineParserVersion>2.2.0</CommandLineParserVersion> <!-- Scenario tests install this version of Microsoft.NetCore.App, then patch coreclr binaries via xcopy. At the moment it is @@ -67,7 +55,7 @@ <BuildInfoPath>$(BaseDotNetBuildInfo)buildtools/$(DependencyBranch)</BuildInfoPath> <CurrentRef>$(BuildToolsCurrentRef)</CurrentRef> </RemoteDependencyBuildInfo> - + <DependencyBuildInfo Include="@(RemoteDependencyBuildInfo)"> <RawVersionsBaseUrl>https://raw.githubusercontent.com/dotnet/versions</RawVersionsBaseUrl> </DependencyBuildInfo> diff --git a/dir.common.props b/dir.common.props index 4e2a3bb520..106331e911 100644 --- a/dir.common.props +++ b/dir.common.props @@ -16,6 +16,15 @@ <RestorePackagesPath>$(PackagesDir)</RestorePackagesPath> </PropertyGroup> + <!-- Version numbers for native binaries + [ARCADE REMOVE] These properties can be removed once native binaries use Arcade versioning + They are included in common for packaging, which is onboarded to Arcade, but uses the version + numbers for native binaries for some outputs. --> + <PropertyGroup> + <NativeMajorVersion>4</NativeMajorVersion> + <NativeMinorVersion>6</NativeMinorVersion> + </PropertyGroup> + <!-- Set default Configuration and Platform --> <PropertyGroup> <BuildArch>$(__BuildArch)</BuildArch> @@ -40,4 +49,53 @@ <PlatformConfigPathPart>$(BuildOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart> </PropertyGroup> + + <!-- Common properties --> + <PropertyGroup> + + <ProjectDir>$(__ProjectDir)\</ProjectDir> + <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir> + + <SourceDir>$(__SourceDir)\</SourceDir> + <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir> + + <RootBinDir>$(__RootBinDir)\</RootBinDir> + <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir> + + <BinDir>$(__BinDir)\</BinDir> + <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(PlatformConfigPathPart)\</BinDir> + + <!-- We don't append back slash because this path is used by nuget.exe as output directory and it + fails to write packages to it if the path contains the forward slash. + --> + <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir> + <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir> + </PropertyGroup> + + <PropertyGroup> + <!-- Central place to set the versions of all nuget packages produced in the repo --> + <PackageVersion Condition="'$(PackageVersion)' == ''">3.0.0</PackageVersion> + + <!-- Set the boolean below to true to generate packages with stabilized versions --> + <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion> + <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion> + + <PreReleaseLabel>preview6</PreReleaseLabel> + </PropertyGroup> + + <!-- Set up common target properties that we use to conditionally include sources --> + <PropertyGroup> + <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD> + <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux> + <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD> + <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX> + <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows> + + <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix> + + <!-- We are only tracking Linux Distributions for Nuget RID mapping --> + <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid> + + </PropertyGroup> + </Project> @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Condition="Exists('..\dir.props')" Project="..\dir.props" /> - +<Project> <Import Project="dir.common.props" /> <PropertyGroup> @@ -14,10 +12,10 @@ <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType> </PropertyGroup> - <!-- Version numbers for both managed & native binaries --> + <!-- Version numbers for native binaries --> <PropertyGroup> - <MajorVersion>4</MajorVersion> - <MinorVersion>6</MinorVersion> + <MajorVersion>$(NativeMajorVersion)</MajorVersion> + <MinorVersion>$(NativeMinorVersion)</MinorVersion> </PropertyGroup> <!-- @@ -35,27 +33,9 @@ <!-- Common properties --> <PropertyGroup> - <ProjectDir>$(__ProjectDir)\</ProjectDir> - <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir> - - <SourceDir>$(__SourceDir)\</SourceDir> - <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir> - <!-- This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging --> <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName> - <RootBinDir>$(__RootBinDir)\</RootBinDir> - <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir> - - <BinDir>$(__BinDir)\</BinDir> - <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(PlatformConfigPathPart)\</BinDir> - - <!-- We don't append back slash because this path is used by nuget.exe as output directory and it - fails to write packages to it if the path contains the forward slash. - --> - <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir> - <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir> - <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir> <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ProjectDir).dotnet\</DotnetCliPath> <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost> @@ -71,6 +51,11 @@ <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild> <OverrideRestoreOutputPath>true</OverrideRestoreOutputPath> + + <!-- If true, indicates that this is not an officially supported release --> + <!-- It is important to flip this to false in official release branches --> + <!-- Keep it in sync with PRERELEASE in clrdefinitions.cmake --> + <IsPrerelease>true</IsPrerelease> </PropertyGroup> <!-- Output paths --> @@ -92,88 +77,9 @@ <!-- Import Build tools common props file where repo-independent properties are found --> <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" /> - <!-- Setup common target properties that we use to conditionally include sources --> - <PropertyGroup> - <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD> - <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux> - <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD> - <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX> - <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows> - - <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix> - - <!-- We are only tracking Linux Distributions for Nuget RID mapping --> - <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid> - - </PropertyGroup> - <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. --> <Import Project="$(ProjectDir)dependencies.props" /> - <!-- Packaging properties --> - <PropertyGroup> - <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl> - <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile> - <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile> - <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile> - <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory> - - <!-- If true, indicates that this is not an officially supported release --> - <!-- It is important to flip this to false in official release branches --> - <!-- Keep it in sync with PRERELEASE in clrdefinitions.cmake --> - <IsPrerelease>true</IsPrerelease> - - <!-- This should be kept in sync with package details in src/.nuget/init/project.json --> - <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion> - <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile> - - <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta --> - <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes> - - <ProjectUrl>https://dot.net</ProjectUrl> - - <!-- On Windows, MSbuild can still run against Desktop FX while it runs on .NET Core on non-Windows. this requires - pulling in different packaging dependencies. - --> - <PackagingTaskDir Condition="'$(MSBuildRuntimeType)' != 'core'">$(ToolsDir)net46/</PackagingTaskDir> - <!-- defined in buildtools packaging.targets, but we need this before targets are imported --> - <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform> - <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform> - <MinOSForArch>win7</MinOSForArch> - <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch> - <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch> - <!-- This property must be set to disable local package installation --> - <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages> - - <!-- Define packaging attributes for cross target components --> - <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents> - <HasCrossTargetComponents Condition="'$(TargetsLinux)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm') and '$(__DoCrossArchBuild)' == '1'">true</HasCrossTargetComponents> - <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder> - <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder> - <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder> - - <!-- Created package output locations must be kept in sync with eng/build-job.yml --> - <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath> - <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath> - <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile> - - <!-- coreclr doesn't currently use the index so don't force it to be in sync --> - <SkipIndexCheck>true</SkipIndexCheck> - </PropertyGroup> - - <!-- Add required legal files to packages --> - <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'"> - <File Condition="Exists('$(PackageLicenseFile)')" - Include="$(PackageLicenseFile)" > - <SkipPackageFileCheck>true</SkipPackageFileCheck> - </File> - <File Condition="Exists('$(PackageThirdPartyNoticesFile)')" - Include="$(PackageThirdPartyNoticesFile)" > - <SkipPackageFileCheck>true</SkipPackageFileCheck> - </File> - <PackageIndex Include="$(PackageIndexFile)" /> - </ItemGroup> - <!-- Use Roslyn Compilers to build --> <Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)')" /> </Project> diff --git a/dir.targets b/dir.targets index ea799fbbe6..953599db75 100644 --- a/dir.targets +++ b/dir.targets @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - + <Target Name="CheckForBuildTools"> <Error Condition="!Exists('$(ToolsDir)')" Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your enlistment to ensure the tools are installed before attempting to build an individual project." /> @@ -11,6 +11,11 @@ <Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" /> <Target Name="Test" /> + <PropertyGroup> + <ExcludePackagingImport>true</ExcludePackagingImport> + <ExcludePackageLibsImport>true</ExcludePackageLibsImport> + </PropertyGroup> + <Import Project="$(ToolsDir)/Build.Common.targets" Condition="'$(UseLiveBuildTools)' != 'true'" /> </Project> diff --git a/eng/Tools.props b/eng/Tools.props new file mode 100644 index 0000000000..eec09c5c0b --- /dev/null +++ b/eng/Tools.props @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <PropertyGroup> + <RestoreSources Condition="'$(AdditionalRestoreSources)' != ''"> + $(RestoreSources); + $(AdditionalRestoreSources) + </RestoreSources> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingPackageVersion)" /> + <PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsVersion)" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 14941fb9ca..28f546035d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -3,11 +3,16 @@ <PropertyGroup> <!-- This repo version --> <VersionPrefix>3.0.0</VersionPrefix> + <!-- Always use shipping version instead of dummy versions --> + <DotNetUseShippingVersions>true</DotNetUseShippingVersions> <PreReleaseVersionLabel>preview6</PreReleaseVersionLabel> <!-- Opt-out repo features --> <UsingToolXliff>false</UsingToolXliff> <UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies> + <!-- Package versions --> <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.19264.13</MicrosoftDotNetXUnitConsoleRunnerVersion> + <!-- arcade --> + <MicrosoftDotNetBuildTasksPackagingPackageVersion>1.0.0-beta.19229.8</MicrosoftDotNetBuildTasksPackagingPackageVersion> <!-- corefx --> <MicrosoftNetFrameworkReferenceAssembliesVersion>1.0.0-alpha-004</MicrosoftNetFrameworkReferenceAssembliesVersion> <MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-preview6.19264.9</MicrosoftPrivateCoreFxNETCoreAppVersion> @@ -15,6 +20,8 @@ <MicrosoftBclAsyncInterfacesVersion>1.0.0-preview6.19264.9</MicrosoftBclAsyncInterfacesVersion> <!-- core-setup --> <MicrosoftNETCoreAppVersion>3.0.0-preview6-27716-11</MicrosoftNETCoreAppVersion> + <!-- dotnet-core-internal-tooling --> + <IbcMergePackageVersion>5.0.6-beta.19203.1</IbcMergePackageVersion> <!-- dotnet-optimization --> <MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19229.8</MicrosoftDotNetBuildTasksFeedVersion> <optimizationIBCCoreCLRVersion>99.99.99-master-20190510.1</optimizationIBCCoreCLRVersion> diff --git a/eng/build-job.yml b/eng/build-job.yml index 656d16f657..004966e5db 100644 --- a/eng/build-job.yml +++ b/eng/build-job.yml @@ -114,6 +114,7 @@ jobs: displayName: Restore internal tools inputs: command: restore + arguments: /p:ArcadeBuild=true feedsToUse: config projects: 'src/.nuget/optdata/ibcmerge.csproj' nugetConfigPath: 'eng/internal/NuGet.config' @@ -167,10 +168,10 @@ jobs: # Build packages - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - script: ./build-packages.sh -BuildArch=$(archType) -BuildType=$(buildConfigUpper) $(crossPackagesArg) -OfficialBuildId=$(Build.BuildNumber) $(portableBuildArg) + - script: ./build-packages.sh -BuildArch=$(archType) -BuildType=$(buildConfigUpper) $(crossPackagesArg) -OfficialBuildId=$(Build.BuildNumber) $(portableBuildArg) -ci displayName: Build packages - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - - script: build-packages.cmd -BuildArch=$(archType) -BuildType=$(buildConfigUpper) -OfficialBuildId=$(Build.BuildNumber) + - script: build-packages.cmd -BuildArch=$(archType) -BuildType=$(buildConfigUpper) -OfficialBuildId=$(Build.BuildNumber) -ci displayName: Build packages # Publish official build @@ -198,7 +199,7 @@ jobs: displayName: Publish packages to blob feed env: # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed - NUGET_PACKAGES: $(Build.SourcesDirectory)\.packages + NUGET_PACKAGES: $(Build.SourcesDirectory)\.packages # Save nuget packages in pipeline for update dotnet/versions - task: PublishPipelineArtifact@0 displayName: Save packages as pipeline artifact diff --git a/eng/configure-toolset.ps1 b/eng/configure-toolset.ps1 index 637e9869e2..96aed776bb 100644 --- a/eng/configure-toolset.ps1 +++ b/eng/configure-toolset.ps1 @@ -3,3 +3,7 @@ # using the globally installed dotnet $script:useInstalledDotNetCli = $false + +# Always use the local repo packages directory instead of +# the user's NuGet cache +$script:useGlobalNuGetCache = $false diff --git a/eng/configure-toolset.sh b/eng/configure-toolset.sh index d342666072..c5af261c6f 100644 --- a/eng/configure-toolset.sh +++ b/eng/configure-toolset.sh @@ -3,3 +3,7 @@ # using the globally installed dotnet use_installed_dotnet_cli=false + +# Always use the local repo packages directory instead of +# the user's NuGet cache +use_global_nuget_cache=false
\ No newline at end of file diff --git a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props index 648d7aac2b..22cdfd859b 100644 --- a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props +++ b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props @@ -1,13 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <!-- [ARCADE REMOVE] Native binaries use BuildTools versioning, not Arcade + Include the generated build version properties for BuildNumberMajor/BuildNumberMinor--> + <PropertyGroup> + <RootIntermediateOutputPath>$(CoreclrDir)\bin\obj\</RootIntermediateOutputPath> + </PropertyGroup> + <Import Project="$(CoreclrDir)\Tools\BuildVersion.targets" /> + <PropertyGroup> <PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime> <LongNamePlatform>$(Platform)</LongNamePlatform> <LongNamePlatform Condition="'$(Platform)'=='x64'">amd64</LongNamePlatform> <CrossTargetPlatform>$(CrossTargetComponentFolder)</CrossTargetPlatform> <CrossTargetPlatform Condition="'$(CrossTargetPlatform)'=='x64'">amd64</CrossTargetPlatform> - <LongNameSuffix>_$(LongNamePlatform)_$(LongNamePlatform)_$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</LongNameSuffix> - <CrossTargetLongNameSuffix>_$(CrossTargetPlatform)_$(LongNamePlatform)_$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</CrossTargetLongNameSuffix> + <LongNameSuffix>_$(LongNamePlatform)_$(LongNamePlatform)_$(NativeMajorVersion).$(NativeMinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</LongNameSuffix> + <CrossTargetLongNameSuffix>_$(CrossTargetPlatform)_$(LongNamePlatform)_$(NativeMajorVersion).$(NativeMinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</CrossTargetLongNameSuffix> </PropertyGroup> <ItemGroup> diff --git a/src/.nuget/dir.props b/src/.nuget/dir.props index 29ea200dd0..80081ad025 100644 --- a/src/.nuget/dir.props +++ b/src/.nuget/dir.props @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildThisFileDirectory)..\..\dir.props" /> + <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" /> + <Import Project="packaging.props" /> <PropertyGroup> - <!-- defined in buildtools packaging.targets, but we need this before targets are imported --> + <!-- defined in Packaging.targets, but we need this before targets are imported --> <PackagePlatform>AnyCPU</PackagePlatform> <!-- build the transport package which includes product and symbols in addition to standard packages --> diff --git a/src/.nuget/dir.targets b/src/.nuget/dir.targets index 4d4883bf78..b51b76a28a 100644 --- a/src/.nuget/dir.targets +++ b/src/.nuget/dir.targets @@ -1,10 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" /> + + <PropertyGroup> + <!-- Reset PackageOutputPath. The ProjectDefaults targets from Arcade set it to be in the artifacts directory, + but our publishing step currently looks under PackagesBinDir --> + <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath> + </PropertyGroup> + + <Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingPackageVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" /> - <Target Name="VerifyVCRedist" BeforeTargets="GetSymbolPackageFiles" Condition="'$(_runtimeOSFamily)' == 'win'"> - <Error Condition="'$(UniversalCRTSDKDir)' == ''" Text="Unable to find VC Redist binaries - check that UniversalCRTSDKDir environment variable is set" /> - </Target> <!-- Finds symbol files and injects them into the package build. --> @@ -64,7 +70,7 @@ <!-- Search for all xplat symbol file extensions on every xplat native binary. Some binaries have no ".so" or ".dylib" extension, so we can't tell which convention its symbol files would - use. On xplat, the symbol extension is simply appended. + use. On xplat, the symbol extension is simply appended. --> <NonWindowsNativeFile Include="@(NativeWithSymbolFile)" Exclude="@(WindowsNativeFile)" /> @@ -93,19 +99,4 @@ </ItemGroup> </Target> - <!-- OverrideLicenseUrl is temporary till we update the buildtools to v2 --> - <Target Name="OverrideLicenseUrl" BeforeTargets="GenerateNuSpec"> - <PropertyGroup> - <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl> - </PropertyGroup> - </Target> - - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)\.., dir.targets))\dir.targets" /> - <ItemGroup> - <!-- Add version file to packages --> - <File Condition="Exists('$(SyncInfoFile)')" - Include="$(SyncInfoFile)"> - <SkipPackageFileCheck>true</SkipPackageFileCheck> - </File> - </ItemGroup> </Project> diff --git a/src/.nuget/init/init.csproj b/src/.nuget/init/init.csproj deleted file mode 100644 index 115090dd76..0000000000 --- a/src/.nuget/init/init.csproj +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <CLRTestKind>BuildOnly</CLRTestKind> - </PropertyGroup> - <ItemGroup> - <PackageReference Include="Microsoft.NETCore.Platforms"> - <Version>$(RuntimeIdGraphDefinitionVersion)</Version> - </PackageReference> - </ItemGroup> - <PropertyGroup> - <TargetFramework>netcoreapp1.0</TargetFramework> - <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier> - <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback> - <ContainsPackageReferences>true</ContainsPackageReferences> - <PrereleaseResolveNuGetPackages>false</PrereleaseResolveNuGetPackages> - </PropertyGroup> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> - <Target Name="Build" - DependsOnTargets="ResolveReferences" /> -</Project> diff --git a/src/.nuget/optdata/ibcmerge.csproj b/src/.nuget/optdata/ibcmerge.csproj index e00d3d1d54..b995471fdd 100644 --- a/src/.nuget/optdata/ibcmerge.csproj +++ b/src/.nuget/optdata/ibcmerge.csproj @@ -1,7 +1,4 @@ <Project Sdk="Microsoft.NET.Sdk"> - - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> diff --git a/src/.nuget/optdata/optdata.csproj b/src/.nuget/optdata/optdata.csproj index 8ab2f5bf1d..8694367c6b 100644 --- a/src/.nuget/optdata/optdata.csproj +++ b/src/.nuget/optdata/optdata.csproj @@ -1,7 +1,5 @@ <Project Sdk="Microsoft.NET.Sdk"> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> diff --git a/src/.nuget/packages.builds b/src/.nuget/packages.builds index 15e7f4022d..b94e14a429 100644 --- a/src/.nuget/packages.builds +++ b/src/.nuget/packages.builds @@ -1,10 +1,6 @@ <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildThisFileDirectory)..\..\dir.props" /> - - <PropertyGroup> - <!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. --> - <OutputPath>$(PackageOutputPath)</OutputPath> - </PropertyGroup> + <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" /> + <Import Project="packaging.props" /> <ItemGroup Condition="'$(__SkipCoreLibBuild)'==''"> <Project Include="Microsoft.NETCore.Runtime.CoreCLR\Microsoft.NETCore.Runtime.CoreCLR.builds" /> @@ -29,9 +25,31 @@ <Project Include="Microsoft.NETCore.ILDAsm\Microsoft.NETCore.ILDAsm.builds" /> </ItemGroup> - <Import Project="$(ToolsDir)versioning.targets" /> - <!-- Make sure we create version.txt file since it will be packaged --> - <Target Name="EnsureVersionInfoFileExists" BeforeTargets="Build" DependsOnTargets="CreateVersionInfoFile" /> + <!-- Generate a version.txt file we include in our packages + The InitializeSourceControlInformationFromSourceControlManager is part of Microsoft.Build.Tasks.Git + and is responsible for setting SourceRevisionId --> + <Target Name="GenerateVersionInfoFileForPackages" + BeforeTargets="Build" + DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager"> + + <Error Condition="'$(SourceRevisionId)' == ''" Text="SourceRevisionId is not set, which means the SourceLink targets are not included in the build. Those are needed to produce a correct sha for our build outputs." /> + + <MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(VersionTxtFile)))" /> + <WriteLinesToFile + File="$(VersionTxtFile)" + Lines="$(SourceRevisionId)" + Overwrite="true" /> + </Target> + + <!-- [ARCADE REMOVE] Make sure version props file for native binaries (non-Arcade versioning) exists + This is through building a separate project because the packaging projects use Arcade versioning + and just need the build number for laying out certain native binaries. These projects do not want + the actual BuildTools target to run / set various properties, so they just include the generated + build version props file (which only sets BuildNumberMajor/BuildNumberMinor) as needed. --> + <Target Name="CreateVersionPropsForNativeBinaries" + BeforeTargets="Build"> + <MSBuild Targets="Build" Projects="$(CoreclrDir)\src\createVersionFile.proj"/> + </Target> <Import Project="$(MSBuildThisFileDirectory)..\..\dir.traversal.targets" /> </Project> diff --git a/src/.nuget/packaging.props b/src/.nuget/packaging.props new file mode 100644 index 0000000000..9344e4a402 --- /dev/null +++ b/src/.nuget/packaging.props @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <PropertyGroup> + <!-- Packaging projects are non-SDK-style and directly import Directory.Build.props. They can also import Microsoft.Common.props. + Make sure Microsoft.Common.props does not import Directory.Build.props again --> + <ImportDirectoryBuildProps>false</ImportDirectoryBuildProps> + </PropertyGroup> + + <PropertyGroup> + <PackageDescriptionFile>$(MSBuildThisFileDirectory)/descriptions.json</PackageDescriptionFile> + <PackageLicenseFile>$(CoreclrDir)/LICENSE.TXT</PackageLicenseFile> + <PackageThirdPartyNoticesFile>$(CoreclrDir)/THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile> + + <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(MicrosoftNETCorePlatformsVersion)/runtime.json</RuntimeIdGraphDefinitionFile> + <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes> + + <ProjectUrl>https://dot.net</ProjectUrl> + + <!-- Defined in Packaging.targets, but we need this before targets are imported --> + <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform> + <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform> + <MinOSForArch>win7</MinOSForArch> + <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch> + <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch> + + <!-- Define packaging attributes for cross target components --> + <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents> + <HasCrossTargetComponents Condition="'$(TargetsLinux)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm') and '$(__DoCrossArchBuild)' == '1'">true</HasCrossTargetComponents> + <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder> + <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder> + <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder> + + <!-- Created package output locations must be kept in sync with eng/build-job.yml --> + <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath> + <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath> + <PackageIndexFile>$(MSBuildThisFileDirectory)/packageIndex.json</PackageIndexFile> + + <!-- coreclr doesn't currently use the index so don't force it to be in sync --> + <SkipIndexCheck>true</SkipIndexCheck> + + <VersionTxtFile Condition="'$(VersionTxtFile)' == ''">$(ArtifactsObjDir)version.txt</VersionTxtFile> + </PropertyGroup> + + <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'"> + <!-- Add required legal files to packages --> + <File Condition="Exists('$(PackageLicenseFile)')" + Include="$(PackageLicenseFile)" > + <SkipPackageFileCheck>true</SkipPackageFileCheck> + </File> + <File Condition="Exists('$(PackageThirdPartyNoticesFile)')" + Include="$(PackageThirdPartyNoticesFile)" > + <SkipPackageFileCheck>true</SkipPackageFileCheck> + </File> + <PackageIndex Include="$(PackageIndexFile)" /> + + <!-- Add version file to packages --> + <File Include="$(VersionTxtFile)" + Condition="Exists('$(VersionTxtFile)')"> + <SkipPackageFileCheck>true</SkipPackageFileCheck> + </File> + </ItemGroup> +</Project> diff --git a/src/Directory.Build.props b/src/Directory.Build.props index afe45ab396..cb8b2e057b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,4 +6,11 @@ <Company>Microsoft Corporation</Company> <Product>Microsoft%AE .NET Core</Product> </PropertyGroup> + + <PropertyGroup> + <!-- If true, indicates that this is not an officially supported release --> + <!-- It is important to flip this to false in official release branches --> + <!-- Keep it in sync with PRERELEASE in clrdefinitions.cmake --> + <IsPrerelease>true</IsPrerelease> + </PropertyGroup> </Project>
\ No newline at end of file diff --git a/src/build.proj b/src/build.proj index 419d1d5908..bc6e47fb3a 100644 --- a/src/build.proj +++ b/src/build.proj @@ -3,9 +3,8 @@ <!-- List the projects that need to be restored only --> <ItemGroup Condition="'$(IncludeRestoreOnlyProjects)' == 'true'"> <ProjectReference Condition="'$(BuildType)'=='Release'" Include="$(SourceDir).nuget/optdata/optdata.csproj" /> - <ProjectReference Include="$(SourceDir).nuget/init/init.csproj" /> </ItemGroup> - + <!-- List the projects that need to be built --> <ItemGroup> <ProjectReference Condition="'$(SkipSOS)' != 'true'" Include="ToolBox\SOS\NETCore\SOS.NETCore.csproj" /> diff --git a/src/restorearcadepublishtasks.proj b/src/restorearcadepublishtasks.proj deleted file mode 100644 index 21d8c61a7e..0000000000 --- a/src/restorearcadepublishtasks.proj +++ /dev/null @@ -1,16 +0,0 @@ -<Project Sdk="Microsoft.DotNet.Arcade.Sdk"> - - <PropertyGroup> - <TargetFramework>net462</TargetFramework> - <RestoreSources/> - <RestoreSources> - $(RestoreSources); - https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - </RestoreSources> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" /> - </ItemGroup> - -</Project> |