diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8ea74570f..9fa7ca039 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,46 @@ - + https://github.com/dotnet/windowsdesktop - 100e9b111742e2499c70782dd656c30706491a30 + 551dd11c3af07b8fcb0e465277179893cdf5bea1 - + https://github.com/dotnet/windowsdesktop - 100e9b111742e2499c70782dd656c30706491a30 + 551dd11c3af07b8fcb0e465277179893cdf5bea1 - + https://github.com/dotnet/windowsdesktop - 100e9b111742e2499c70782dd656c30706491a30 + 551dd11c3af07b8fcb0e465277179893cdf5bea1 - + https://github.com/dotnet/windowsdesktop - 100e9b111742e2499c70782dd656c30706491a30 + 551dd11c3af07b8fcb0e465277179893cdf5bea1 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 @@ -48,38 +48,38 @@ https://github.com/dotnet/core-setup 7d57652f33493fa022125b7f63aad0d70c52d810 - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c - + https://github.com/dotnet/aspnetcore - 5b70808e0b6aba16359287629349c3267111f8ae + 09e9ed7edbbaf6f43cb083d633908b4459a90d8c https://github.com/dotnet/test-templates @@ -102,39 +102,39 @@ https://github.com/dotnet/test-templates 94c498e399eb1cbb7290ed1e42564589a259312a - + https://github.com/dotnet/sdk - f403c010ac568828c62ee6497ecfb38696e26b12 + 6692fa1c9b067ce600df9ad504a0a10d56975339 - + https://github.com/dotnet/sdk - f403c010ac568828c62ee6497ecfb38696e26b12 + 6692fa1c9b067ce600df9ad504a0a10d56975339 - + https://github.com/dotnet/sdk - f403c010ac568828c62ee6497ecfb38696e26b12 + 6692fa1c9b067ce600df9ad504a0a10d56975339 - + https://github.com/dotnet/sdk - f403c010ac568828c62ee6497ecfb38696e26b12 + 6692fa1c9b067ce600df9ad504a0a10d56975339 - + https://github.com/dotnet/winforms - 41b11b6a7290a2bbc0c293042f30d9632e55aae2 + cdef38a8c587ed438465456f5843f4204001c127 - + https://github.com/dotnet/wpf - a9894d8820de6e620f3919f2bb2eda46c682e823 + a5a00f37f05be7a71f7af1bbca6edc3000921d8f - + https://github.com/dotnet/fsharp - 225eaa6ddb994e7c74c7eac1e301f688366f1b78 + 50ede7324c833488ee6769b18662d0e7be31c862 - + https://github.com/dotnet/fsharp - 225eaa6ddb994e7c74c7eac1e301f688366f1b78 + 50ede7324c833488ee6769b18662d0e7be31c862 @@ -142,32 +142,32 @@ 05c0c4c4f084782533443dfeae0f6627018c5b6a - + https://github.com/dotnet/runtime - a92ed6e2ce778c8b18dfa66f8f75368eca901f99 + 648d477858b5723059085de84966a2247cfdc0e7 https://github.com/dotnet/roslyn 1314d090671dc1a1500c5303c4b5ae9150f40d98 - + https://github.com/dotnet/msbuild - a0c282787d59ca9a449ded85175f39030e5077b8 + f776814442dc189b442ba87e3bdf1656c45dce81 - + https://github.com/nuget/nuget.client - f49ca00e27297fe7b4b82a2557d5b0caad907a06 + fdc39cc7f7541056c638ea982dc179f554849b7d https://github.com/Microsoft/ApplicationInsights-dotnet 53b80940842204f78708a538628288ff5d741a1d - + https://github.com/dotnet/emsdk - b211c38c398416b516ffab1806b8ba47d49c42da + 352d64e0ce9b99a8cff6207621432a986920ffd9 diff --git a/eng/Versions.props b/eng/Versions.props index 0a1ed9816..eae44dacf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -41,11 +41,11 @@ - 8.0.0-preview.3.23156.2 + 8.0.0-preview.3.23159.2 - 8.0.0-preview.3.23157.1 + 8.0.0-preview.3.23160.1 @@ -65,46 +65,46 @@ - 8.0.0-preview.3.23159.3 - 8.0.0-preview.3.23159.3 - 8.0.0-preview.3.23159.3 - 8.0.0-preview.3.23159.3 - 8.0.0-preview.3.23159.3 - 8.0.0-preview.3.23159.3 - 8.0.0-preview.3.23159.3 + 8.0.0-preview.3.23163.11 + 8.0.0-preview.3.23163.11 + 8.0.0-preview.3.23163.11 + 8.0.0-preview.3.23163.11 + 8.0.0-preview.3.23163.11 + 8.0.0-preview.3.23163.11 + 8.0.0-preview.3.23163.11 0.2.0 - 8.0.100-preview.3.23159.20 - 8.0.100-preview.3.23159.20 - 8.0.100-preview.3.23159.20 + 8.0.100-preview.3.23164.3 + 8.0.100-preview.3.23164.3 + 8.0.100-preview.3.23164.3 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) - 8.0.0-preview.3.23159.4 + 8.0.0-preview.3.23163.12 - 8.0.0-preview.3.23159.4 - 8.0.0-preview.3.23159.4 - 8.0.0-preview.3.23159.4 - 8.0.0-preview.3.23159.4 - 8.0.0-preview.3.23159.4 - 8.0.0-preview.3.23159.4 + 8.0.0-preview.3.23163.12 + 8.0.0-preview.3.23163.12 + 8.0.0-preview.3.23163.12 + 8.0.0-preview.3.23163.12 + 8.0.0-preview.3.23163.12 + 8.0.0-preview.3.23163.12 2.1.0 - 8.0.0-preview.3.23157.3 - 8.0.0-preview.3.23157.3 - 8.0.0-preview.3.23157.3 - 8.0.0-preview.3.23157.3 + 8.0.0-preview.3.23160.3 + 8.0.0-preview.3.23160.3 + 8.0.0-preview.3.23160.3 + 8.0.0-preview.3.23160.3 @@ -227,7 +227,7 @@ 13.1.227-net8-p1 16.1.1015-net8-p1 - 8.0.0-preview.3.23159.3 + 8.0.0-preview.3.23160.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportPackageVersion) 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-[A-z]*[\.]*\d*`)) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index dfc40c73a..77be79eb2 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -53,6 +53,7 @@ parameters: type: boolean default: false +# Use the previous version's SDK to build the current one - name: withPreviousSDK type: boolean default: false @@ -160,22 +161,28 @@ jobs: - script: | set -x - if [[ -z '${{ parameters.reuseBuildArtifactsFrom }}' && '${{ parameters.withPreviousSDK }}' != 'True' ]]; then - docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${{ parameters.container }} ./prep.sh - else + customPrepArgs="" + prepSdk=true + if [[ '${{ parameters.withPreviousSDK }}' == 'True' ]]; then + # Source-built artifacts are from CentOS 8 Stream. We want to download them without + # downloading portable versions from the internet. + customPrepArgs="${customPrepArgs} --no-sdk --no-bootstrap" + prepSdk=false + elif [[ -n '${{ parameters.reuseBuildArtifactsFrom }}' ]]; then + customPrepArgs="${customPrepArgs} --no-sdk --no-artifacts" + prepSdk=false + fi + + if [[ "$prepSdk" == "false" ]]; then mkdir $(sourcesPath)/.dotnet previousSdkPath="$(sourcesPath)/prereqs/packages/archive/dotnet-sdk-*.tar.gz" eval tar -ozxf "$previousSdkPath" -C "$(sourcesPath)/.dotnet" eval rm -f "$previousSdkPath" - if [[ '${{ parameters.withPreviousSDK }}' == 'True' ]]; then - # Source-built artifacts are from CentOS 8 Stream. We want to download them without - # downloading portable versions from the internet. - docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${{ parameters.container }} ./prep.sh --no-bootstrap - fi - echo "##vso[task.setvariable variable=additionalBuildArgs]--with-sdk /vmr/.dotnet" fi + + docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${{ parameters.container }} ./prep.sh ${customPrepArgs} displayName: Prep the Build - script: | diff --git a/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj index e0df027d5..e7b95574e 100644 --- a/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj +++ b/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj @@ -15,9 +15,13 @@ + + + + diff --git a/src/SourceBuild/content/prep.sh b/src/SourceBuild/content/prep.sh index ba5415671..7149f2e3a 100755 --- a/src/SourceBuild/content/prep.sh +++ b/src/SourceBuild/content/prep.sh @@ -10,11 +10,17 @@ usage() { echo " Prepares the environment to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and" echo " installing the version of dotnet referenced in global.json" echo "options:" - echo " --no-bootstrap Don't replace portable packages in the download source-built artifacts" + echo " --no-artifacts Exclude the download of the previously source-built artifacts archive." + echo " --no-bootstrap Don't replace portable packages in the download source-built artifacts" + echo " --no-prebuilts Exclude the download of the prebuilts archive." + echo " --no-sdk Exclude the download of the .NET SDK." echo "" } buildBootstrap=true +downloadArtifacts=true +downloadPrebuilts=true +installDotnet=true positional_args=() while :; do if [ $# -le 0 ]; then @@ -29,6 +35,15 @@ while :; do --no-bootstrap) buildBootstrap=false ;; + --no-artifacts) + downloadArtifacts=false + ;; + --no-prebuilts) + downloadPrebuilts=false + ;; + --no-sdk) + installDotnet=false + ;; *) positional_args+=("$1") ;; @@ -37,9 +52,12 @@ while :; do shift done -downloadArtifacts=true -downloadPrebuilts=true -installDotnet=true +# Attempting to bootstrap without an SDK will fail. So either the --no-sdk flag must be passed +# or a pre-existing .dotnet SDK directory must exist. +if [[ "$buildBootstrap" == "true" && "$installDotnet" == "false" && ! -d $SCRIPT_ROOT/.dotnet ]]; then + echo " ERROR: --no-sdk requires --no-bootstrap or a pre-existing .dotnet SDK directory. Exiting..." + exit -1 +fi # Check to make sure curl exists to download the archive files if ! command -v curl &> /dev/null @@ -51,20 +69,20 @@ fi # Check if Private.SourceBuilt artifacts archive exists artifactsBaseFileName="Private.SourceBuilt.Artifacts" packagesArchiveDir="$SCRIPT_ROOT/prereqs/packages/archive/" -if [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then +if [[ "$downloadArtifacts" == "true" && -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]]; then echo " Private.SourceBuilt.Artifacts.*.tar.gz exists...it will not be downloaded" downloadArtifacts=false fi # Check if Private.SourceBuilt prebuilts archive exists prebuiltsBaseFileName="Private.SourceBuilt.Prebuilts" -if [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then +if [[ "$downloadPrebuilts" == "true" && -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]]; then echo " Private.SourceBuilt.Prebuilts.*.tar.gz exists...it will not be downloaded" downloadPrebuilts=false fi # Check if dotnet is installed -if [ -d $SCRIPT_ROOT/.dotnet ]; then +if [[ "$installDotnet" == "true" && -d $SCRIPT_ROOT/.dotnet ]]; then echo " ./.dotnet SDK directory exists...it will not be installed" installDotnet=false; fi diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs index 921ab1f97..ff1071e2e 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs @@ -14,6 +14,7 @@ internal class DotNetHelper { private static readonly object s_lockObj = new(); + private static bool IsMonoRuntime { get; } = DetermineIsMonoRuntime(); public static string DotNetPath { get; } = Path.Combine(Config.DotNetDirectory, "dotnet"); public static string LogsDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), "logs"); public static string PackagesDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), "packages"); @@ -198,10 +199,13 @@ internal class DotNetHelper public void ExecuteRunWeb(string projectName) { + // 'dotnet run' exit code differs between CoreCLR and Mono (https://github.com/dotnet/sdk/issues/30095). + int expectedExitCode = IsMonoRuntime ? 143 : 0; ExecuteCmd( $"run {GetBinLogOption(projectName, "run")}", GetProjectDirectory(projectName), additionalProcessConfigCallback: processConfigCallback, + expectedExitCode, millisecondTimeout: 30000); void processConfigCallback(Process process) @@ -230,5 +234,27 @@ internal class DotNetHelper return $"/bl:{Path.Combine(LogsDirectory, $"{fileName}.binlog")}"; } + private static bool DetermineIsMonoRuntime() + { + string dotnetRoot = Config.DotNetDirectory; + + string sharedFrameworkRoot = Path.Combine(dotnetRoot, "shared", "Microsoft.NETCore.App"); + if (!Directory.Exists(sharedFrameworkRoot)) + { + return false; + } + + string? version = Directory.GetDirectories(sharedFrameworkRoot).FirstOrDefault(); + if (version is null) + { + return false; + } + + string sharedFramework = Path.Combine(sharedFrameworkRoot, version); + + // Check the presence of one of the mono header files. + return File.Exists(Path.Combine(sharedFramework, "mono-gc.h")); + } + private static string GetProjectDirectory(string projectName) => Path.Combine(ProjectsDirectory, projectName); }