Merge branch 'main' into darc-main-b3493948-ba4e-418f-85b9-c4d9e5a8b57d

This commit is contained in:
Larry Ewing 2023-05-18 15:33:06 -05:00 committed by GitHub
commit 0f237fa404
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 50 deletions

View file

@ -193,18 +193,18 @@
</Dependency> </Dependency>
</ProductDependencies> </ProductDependencies>
<ToolsetDependencies> <ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23265.1"> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23268.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha> <Sha>f4269875971171c278c2cd695e9ef94b6516e4be</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" /> <SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="8.0.0-beta.23265.1"> <Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="8.0.0-beta.23268.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha> <Sha>f4269875971171c278c2cd695e9ef94b6516e4be</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23265.1"> <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23268.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha> <Sha>f4269875971171c278c2cd695e9ef94b6516e4be</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23226.1"> <Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23226.1">
<Uri>https://github.com/dotnet/arcade-services</Uri> <Uri>https://github.com/dotnet/arcade-services</Uri>
@ -223,14 +223,14 @@
<Sha>fd98754b692a1a8da2aaadd28ce3952578d9d9ad</Sha> <Sha>fd98754b692a1a8da2aaadd28ce3952578d9d9ad</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" /> <SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency> </Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="8.0.0-beta.23218.3" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk"> <Dependency Name="Microsoft.SourceLink.GitHub" Version="8.0.0-beta.23252.2" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri> <Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>47c52dd2ebf9edfd40abdcff999c13eb461f6ce2</Sha> <Sha>54eb3b811c57f5e94617d31a102fc9cb664ccdd5</Sha>
<SourceBuild RepoName="sourcelink" ManagedOnly="true" /> <SourceBuild RepoName="sourcelink" ManagedOnly="true" />
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23263.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk"> <Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23266.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri> <Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>3f7d6c7e742012d9437fcb0d04cac63202d37621</Sha> <Sha>9e7fbcab4e5275f63c0cd37553ba426de9194309</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" /> <SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency> </Dependency>
</ToolsetDependencies> </ToolsetDependencies>

View file

@ -33,7 +33,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade --> <!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.23265.1</MicrosoftDotNetBuildTasksInstallersPackageVersion> <MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.23268.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade-services --> <!-- Dependency from https://github.com/dotnet/arcade-services -->

View file

@ -58,6 +58,11 @@ parameters:
type: boolean type: boolean
default: false default: false
- name: useMonoRuntime
displayName: True when build output uses the mono runtime
type: boolean
default: false
jobs: jobs:
- job: ${{ parameters.buildName }}_${{ parameters.architecture }} - job: ${{ parameters.buildName }}_${{ parameters.architecture }}
timeoutInMinutes: 150 timeoutInMinutes: 150
@ -213,6 +218,10 @@ jobs:
customBuildArgs="$customBuildArgs --source-version $(git -C "${{ parameters.vmrPath }}" rev-parse HEAD)" customBuildArgs="$customBuildArgs --source-version $(git -C "${{ parameters.vmrPath }}" rev-parse HEAD)"
fi fi
if [[ '${{ parameters.useMonoRuntime }}' == 'True' ]]; then
customBuildArgs="--use-mono-runtime"
fi
docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs
displayName: Build displayName: Build

View file

