Browse Source

Make "dotnet workload restore" conditional

pull/2135/head
Kévin Chalet 2 years ago
parent
commit
545a600630
  1. 4
      .github/workflows/build.yml
  2. 1
      Directory.Build.props
  3. 2
      eng/Tools.props

4
.github/workflows/build.yml

@ -67,12 +67,12 @@ jobs:
- name: Build, test and pack
if: ${{ runner.os == 'Windows' }}
run: eng\common\CIBuild.cmd -configuration Release -prepareMachine -integrationTest /p:SuppressSymbolPackageFormatValidation=true
run: eng\common\CIBuild.cmd -configuration Release -prepareMachine -integrationTest /p:RestoreDotNetWorkloads=true
- name: Build, test and pack
if: ${{ runner.os != 'Windows' }}
shell: pwsh
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine -integrationTest /p:SuppressSymbolPackageFormatValidation=true
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine -integrationTest /p:RestoreDotNetWorkloads=true
- name: Attest artifacts
uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2

1
Directory.Build.props

@ -14,6 +14,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<SuppressSymbolPackageFormatValidation>true</SuppressSymbolPackageFormatValidation>
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)eng\CodeAnalysis.ruleset</CodeAnalysisRuleset>
<EnableXlfLocalization>false</EnableXlfLocalization>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>

2
eng/Tools.props

@ -8,7 +8,7 @@
Restore the .NET workloads immediately after the .NET tooling has been installed by Arcade.
-->
<Target Name="RestoreWorkloads" AfterTargets="InstallDotNetCore">
<Target Name="RestoreWorkloads" AfterTargets="InstallDotNetCore" Condition=" '$(RestoreDotNetWorkloads)' == 'true' ">
<Message Text="Installing the .NET workloads required to build the solution..." />
<Exec Command='"$(DotNetTool)" workload restore' WorkingDirectory="$(RepoRoot)" ConsoleToMSBuild="true">

Loading…
Cancel
Save