Skip to content

Commit

Permalink
Merge branch 'main' into trim_timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara authored Jan 20, 2025
2 parents a850504 + ca81e9c commit 2114dbd
Show file tree
Hide file tree
Showing 253 changed files with 9,133 additions and 2,037 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"microsoft.dotnet.darc": {
"version": "1.1.0-beta.25056.6",
"version": "1.1.0-beta.25064.2",
"commands": [
"darc"
]
Expand Down
6 changes: 5 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Project>
<PropertyGroup>
<!--
Disable nullable warnings when targeting anything other than our supported .NET core version(s).
Disable nullable warnings when targeting anything other than our supported .NET core version(s).
This condition will be evaluated multiple times in multi-targeted projects hence need to be careful
to only set in the inner builds, not the outer build where only $(TargetFrameworks) is defined.
We still check $(TargetFrameworks) for empty though, because for single-targeted builds we want to
Expand Down Expand Up @@ -67,6 +67,10 @@
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler"
ILCompilerPackVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
<KnownCrossgen2Pack Update="Microsoft.NETCore.App.Crossgen2"
Crossgen2PackVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

<ItemGroup Condition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
Expand Down
2 changes: 0 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
<PackageVersion Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects" Version="$(MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion)" />
<PackageVersion Include="Microsoft.TemplateEngine.TestHelper" Version="$(MicrosoftTemplateEngineTestHelperPackageVersion)" />
<PackageVersion Include="Microsoft.TemplateSearch.Common" Version="$(MicrosoftTemplateSearchCommonPackageVersion)" />
<PackageVersion Include="Microsoft.Testing.Platform" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.TestPlatform.Build" Version="$(MicrosoftTestPlatformBuildPackageVersion)" />
<PackageVersion Include="Microsoft.TestPlatform.CLI" Version="$(MicrosoftTestPlatformCLIPackageVersion)" />
<PackageVersion Include="Microsoft.VisualStudio.Composition" Version="17.4.16" />
Expand Down
505 changes: 273 additions & 232 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

186 changes: 95 additions & 91 deletions eng/Versions.props

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
$uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
$uri = "https://raw.githubusercontent.com/dotnet/install-scripts/4b17227b30fbbad567d4d4fba17c59da51bc817b/src/dotnet-install.ps1"

Retry({
Write-Host "GET $uri"
Expand Down
2 changes: 1 addition & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function with_retries {
function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
local install_script_url="https://raw.githubusercontent.com/dotnet/install-scripts/4b17227b30fbbad567d4d4fba17c59da51bc817b/src/dotnet-install.sh"

if [[ ! -a "$install_script" ]]; then
mkdir -p "$root"
Expand Down
116 changes: 89 additions & 27 deletions eng/pipelines/templates/jobs/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@ jobs:
- name: runTestsTimeout
value: 30

- ${{ if or(eq(parameters.useDevVersions, 'True'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: _SignType
value: ''
- ${{ else }}:
- name: _SignType
value: real

- ${{ if parameters.isBuiltFromVmr }}:
- name: vmrPath
value: $(Build.SourcesDirectory)
Expand All @@ -187,12 +180,66 @@ jobs:
- name: artifactsStagingDir
value: $(Build.ArtifactStagingDirectory)/artifacts

- name: successfulJobArtifactName
value: $(Agent.JobName)_Artifacts

- name: failedJobArtifactName
value: $(successfulJobArtifactName)_Attempt$(System.JobAttempt)

# manually disable CodeQL until https://dev.azure.com/mseng/1ES/_workitems/edit/2211548 is implemented
# CodeQL doesn't work on arm64 macOS, see https://portal.microsofticm.com/imp/v5/incidents/details/532165079/summary
- ${{ if eq(parameters.pool.os, 'macOS') }}:
- name: ONEES_ENFORCED_CODEQL_ENABLED
value: false

# Build up the command line variables. We avoid doing this in the script sections below
# because AzDO will not echo command lines if they are more than a single line.

## Build command line - Windows
- ${{ if eq(parameters.targetOS, 'windows') }}:
## Basic arguments
- name: baseArguments
value: -ci -cleanWhileBuilding -prepareMachine /p:VerticalName=$(Agent.JobName) /p:ArtifactsStagingDir=$(artifactsStagingDir)

- name: configArguments
value: -c ${{ parameters.configuration }}

- name: targetArguments
value: /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }}

### Dev versions variables
- ${{ if eq(parameters.useDevVersions, 'True') }}:
- name: devArguments
value: -dev
- ${{ else }}:
- name: devArguments
value: ''

### Signing variables
- ${{ if eq(parameters.sign, 'True') }}:
- ${{ if or(eq(parameters.useDevVersions, 'True'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
# The _SignType variable is used by microbuild installation
- name: _SignType
value: ''
- name: signArguments
value: -sign /p:ForceDryRunSigning=true
- ${{ else }}:
- name: _SignType
value: real
- name: signArguments
value: -sign /p:DotNetSignType=real /p:TeamName=$(_TeamName)
- ${{ else }}:
- name: signArguments
value: ''

### Build Pass
- ${{ if ne(parameters.buildPass, '') }}:
- name: buildPassArguments
value: /p:DotNetBuildPass=${{ parameters.buildPass }}
- ${{ else }}:
- name: buildPassArguments
value: ''

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
Expand All @@ -203,11 +250,21 @@ jobs:
artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
sbomEnabled: false

# Both publishing steps are necessary to ensure artifacts are published on both success and failure.
# This prevents overwrite conflicts in the event of a failed build followed by a rerun.
# Additionally, the 'Download Previous Build *' steps depend on a fixed name to acquire specific assets in multi-stage builds.
- output: pipelineArtifact
path: $(artifactsStagingDir)
artifact: $(Agent.JobName)_Artifacts
displayName: Publish Artifacts
condition: succeededOrFailed()
artifact: $(successfulJobArtifactName)
displayName: Publish Artifacts (On Success)
condition: succeeded()
sbomEnabled: true

- output: pipelineArtifact
path: $(artifactsStagingDir)
artifact: $(failedJobArtifactName)
displayName: Publish Artifacts (On Failure)
condition: failed()
sbomEnabled: true

# Using build artifacts to enable publishing the vertical manifests to a single artifact from different jobs
Expand Down Expand Up @@ -307,7 +364,7 @@ jobs:
parameters:
enableMicrobuild: true
enableMicrobuildForMacAndLinux: true

- ${{ if eq(parameters.targetOS, 'windows') }}:
# Node 20.x is a toolset dependency to build aspnetcore
# Keep in sync with aspnetcore: https://github.com/dotnet/aspnetcore/blob/7d5309210d8f7bae8fa074da495e9d009d67f1b4/.azure/pipelines/ci.yml#L719-L722
Expand All @@ -316,18 +373,14 @@ jobs:
inputs:
versionSpec: 20.x

- script: |
set extraBuildArguments=
set signArgs=/p:ForceDryRunSigning=true
if /I '$(_SignType)'=='real' set signArgs=/p:DotNetSignType=real /p:TeamName=$(_TeamName)
if /I '$(_SignType)'=='test' set signArgs=/p:DotNetSignType=test /p:TeamName=$(_TeamName)
if /I '${{ parameters.sign }}'=='True' if /I NOT '${{ parameters.buildSourceOnly }}'=='True' set extraBuildArguments=%extraBuildArguments% -sign %signArgs%
if /I '${{ parameters.useDevVersions }}'=='True' set extraBuildArguments=%extraBuildArguments% -dev
set extraBuildProperties=
if not [${{ parameters.buildPass }}]==[] set extraBuildProperties=%extraBuildProperties% /p:DotNetBuildPass=${{ parameters.buildPass }}
call build.cmd -ci -cleanWhileBuilding -prepareMachine %extraBuildArguments% -c ${{ parameters.configuration }} /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} /p:VerticalName=$(Agent.JobName) /p:ArtifactsStagingDir=$(artifactsStagingDir) %extraBuildProperties% ${{ parameters.extraProperties }}
- script: build.cmd
$(baseArguments)
$(configArguments)
$(targetArguments)
$(devArguments)
$(signArguments)
$(buildPassArguments)
${{ parameters.extraProperties }}
displayName: Build
workingDirectory: ${{ variables.sourcesPath }}

Expand Down Expand Up @@ -355,7 +408,7 @@ jobs:
fi
if [[ '${{ parameters.withPreviousSDK }}' == 'True' ]]; then
# Source-built artifacts are from CentOS 9 Stream or Alpine 3.19. We want to download them without
# Source-built artifacts are from CentOS 9 Stream. We want to download them without
# downloading portable versions from the internet.
customPrepArgs="${customPrepArgs} --no-sdk --no-bootstrap"
prepSdk=false
Expand Down Expand Up @@ -602,10 +655,19 @@ jobs:
testRunTitle: ScenarioTests_$(Agent.JobName)

- ${{ if or(ne(variables['System.TeamProject'], 'internal'), eq(variables['Build.Reason'], 'PullRequest')) }}:
# Both publishing steps are necessary to ensure artifacts are published on both success and failure.
# This prevents overwrite conflicts in the event of a failed build followed by a rerun.
# Additionally, the 'Download Previous Build *' steps depend on a fixed name to acquire specific assets in multi-stage builds.
- publish: $(artifactsStagingDir)
artifact: $(Agent.JobName)_Artifacts
displayName: Publish Artifacts
condition: succeededOrFailed()
artifact: $(successfulJobArtifactName)
displayName: Publish Artifacts (On Success)
condition: succeeded()
continueOnError: true

- publish: $(artifactsStagingDir)
artifact: $(failedJobArtifactName)
displayName: Publish Artifacts (On Failure)
condition: failed()
continueOnError: true

# Using build artifacts to enable publishing the vertical manifests to a single artifact from different jobs
Expand Down
Loading

0 comments on commit 2114dbd

Please sign in to comment.