Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9fa041a

Browse files
authored
Remove optionaltooling buildtools dependency (#34946)
* Remove optionaltooling buildtools dependency * Disable uapaot Jenkins leg
1 parent d93c386 commit 9fa041a

File tree

8 files changed

+62
-39
lines changed

8 files changed

+62
-39
lines changed

Directory.Build.props

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,6 @@
170170
</RestoreSources>
171171
</PropertyGroup>
172172

173-
<!--
174-
Add all the RestoreSources to the OptionalRestoreSource items as well so any
175-
common package references can correctly be resolved as well.
176-
-->
177-
<ItemGroup>
178-
<OptionalRestoreSource Include="$(RestoreSources)">
179-
<Uri>%(Identity)</Uri>
180-
</OptionalRestoreSource>
181-
</ItemGroup>
182-
183173
<PropertyGroup>
184174
<!-- By default make all libraries to be AnyCPU but individual projects can override it if they need to -->
185175
<Platform>AnyCPU</Platform>
@@ -438,10 +428,6 @@
438428
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp2.0'">$(DefineConstants),netcoreapp20</DefineConstants>
439429
</PropertyGroup>
440430

441-
<PropertyGroup>
442-
<OptionalToolingProjectPath>$(ProjectDir)\external\test-runtime\optional.csproj</OptionalToolingProjectPath>
443-
</PropertyGroup>
444-
445431
<PropertyGroup>
446432
<!-- Don't run tests if we're building another platform's binaries on Windows -->
447433
<SkipTests Condition="'$(SkipTests)' == '' and ('$(OsEnvironment)'=='Windows_NT' and '$(TargetsWindows)'!='true' and '$(OSGroup)'!='AnyOS')">true</SkipTests>

build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<Import Project="Directory.Build.targets" />
2828

29-
<Target Name="Restore" DependsOnTargets="GenerateConfigurationProps;RestoreOptionalToolingPackages;RestoreOptimizationDataPackage">
29+
<Target Name="Restore" DependsOnTargets="GenerateConfigurationProps;RestoreOptimizationDataPackage">
3030
<ItemGroup>
3131
<_RestoreProjects Include="external\dir.proj" />
3232
</ItemGroup>

buildpipeline/pipelinejobs.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def configurations = [
3030
['TGroup':"netcoreapp", 'Pipeline':winPipeline, 'Name':'Windows' , 'ForPR':"Debug-x64|Release-x86"],
3131
['TGroup':"netfx", 'Pipeline':winPipeline, 'Name':'NETFX', 'ForPR':"Release-x86"],
3232
//['TGroup':"uap", 'Pipeline':winPipeline, 'Name':'UWP CoreCLR', 'ForPR':"Debug-x64"],
33-
['TGroup':"uapaot", 'Pipeline':winPipeline, 'Name':'UWP NETNative', 'ForPR':"Release-x86"],
33+
//['TGroup':"uapaot", 'Pipeline':winPipeline, 'Name':'UWP NETNative', 'ForPR':"Release-x86"],
3434
//['TGroup':"all", 'Pipeline':winPipeline, 'Name':'Packaging All Configurations', 'ForPR':"Debug-x64"],
3535
]
3636

eng/InternalTools.props

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
3+
<Project>
4+
<Import Project="dependencies.props" />
5+
6+
<ItemGroup>
7+
<PackageReference Include="TestILC.amd64ret" Version="$(TestILCAmd64retPackageVersion)" />
8+
<PackageReference Include="TestILC.armret" Version="$(TestILCArmretPackageVersion)" />
9+
<PackageReference Include="TestILC.x86ret" Version="$(TestILCX86retPackageVersion)" />
10+
</ItemGroup>
11+
12+
<PropertyGroup>
13+
<!-- Reset the restore config file set by arcade. -->
14+
<RestoreConfigFile></RestoreConfigFile>
15+
<RestoreSources>
16+
https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json;
17+
$(RestoreSources);
18+
</RestoreSources>
19+
</PropertyGroup>
20+
</Project>

eng/Tools.props

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@
5656
<RepoTool Include="dotnet-reportgenerator-globaltool" Version="$(DotNetReportGeneratorGlobalToolPackageVersion)" />
5757
</ItemGroup>
5858

59+
<Target Name="InitOptionalTools"
60+
Condition="'$(OptionalToolSource)' != ''"
61+
AfterTargets="Restore">
62+
63+
<PropertyGroup>
64+
<OptionalToolDir>$([MSBuild]::NormalizeDirectory('$(RepositoryEngineeringDir)', 'common', 'internal'))</OptionalToolDir>
65+
<OptionalToolProjectPath>$(OptionalToolDir)Tools.csproj</OptionalToolProjectPath>
66+
</PropertyGroup>
67+
68+
<Exec Command="$(DotNetCmd) restore &quot;$(OptionalToolProjectPath)&quot; --interactive --ignore-failed-sources"
69+
WorkingDirectory="$(RepoRoot)" />
70+
71+
</Target>
72+
5973
<Target Name="InitTools" AfterTargets="Restore">
6074

6175
<PropertyGroup>
@@ -70,7 +84,7 @@
7084

7185
<Exec Condition="!Exists('$(BuildToolsSemaphore)')"
7286
Command="$(InitToolsCmdLine) &gt; &quot;$(RepoRoot)init-tools.log&quot;" />
73-
<Touch Files="$(BuildToolsSemaphore)"
87+
<Touch Files="$(BuildToolsSemaphore)"
7488
AlwaysCreate="true" />
7589
<OnError ExecuteTargets="DumpInitToolsLog" />
7690

@@ -105,13 +119,13 @@
105119
Command="$(DotNetCmd) tool install --tool-path &quot;$(GlobalToolsDir)&quot; %(RepoTool.Identity) --version %(RepoTool.Version) --add-source https:%2F%2Fapi.nuget.org/v3/index.json"
106120
WorkingDirectory="$(RepoRoot)"
107121
ContinueOnError="WarnAndContinue" />
108-
122+
109123
</Target>
110124

111125
<Target Name="DumpInitToolsLog">
112126

113127
<Message Text="Init-tools failed dumping log file $(RepoRoot)init-tools.log" />
114-
<Message Condition="Exists('$(RepoRoot)init-tools.log')"
128+
<Message Condition="Exists('$(RepoRoot)init-tools.log')"
115129
Text="$([System.IO.File]::ReadAllText('$(RepoRoot)init-tools.log'))" />
116130

117131
</Target>

eng/pipelines/corefx-base.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,8 @@ jobs:
8686
- _msbuildCommand: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
8787

8888
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
89-
- _optionalToolsArguments: /p:OptionalToolSourceUser=dn-bot
90-
/p:OptionalToolSource=$(OptionalToolSourceUri)
91-
/p:OptionalToolSourcePassword=$(dn-bot-devdiv-nuget-feed-read)
9289
- _windowsOfficialBuildArguments: -sign
9390
/p:DotNetSignType=$(_SignType)
94-
/p:EnableProfileGuidedOptimization=true
95-
$(_optionalToolsArguments)
9691

9792
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
9893
- _windowsOfficialBuildArguments: ''
@@ -143,6 +138,24 @@ jobs:
143138
- ${{ job.preBuildSteps }}
144139

145140
- ${{ if eq(job.customBuildSteps[0], '') }}:
141+
142+
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
143+
- task: NuGetToolInstaller@0
144+
inputs:
145+
versionSpec: '4.9.2'
146+
condition: eq(variables['_restoreInternalTools'], 'true')
147+
- task: NuGetCommand@2
148+
displayName: Restore internal tools
149+
inputs:
150+
command: restore
151+
feedsToUse: config
152+
restoreSolution: 'eng\common\internal\Tools.csproj'
153+
nugetConfigPath: 'NuGet.config'
154+
restoreDirectory: '$(Build.SourcesDirectory)\.packages'
155+
condition: eq(variables['_restoreInternalTools'], 'true')
156+
env:
157+
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: '{"endpointCredentials": [{"endpoint":"https://devdiv.pkgs.visualstudio.com/_packaging/8f470c7e-ac49-4afe-a6ee-cf784e438b93/nuget/v3/index.json", "username":"dn-bot","password":"$(dn-bot-devdiv-nuget-feed-read)"}]}'
158+
146159
- script: $(_buildScript)
147160
$(_commonArguments)
148161
-framework $(_framework)

eng/pipelines/windows.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,14 @@ jobs:
9898
_architecture: x86
9999
_framework: uapaot
100100
_helixQueues: $(uapNetfxQueues)
101+
_restoreInternalTools: true
101102

102103
UAPAOT_x64_Release:
103104
_BuildConfig: Release
104105
_architecture: x64
105106
_framework: uapaot
106107
_helixQueues: $(uapNetfxQueues)
108+
_restoreInternalTools: true
107109

108110
pool:
109111
${{ if eq(parameters.isOfficialBuild, 'true') }}:
@@ -212,6 +214,7 @@ jobs:
212214
_BuildConfig: Release
213215
_architecture: x86
214216
_framework: uapaot
217+
_restoreInternalTools: true
215218

216219
${{ if eq(parameters.isOfficialBuild, 'true') }}:
217220
arm_Release:
@@ -228,11 +231,13 @@ jobs:
228231
_BuildConfig: Release
229232
_architecture: arm
230233
_framework: uapaot
234+
_restoreInternalTools: true
231235

232236
UAPAOT_arm64_Release:
233237
_BuildConfig: Release
234238
_architecture: arm64
235239
_framework: uapaot
240+
_restoreInternalTools: true
236241

237242
pool:
238243
${{ if eq(parameters.isOfficialBuild, 'true') }}:

external/test-runtime/optional.csproj

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)