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

Properly set the nuget cache for the repo #24505

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="globalPackagesFolder" value="./.packages" />
<add key="repositoryPath" value="./.packages" />
</config>
<packageRestore>
<add key="enabled" value="True" />
</packageRestore>
Expand Down
2 changes: 1 addition & 1 deletion build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__TestDir=%__ProjectDir%\tests"
set "__ProjectFilesDir=%__TestDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%__ProjectDir%\packages"
set "__PackagesDir=%__ProjectDir%\.packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
Expand Down
2 changes: 1 addition & 1 deletion build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ __IncludeTests=INCLUDE_TESTS
# Set the various build properties here so that CMake and MSBuild can pick them up
export __ProjectDir="$__ProjectRoot"
__SourceDir="$__ProjectDir/src"
__PackagesDir="$__ProjectDir/packages"
__PackagesDir="$__ProjectDir/.packages"
__RootBinDir="$__ProjectDir/bin"
__BuildToolsDir="$__ProjectDir/Tools"
__DotNetCli="$__ProjectDir/dotnet.sh"
Expand Down
4 changes: 2 additions & 2 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set ghprbCommentBody=
:: __BuildOS -- default: Windows_NT
:: __ProjectDir -- default: directory of the dir.props file
:: __SourceDir -- default: %__ProjectDir%\src\
:: __PackagesDir -- default: %__ProjectDir%\packages\
:: __PackagesDir -- default: %__ProjectDir%\.packages\
:: __RootBinDir -- default: %__ProjectDir%\bin\
:: __BinDir -- default: %__RootBinDir%\%__BuildOS%.%__BuildArch.%__BuildType%\
:: __IntermediatesDir
Expand All @@ -55,7 +55,7 @@ if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__ProjectFilesDir=%__ProjectDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%DotNetRestorePackagesPath%"
if [%__PackagesDir%]==[] set "__PackagesDir=%__ProjectDir%\packages"
if [%__PackagesDir%]==[] set "__PackagesDir=%__ProjectDir%\.packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ __IgnoreWarnings=0
# Set the various build properties here so that CMake and MSBuild can pick them up
__ProjectDir="$__ProjectRoot"
__SourceDir="$__ProjectDir/src"
__PackagesDir="${DotNetRestorePackagesPath:-${__ProjectDir}/packages}"
__PackagesDir="${DotNetRestorePackagesPath:-${__ProjectDir}/.packages}"
__RootBinDir="$__ProjectDir/bin"
__UnprocessedBuildArgs=
__CommonMSBuildArgs=
Expand Down
17 changes: 11 additions & 6 deletions dir.common.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@

<PropertyGroup>
<CoreclrDir>$(MSBuildThisFileDirectory)</CoreclrDir>
<PackagesDir>$(CoreclrDir)/packages</PackagesDir>
<PackagesDir>$(CoreclrDir)/.packages</PackagesDir>

<!-- [ARCADE_REMOVE] This property can be removed after build-tools is removed. -->
<PackageOutputPath>$(PackagesDir)</PackageOutputPath>
</PropertyGroup>

<!-- Define NuGet properties for scenarios where they aren't set. From the command line.
Should match Nuget.config at root. -->
<PropertyGroup>
<NuGetPackageRoot>$(PackagesDir)</NuGetPackageRoot>
<RestorePackagesPath>$(PackagesDir)</RestorePackagesPath>
</PropertyGroup>

<!-- Set default Configuration and Platform -->
Expand All @@ -33,9 +43,4 @@

