Skip to content

Commit

Permalink
Disable static restore in more locations (#66567)
Browse files Browse the repository at this point in the history
* Disable static restore in more locations

* Run compilers CI when build scripts change

* Include compiler generators in compilers code change check

* Remove separate restore in bootstrap build
  • Loading branch information
dibarbet authored Jan 30, 2023
1 parent 52cb962 commit 3a3f4fe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
8 changes: 2 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ stages:
include:
- src/Compilers/*
- src/Dependencies/*
- eng/*
- src/Tools/Source/CompilerGeneratorTools/*

- job: Correctness_Build_Artifacts
dependsOn: Determine_Changes
Expand Down Expand Up @@ -322,12 +324,6 @@ stages:
steps:
- template: eng/pipelines/checkout-windows-task.yml

- task: PowerShell@2
displayName: Restore
inputs:
filePath: eng/build.ps1
arguments: -configuration Debug -prepareMachine -ci -restore -binaryLogName Restore.binlog

- powershell: .\eng\test-rebuild.ps1 -ci -configuration Release
displayName: Run BuildValidator

Expand Down
4 changes: 4 additions & 0 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]

if ($ci) {
$args += " /p:ContinuousIntegrationBuild=true"
# Temporarily disable RestoreUseStaticGraphEvaluation to work around this NuGet issue
# in our CI builds
# https://github.com/NuGet/Home/issues/12373
$args += " /p:RestoreUseStaticGraphEvaluation=false"
}

if ($bootstrapDir -ne "") {
Expand Down
7 changes: 6 additions & 1 deletion eng/test-determinism.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ function Run-Build([string]$rootDir, [string]$logFileName) {

Stop-Processes

# Temporarily disable RestoreUseStaticGraphEvaluation to work around this NuGet issue
# in our CI builds
# https://github.com/NuGet/Home/issues/12373
$restoreUseStaticGraphEvaluation = if ($ci) { $false } else { $true }

Write-Host "Building $solution using $bootstrapDir"
MSBuild $toolsetBuildProj `
/p:Projects=$solution `
Expand All @@ -65,7 +70,7 @@ function Run-Build([string]$rootDir, [string]$logFileName) {
/p:BootstrapBuildPath=$bootstrapDir `
/p:RunAnalyzers=false `
/p:RunAnalyzersDuringBuild=false `
/p:RestoreUseStaticGraphEvaluation=true `
/p:RestoreUseStaticGraphEvaluation=$restoreUseStaticGraphEvaluation `
/bl:$logFilePath

Stop-Processes
Expand Down
2 changes: 1 addition & 1 deletion eng/test-rebuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ try {

if (-not $noBuild) {
Write-Host "Building Roslyn"
Exec-Block { & (Join-Path $PSScriptRoot "build.ps1") -build -bootstrap -ci:$ci -useGlobalNuGetCache:$useGlobalNuGetCache -configuration:$configuration -pack -binaryLog }
Exec-Block { & (Join-Path $PSScriptRoot "build.ps1") -restore -build -bootstrap -ci:$ci -useGlobalNuGetCache:$useGlobalNuGetCache -configuration:$configuration -pack -binaryLog }
}

Subst-TempDir
Expand Down

0 comments on commit 3a3f4fe

Please sign in to comment.