@ -80,6 +80,7 @@ stages:
excludeOmniSharpTests: true # ✅ excludeOmniSharpTests: true # ✅
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: true # ✅ runOnline: true # ✅
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫 withPreviousSDK: false # 🚫
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
@ -98,6 +99,7 @@ stages:
excludeOmniSharpTests: true # ✅ excludeOmniSharpTests: true # ✅
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: true # ✅ runOnline: true # ✅
useMonoRuntime: false # 🚫
withPreviousSDK: true # ✅ withPreviousSDK: true # ✅
- template: ../jobs/vmr-build.yml - template: ../jobs/vmr-build.yml
@ -115,6 +117,25 @@ stages:
excludeOmniSharpTests: true # ✅ excludeOmniSharpTests: true # ✅
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: false # 🚫 runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml
parameters:
buildName: CentOSStream8_Mono_Offline_MsftSdk
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.centOSStream8Container }}
buildFromArchive: true # ✅
enablePoison: false # 🚫
excludeOmniSharpTests: true # ✅
overrideDistroDisablingSha1: false # 🚫
runOnline: false # 🚫
useMonoRuntime: true # ✅
withPreviousSDK: false # 🚫 withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml - template: ../jobs/vmr-build.yml
@ -127,12 +148,13 @@ stages:
name: ${{ variables.defaultPoolName }} name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemands }} demands: ${{ variables.defaultPoolDemands }}
container: ${{ parameters.centOSStream9Container }} container: ${{ parameters.centOSStream9Container }}
buildFromArchive: true # ✅ buildFromArchive: true # ✅
enablePoison: false # 🚫 enablePoison: false # 🚫
excludeOmniSharpTests: false # 🚫 excludeOmniSharpTests: false # 🚫
overrideDistroDisablingSha1: true # ✅ overrideDistroDisablingSha1: true # ✅
runOnline: false # 🚫 runOnline: false # 🚫
withPreviousSDK: false # 🚫 useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml - template: ../jobs/vmr-build.yml
parameters: parameters:
@ -149,6 +171,7 @@ stages:
excludeOmniSharpTests: false # 🚫 excludeOmniSharpTests: false # 🚫
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: false # 🚫 runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫 withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml - template: ../jobs/vmr-build.yml
@ -166,6 +189,7 @@ stages:
excludeOmniSharpTests: false # 🚫 excludeOmniSharpTests: false # 🚫
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: false # 🚫 runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫 withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml - template: ../jobs/vmr-build.yml
@ -181,6 +205,7 @@ stages:
excludeOmniSharpTests: false # 🚫 excludeOmniSharpTests: false # 🚫
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: false # 🚫 runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫 withPreviousSDK: false # 🚫
- template: ../jobs/vmr-build.yml - template: ../jobs/vmr-build.yml
@ -198,5 +223,6 @@ stages:
excludeOmniSharpTests: false # 🚫 excludeOmniSharpTests: false # 🚫
overrideDistroDisablingSha1: false # 🚫 overrideDistroDisablingSha1: false # 🚫
runOnline: false # 🚫 runOnline: false # 🚫
useMonoRuntime: false # 🚫
withPreviousSDK: false # 🚫 withPreviousSDK: false # 🚫
reuseBuildArtifactsFrom: Fedora36_Offline_MsftSdk reuseBuildArtifactsFrom: Fedora36_Offline_MsftSdk

View file

@ -11,7 +11,7 @@
"cmake": "3.21.0" "cmake": "3.21.0"
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23265.1", "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23268.1",
"Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23265.1" "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23268.1"
} }
} }

View file

@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: tmat <tomas.matousek@microsoft.com>
Date: Fri, 21 Apr 2023 09:02:35 -0700
Subject: [PATCH] Workaround for msbuild cache issue
Backport: https://github.com/dotnet/sourcelink/pull/1008
---
src/Microsoft.Build.Tasks.Git/RepositoryTask.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs b/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs
index 9647abf..ef838b5 100644
--- a/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs
+++ b/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs
@@ -147,7 +147,15 @@ private string GetCacheKey(string repositoryId)
private bool TryGetCachedRepositoryInstance(string cacheKey, bool requireCached, [NotNullWhen(true)]out GitRepository? repository)
{
- var entry = (StrongBox<GitRepository?>)BuildEngine4.GetRegisteredTaskObject(cacheKey, RegisteredTaskObjectLifetime.Build);
+ StrongBox<GitRepository?>? entry;
+ try
+ {
+ entry = (StrongBox<GitRepository?>?)BuildEngine4.GetRegisteredTaskObject(cacheKey, RegisteredTaskObjectLifetime.Build);
+ }
+ catch (InvalidCastException) // workaround for https://github.com/dotnet/msbuild/issues/8478
+ {
+ entry = null;
+ }
if (entry != null)
{