diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index e3cb1741c..c1341c290 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -10,9 +10,7 @@ $(InnerBuildArgs) /p:SkipBuildingInstallers=true - $(InnerBuildArgs) /p:IncludeNuGetPackageArchive=false $(InnerBuildArgs) /p:IncludeAdditionalSharedFrameworks=false - $(InnerBuildArgs) /p:IncludeSharedFrameworksForBackwardsCompatibilityTests=false $(InnerBuildArgs) /p:DISABLE_CROSSGEN=true diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f65bf5757..ea575fdfc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -129,18 +129,18 @@ https://github.com/dotnet/test-templates becc4bd157cd6608b51a5ffe414a5d2de6330272 - + https://github.com/dotnet/test-templates - 4486ff28949aa10726517ddf7ecabedc2a7e1ceb + 5f1d6326de00be62fc7f3e309c6f344520d1a4e9 - + https://github.com/dotnet/test-templates - 4486ff28949aa10726517ddf7ecabedc2a7e1ceb + 5f1d6326de00be62fc7f3e309c6f344520d1a4e9 - + https://github.com/dotnet/test-templates - 4486ff28949aa10726517ddf7ecabedc2a7e1ceb + 5f1d6326de00be62fc7f3e309c6f344520d1a4e9 @@ -226,9 +226,9 @@ - + https://github.com/dotnet/source-build-externals - 949db2fd23b687c0d545e954943feada8b361ed6 + 2c52f66055a098987321c8fe96472679661c4071 @@ -243,17 +243,17 @@ - + https://github.com/dotnet/arcade - 2fb543a45580400a559b5ae41c96a815ea14dac5 + 8cfc9489d3e51071fedec9dcb99071dc912718bd - + https://github.com/dotnet/arcade - 2fb543a45580400a559b5ae41c96a815ea14dac5 + 8cfc9489d3e51071fedec9dcb99071dc912718bd - + https://github.com/dotnet/arcade - 2fb543a45580400a559b5ae41c96a815ea14dac5 + 8cfc9489d3e51071fedec9dcb99071dc912718bd https://github.com/dotnet/arcade-services @@ -263,14 +263,14 @@ https://github.com/dotnet/arcade-services 749beebfd890571ce6f3fe8f557cb3cad070c946 - + https://github.com/dotnet/arcade - 2fb543a45580400a559b5ae41c96a815ea14dac5 + 8cfc9489d3e51071fedec9dcb99071dc912718bd - + https://github.com/dotnet/arcade - 2fb543a45580400a559b5ae41c96a815ea14dac5 + 8cfc9489d3e51071fedec9dcb99071dc912718bd diff --git a/eng/Versions.props b/eng/Versions.props index 332cb009e..de9d1c0df 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,7 +40,7 @@ - 9.0.0-beta.24102.4 + 9.0.0-beta.24105.3 @@ -64,8 +64,8 @@ 1.1.0-rc.24069.1 1.1.0-rc.24069.1 - 1.1.0-rc.24081.1 - 1.1.0-rc.24081.1 + 1.1.0-rc.24105.4 + 1.1.0-rc.24105.4 diff --git a/eng/build.yml b/eng/build.yml index ea389797c..21393e242 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -83,10 +83,10 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open + demands: ImageOverride -equals windows.vs2022.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 + demands: ImageOverride -equals windows.vs2022.amd64 ${{ if eq(parameters.agentOs, 'Linux') }}: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: diff --git a/eng/common/native/init-os-and-arch.sh b/eng/common/native/init-os-and-arch.sh index e693617a6..caa448ff0 100644 --- a/eng/common/native/init-os-and-arch.sh +++ b/eng/common/native/init-os-and-arch.sh @@ -35,6 +35,10 @@ fi case "$CPUName" in arm64|aarch64) arch=arm64 + if [ "$(getconf LONG_BIT)" -lt 64 ]; then + # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) + arch=arm + fi ;; loongarch64) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index a8f8edb32..7d8dc89b9 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -379,7 +379,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # If the version of msbuild is going to be xcopied, # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/RoslynTools.MSBuild/versions/17.8.5 + # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.8.5 $defaultXCopyMSBuildVersion = '17.8.5' if (!$vsRequirements) { @@ -445,7 +445,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = if ($xcopyMSBuildVersion.Trim() -ine "none") { $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install if ($vsInstallDir -eq $null) { - throw "Could not xcopy msbuild. Please check that package 'RoslynTools.MSBuild @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'." + throw "Could not xcopy msbuild. Please check that package 'Microsoft.DotNet.Arcade.MSBuild.Xcopy @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'." } } if ($vsInstallDir -eq $null) { @@ -482,7 +482,7 @@ function InstallXCopyMSBuild([string]$packageVersion) { } function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { - $packageName = 'RoslynTools.MSBuild' + $packageName = 'Microsoft.DotNet.Arcade.MSBuild.Xcopy' $packageDir = Join-Path $ToolsDir "msbuild\$packageVersion" $packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg" diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 98f21b224..0a3b14ac6 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -1,5 +1,5 @@ ### This job builds https://github.com/dotnet/dotnet with given parameters -### If run in a PR, new changes are applied to a local copy of the VMR, then it is built and tested +### If run in an installer PR, new changes are applied to a local copy of the VMR, then it is built and tested parameters: - name: architecture @@ -19,10 +19,6 @@ parameters: type: string default: '' -- name: isBuiltFromVmr - displayName: True when build is running from dotnet/dotnet directly - type: boolean - - name: pool type: object @@ -34,15 +30,6 @@ parameters: type: string default: '' -- name: vmrPath - type: string - default: $(Agent.BuildDirectory)/vmr - -- name: vmrBranch - displayName: dotnet/dotnet branch to use - type: string - default: $(Build.SourceBranch) - #### SOURCE-ONLY parameters #### # Instead of building the VMR directly, exports the sources into a tarball and builds from that @@ -64,7 +51,7 @@ parameters: default: false # Name of a previous job (from the same template as this) whose output will be used to build this job -# The SDK from its artifacts is copied to vmr/.dotnet +# The SDK from its artifacts is copied to $(sourcesPath)/.dotnet - name: reuseBuildArtifactsFrom type: string default: '' @@ -88,6 +75,16 @@ parameters: type: boolean default: false +#### INSTALLER parameters #### + +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet directly + type: boolean + +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + jobs: - job: ${{ parameters.buildName }}_${{ parameters.architecture }} timeoutInMinutes: 150 @@ -109,6 +106,13 @@ jobs: - name: additionalBuildArgs value: '' + - ${{ if parameters.isBuiltFromVmr }}: + - name: vmrPath + value: $(Build.SourcesDirectory) + - ${{ else }}: + - name: vmrPath + value: $(Agent.BuildDirectory)/vmr + # Location of the VMR sources # We either build the repo directly, or we extract them outside (which is what partners do) - ${{ if parameters.buildFromArchive }}: @@ -116,31 +120,30 @@ jobs: value: $(Build.StagingDirectory)/dotnet-sources/ - ${{ else }}: - name: sourcesPath - value: ${{ parameters.vmrPath }} + value: $(vmrPath) steps: - - template: ../steps/vmr-prepare.yml - parameters: - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - vmrBranch: $(System.PullRequest.TargetBranch) - ${{ else }}: - vmrBranch: ${{ parameters.vmrBranch }} - isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} - skipComponentGovernanceDetection: true - - # Synchronize new content in the VMR during PRs (we expect this to come - - ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['Build.Reason'], 'PullRequest')) }}: - - template: ../steps/vmr-pull-updates.yml + - ${{ if not(parameters.isBuiltFromVmr) }}: + - template: ../steps/vmr-prepare.yml parameters: - vmrPath: ${{ parameters.vmrPath }} - vmrBranch: ${{ parameters.vmrBranch }} - architecture: ${{ parameters.architecture }} - targetRef: $(Build.SourceVersion) # Synchronize the current installer commit + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + vmrBranch: $(System.PullRequest.TargetBranch) + ${{ else }}: + vmrBranch: ${{ parameters.vmrBranch }} + + # Synchronize new content in the VMR during PRs (we expect this to come + - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: ../steps/vmr-pull-updates.yml + parameters: + vmrPath: $(vmrPath) + vmrBranch: ${{ parameters.vmrBranch }} + targetRef: $(Build.SourceVersion) # Synchronize the current installer commit + architecture: ${{ parameters.architecture }} - ${{ if parameters.buildFromArchive }}: - script: | set -ex - cp -r "${{ parameters.vmrPath }}" "$(sourcesPath)" + cp -r "$(vmrPath)" "$(sourcesPath)" rm -rf "$(sourcesPath)/.git" displayName: Export VMR sources workingDirectory: $(Build.StagingDirectory) @@ -170,7 +173,7 @@ jobs: inputs: SourceFolder: $(Pipeline.Workspace)/${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}_Artifacts Contents: '*.tar.gz' - TargetFolder: ${{ variables.sourcesPath }}/prereqs/packages/archive/ + TargetFolder: $(sourcesPath)/prereqs/packages/archive/ - ${{ if eq(parameters.withPreviousSDK, 'true') }}: - script: | @@ -181,7 +184,7 @@ jobs: exit 1 fi - packageVersionsPath="${{ variables.sourcesPath }}/eng/Versions.props" + packageVersionsPath="$(sourcesPath)/eng/Versions.props" notFoundMessage="No source-built SDK found to download..." echo "Looking for source-built SDK to download..." @@ -256,7 +259,7 @@ jobs: if [[ '${{ parameters.buildFromArchive }}' == 'True' ]]; then customBuildArgs="$customBuildArgs --source-repository https://github.com/dotnet/dotnet" - customBuildArgs="$customBuildArgs --source-version $(git -C "${{ parameters.vmrPath }}" rev-parse HEAD)" + customBuildArgs="$customBuildArgs --source-version $(git -C "$(vmrPath)" rev-parse HEAD)" fi if [[ '${{ parameters.buildSourceOnly }}' == 'True' ]]; then @@ -388,12 +391,12 @@ jobs: inputs: testRunner: vSTest testResultsFiles: 'test/**/*.trx' - searchFolder: ${{ variables.sourcesPath }} + searchFolder: $(sourcesPath) mergeTestResults: true publishRunAttachments: true testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName) - - publish: '${{ variables.sourcesPath }}/artifacts/${{ parameters.architecture }}/Release/' + - publish: '$(sourcesPath)/artifacts/${{ parameters.architecture }}/Release/' artifact: $(Agent.JobName)_Artifacts displayName: Publish Artifacts condition: succeededOrFailed() diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index b85c06ade..77efa3661 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -53,7 +53,14 @@ jobs: - template: ../steps/vmr-prepare.yml parameters: vmrBranch: ${{ parameters.vmrBranch }} - isBuiltFromVmr: false + + # TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG? + # Currently, we ignore dirs of individual repos - they have been scanned before + - ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: + - task: ComponentGovernanceComponentDetection@0 + inputs: + sourceScanPath: $(Agent.BuildDirectory)/vmr + ignoreDirectories: $(Agent.BuildDirectory)/vmr/src - template: ../steps/vmr-pull-updates.yml parameters: diff --git a/eng/pipelines/templates/steps/vmr-prepare.yml b/eng/pipelines/templates/steps/vmr-prepare.yml index 644891799..a2715f5de 100644 --- a/eng/pipelines/templates/steps/vmr-prepare.yml +++ b/eng/pipelines/templates/steps/vmr-prepare.yml @@ -1,43 +1,18 @@ -### These steps clone the VMR (https://github.com/dotnet/dotnet) into $(Agent.BuildDirectory)/vmr -### Component Governance scan is also triggered over the VMR's non-repo sources +### These steps clone the VMR (https://github.com/dotnet/dotnet) into $(Agent.BuildDirectory)/vmr for installer parameters: -- name: isBuiltFromVmr - displayName: True when build is running from dotnet/dotnet directly - type: boolean - - name: vmrBranch displayName: dotnet/dotnet branch to use type: string - default: $(Build.SourceBranch) - -- name: skipComponentGovernanceDetection - type: boolean - default: false steps: -- ${{ if parameters.isBuiltFromVmr }}: - - checkout: self - displayName: Clone dotnet/dotnet - path: vmr - clean: true - -- ${{ else }}: - checkout: vmr displayName: Clone dotnet/dotnet path: vmr clean: true -- script: | - git checkout --track origin/${{ parameters.vmrBranch }} - echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" - displayName: Check out ${{ parameters.vmrBranch }} - workingDirectory: $(Agent.BuildDirectory)/vmr - -# TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG? -# Currently, we ignore dirs of individual repos - they have been scanned before -- ${{ if and(not(parameters.skipComponentGovernanceDetection), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: - - task: ComponentGovernanceComponentDetection@0 - inputs: - sourceScanPath: $(Agent.BuildDirectory)/vmr - ignoreDirectories: $(Agent.BuildDirectory)/vmr/src + - script: | + git checkout --track origin/${{ parameters.vmrBranch }} + echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" + displayName: Check out ${{ parameters.vmrBranch }} + workingDirectory: $(Agent.BuildDirectory)/vmr \ No newline at end of file diff --git a/eng/pipelines/templates/variables/vmr-stage.yml b/eng/pipelines/templates/variables/vmr-stage.yml index 7e51a24a1..7363922bc 100644 --- a/eng/pipelines/templates/variables/vmr-stage.yml +++ b/eng/pipelines/templates/variables/vmr-stage.yml @@ -30,24 +30,25 @@ variables: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: defaultPoolName value: NetCore-Public-XL + - name: defaultPoolNameLinuxArm64 + value: Docker-Linux-Arm-Public - name: defaultPoolDemandsLinux value: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - name: defaultPoolDemandsWindows value: ImageOverride -equals windows.vs2022.amd64.open -- ${{ if eq(variables['System.TeamProject'], 'internal') }}: +- ${{ elseif eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: defaultPoolName value: NetCore1ESPool-Internal-XL - ${{ else }}: - name: defaultPoolName value: NetCore1ESPool-Svc-Internal + - name: defaultPoolNameLinuxArm64 + value: Docker-Linux-Arm-Internal - name: defaultPoolDemandsLinux value: ImageOverride -equals Build.Ubuntu.1804.Amd64 - name: defaultPoolDemandsWindows value: ImageOverride -equals windows.vs2022.amd64 -- name: defaultPoolNameLinuxArm64 - value: Docker-Linux-Arm-Internal - - name: defaultPoolNameMac value: macos-12 diff --git a/global.json b/global.json index 7aec020cb..e17dbd6b1 100644 --- a/global.json +++ b/global.json @@ -8,10 +8,10 @@ } }, "native-tools": { - "cmake": "3.21.0" + "cmake": "latest" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24102.4", - "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24102.4" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24105.3", + "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24105.3" } } diff --git a/run-build.ps1 b/run-build.ps1 index 4f2e1275f..b15dc53df 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -32,7 +32,7 @@ if ($Sign) { $Parameters = "$Parameters -WarnAsError `$$WarnAsError" try { - $ExpressionToInvoke = "$RepoRoot\eng\common\build.ps1 -restore -build $Parameters $ExtraParameters" + $ExpressionToInvoke = "$RepoRoot\eng\common\build.ps1 -restore -build -nativeToolsOnMachine $Parameters $ExtraParameters" Write-Host "Invoking expression: $ExpressionToInvoke" Invoke-Expression $ExpressionToInvoke } diff --git a/src/SourceBuild/content/repo-projects/Directory.Build.props b/src/SourceBuild/content/repo-projects/Directory.Build.props index 7c9ac1dd6..a05af8692 100644 --- a/src/SourceBuild/content/repo-projects/Directory.Build.props +++ b/src/SourceBuild/content/repo-projects/Directory.Build.props @@ -177,13 +177,19 @@ - + + + - + + + + + - false - false true - true