diff --git a/eng/Versions.props b/eng/Versions.props index 5e2ce3183a3df34de51b5d82e084251d784c2cce..6d4aff9f82b1aebe5d1788d6dac6e4b5a1f87fe7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -17,8 +17,7 @@ release true - - + true false true diff --git a/eng/pipelines/common/restore-internal-tools.yml b/eng/pipelines/common/restore-internal-tools.yml new file mode 100644 index 0000000000000000000000000000000000000000..0f1cc000b338e1f258a8ff48d4d76ba2c863e617 --- /dev/null +++ b/eng/pipelines/common/restore-internal-tools.yml @@ -0,0 +1,26 @@ +parameters: + installDotnet: false + +steps: + - ${{ if eq(parameters.installDotnet, true) }}: + - task: UseDotNet@2 + displayName: Install dotnet ${{ parameters.dotnetVersion }} + inputs: + packageType: sdk + useGlobalJson: true + installationPath: $(Agent.ToolsDirectory)/dotnet + + - task: NuGetAuthenticate@0 + inputs: + nuGetServiceConnections: 'dotnet-core-internal-tooling' + + - task: DotNetCoreCLI@2 + displayName: Restore internal tools + condition: and(succeeded(), ne(variables['_skipRestoreInternalTools'], 'true')) + inputs: + command: restore + feedsToUse: config + projects: 'eng/common/internal/Tools.csproj' + nugetConfigPath: 'eng/internal/NuGet.config' + restoreDirectory: '$(Build.SourcesDirectory)\.packages' + verbosityRestore: 'normal' \ No newline at end of file diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index 827cb81ab5e1afbd7dad6da8a40980cf6b7ea583..188eeeb6ad74a6c7586c9af183f90c5d31fc54a7 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -7,4 +7,4 @@ variables: ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: value: Release ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - value: Debug \ No newline at end of file + value: Debug diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index ff36d2a55bfd9f0e2d93af6b81f2b21c56608093..54b8335840b713e8b68e64881e44bd9a684c6eeb 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -89,11 +89,11 @@ jobs: - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: - name: officialBuildIdArg value: '-officialbuildid=$(Build.BuildNumber)' - # TODO: (Consolidation) Fix internal tool restore and re-enable. https://github.com/dotnet/runtime/issues/1024 - # # IBCMerge is currently Windows-only and x86/x64-only - # - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), or(eq(parameters.archType, 'x64'), eq(parameters.archType, 'x86'))) }}: - # - name: ibcOptimizeArg - # value: '-ibcoptimize' + + # IBCMerge is currently Windows-only and x86/x64-only + - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), or(eq(parameters.archType, 'x64'), eq(parameters.archType, 'x86'))) }}: + - name: ibcOptimizeArg + value: '-ibcoptimize' - name: enforcePgoArg value: '' # The EnforcePGO script is only supported on Windows and is not supported on arm or arm64. @@ -117,26 +117,14 @@ jobs: - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force displayName: Install native dependencies - # TODO: (Consolidation) Fix internal tool restore and re-enable. https://github.com/dotnet/runtime/issues/1024 # # Install internal tools on official builds # # Since our internal tools are behind an authenticated feed, # # we need to use the DotNetCli AzDO task to restore from the feed using a service connection. # # We can't do this from within the build, so we need to do this as a separate step. - # - ${{ if and(and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')), eq(parameters.osGroup, 'Windows_NT')) }}: - # - task: DotNetCoreInstaller@0 - # inputs: - # packageType: 'sdk' - # version: '2.1.503' - # - task: DotNetCoreCLI@2 - # displayName: Restore internal tools - # inputs: - # command: restore - # feedsToUse: config - # projects: '$(Build.SourcesDirectory)/eng/common/internal/Tools.csproj' - # nugetConfigPath: 'eng/internal/NuGet.config' - # restoreDirectory: '$(Build.SourcesDirectory)\.packages' - # verbosityRestore: 'normal' - # externalFeedCredentials: 'dotnet-core-internal-tooling' + - ${{ if and(and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')), eq(parameters.osGroup, 'Windows_NT')) }}: + - template: /eng/pipelines/common/restore-internal-tools.yml + parameters: + installDotnet: true # Build - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml index d27bce36408c32485de2a2bdc2eea386e3afcd5f..fe75539c4dc88b4423e86e4830d94e268fa355f7 100644 --- a/eng/pipelines/libraries/build-job.yml +++ b/eng/pipelines/libraries/build-job.yml @@ -67,20 +67,6 @@ jobs: - ${{ parameters.variables }} steps: - # TODO: (Consolidation) Fix internal tool restore and re-enable. https://github.com/dotnet/runtime/issues/1024 - # - ${{ if eq(parameters.isOfficialBuild, true) }}: - # - task: DotNetCoreCLI@2 - # displayName: Restore internal tools - # condition: and(succeeded(), ne(variables['_skipRestoreInternalTools'], 'true')) - # inputs: - # command: restore - # feedsToUse: config - # projects: 'eng/common/internal/Tools.csproj' - # nugetConfigPath: 'eng/internal/NuGet.config' - # restoreDirectory: '$(Build.SourcesDirectory)\.packages' - # verbosityRestore: 'normal' - # externalFeedCredentials: 'dotnet-core-internal-tooling' - - ${{ if eq(parameters.osGroup, 'OSX') }}: - script: | brew install pkgconfig icu4c openssl @@ -102,6 +88,11 @@ jobs: - script: $(_buildScript) -restore $(_buildArguments) $(_skipTestRestoreArg) displayName: Restore + - ${{ if eq(parameters.isOfficialBuild, true) }}: + - template: /eng/pipelines/common/restore-internal-tools.yml + parameters: + installDotnet: false + - script: $(_buildScript) $(_buildAction) $(_buildArguments)