<PlatformConfigPathPart>$(BuildOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart>
</PropertyGroup>

<PropertyGroup>
<RestorePackagesPath>$(PackagesDir)</RestorePackagesPath>
</PropertyGroup>

</Project>
7 changes: 3 additions & 4 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
</PropertyGroup>

<!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
<!-- Set the kind of PDB to Portable -->
<PropertyGroup>
<DebugType Condition="'$(DebugType)' == ''">Portable</DebugType>
<UseSourceLink>true</UseSourceLink>
<DebugType Condition="'$(DebugType)' == ''">Portable</DebugType>
</PropertyGroup>

<!-- Version numbers for both managed & native binaries -->
Expand Down Expand Up @@ -55,7 +54,7 @@

<PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'=='' and '$(__PackagesDir)'!=''">$(__PackagesDir)\</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)\.packages\</PackagesDir>

<RootBinDir>$(__RootBinDir)\</RootBinDir>
<RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
Expand Down
3 changes: 1 addition & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bda52d7619f9420de46f2c39ffc972864bbcab63</Sha>
</Dependency>
<!-- This dependency should be added, but it causes the github PR legs to not launch. -->
<!-- Dependency Name="microsoft.dotnet.build.tasks.feed" Version="2.2.0-beta.19229.8">
<Dependency Name="microsoft.dotnet.build.tasks.feed" Version="2.2.0-beta.19229.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a7a250e9c13147134543c35fef2fb81f19592edf</Sha>
</Dependency-->
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<MicrosoftNETCorePlatformsVersion>3.0.0-preview6.19259.1</MicrosoftNETCorePlatformsVersion>
<MicrosoftBclAsyncInterfacesVersion>1.0.0-preview6.19257.8</MicrosoftBclAsyncInterfacesVersion>
<MicrosoftNETCoreAppVersion>3.0.0-preview5-27620-01</MicrosoftNETCoreAppVersion>
<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19229.8</MicrosoftDotNetBuildTasksFeedVersion>
<optimizationIBCCoreCLRVersion>99.99.99-master-20190509.1</optimizationIBCCoreCLRVersion>
<optimizationPGOCoreCLRVersion>99.99.99-master-20190509.1</optimizationPGOCoreCLRVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
feedsToUse: config
projects: 'src/.nuget/optdata/ibcmerge.csproj'
nugetConfigPath: 'eng/internal/NuGet.config'
restoreDirectory: '$(Build.SourcesDirectory)\packages'
restoreDirectory: '$(Build.SourcesDirectory)\.packages'
verbosityRestore: 'normal'
externalFeedCredentials: 'dotnet-core-internal-tooling'

Expand Down
2 changes: 1 addition & 1 deletion init-tools.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setlocal

set INIT_TOOLS_LOG=%~dp0init-tools.log
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0.packages
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
set DOTNET_PATH=%~dp0.dotnet\
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
Expand Down
2 changes: 1 addition & 1 deletion init-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
__init_tools_log="$__scriptpath/init-tools.log"
__PACKAGES_DIR="$__scriptpath/packages"
__PACKAGES_DIR="$__scriptpath/.packages"
__TOOLRUNTIME_DIR="$__scriptpath/Tools"
__DOTNET_PATH="$__scriptpath/.dotnet"
__DOTNET_CMD="$__DOTNET_PATH/dotnet"
Expand Down
2 changes: 1 addition & 1 deletion tests/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)'==''">false</CopyNuGetImplementations>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<SourceDir>$(ProjectDir)src\</SourceDir>
<PackagesDir>$(ProjectDir)..\packages\</PackagesDir>
<PackagesDir>$(ProjectDir)..\.packages\</PackagesDir>
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)..\Tools\</ToolsDir>
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ProjectDir)..\.dotnet\</DotnetCliPath>
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
Expand Down
2 changes: 1 addition & 1 deletion tests/publishdependency.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<CrossGenFiles Include="..\packages\runtime.$(TargetRid).Microsoft.NETCore.Runtime.CoreCLR\$(DesiredPackageVersionArg)\tools\crossgen*"/>
<CrossGenFiles Include="..\.packages\runtime.$(TargetRid).Microsoft.NETCore.Runtime.CoreCLR\$(DesiredPackageVersionArg)\tools\crossgen*"/>
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/arm32_ci_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ function copy_to_emulator {
__testDirFileBase="$__ARMEmulCoreclr/$testDirFileBase"

sudo cp -R ./tests "$__ARMRootfsCoreclrPath/"
sudo cp -R ./packages "$__ARMRootfsCoreclrPath/"
sudo cp -R ./.packages "$__ARMRootfsCoreclrPath/"
sudo cp -R ./Tools "$__ARMRootfsCoreclrPath/"

#Copy corefx binary directories to the corefx root in the emulator (first native and then managed)
Expand Down
2 changes: 1 addition & 1 deletion tests/setup-stress-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ echo "Running init-tools.sh"
"${scriptDir}"/../init-tools.sh

dotnet=$"${scriptDir}"/../.dotnet/dotnet
packageDir="${scriptDir}"/../packages
packageDir="${scriptDir}"/../.packages
csprojPath="${scriptDir}"/src/Common/stress_dependencies/stress_dependencies.csproj

if [ ! -e $dotnetCmd ]; then
Expand Down