diff --git a/eng/pipelines/coreclr/templates/jit-hardware-intrinsics-common.yml b/eng/pipelines/coreclr/templates/jit-hardware-intrinsics-common.yml index 64b273543d065d..a9cc53ed926d99 100644 --- a/eng/pipelines/coreclr/templates/jit-hardware-intrinsics-common.yml +++ b/eng/pipelines/coreclr/templates/jit-hardware-intrinsics-common.yml @@ -21,7 +21,10 @@ jobs: nameSuffix: CoreCLR buildArgs: -s clr+libs -c $(_BuildConfig) timeoutInMinutes: 360 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml parameters: creator: dotnet-bot @@ -48,7 +51,10 @@ jobs: nameSuffix: NativeAOT buildArgs: -s clr.aot+libs.native+libs.sfx -c $(_BuildConfig) timeoutInMinutes: 360 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml parameters: creator: dotnet-bot diff --git a/eng/pipelines/coreclr/templates/sccache-stats.yml b/eng/pipelines/coreclr/templates/sccache-stats.yml index fdef7e530fc2fd..6f2d9e4f98ea54 100644 --- a/eng/pipelines/coreclr/templates/sccache-stats.yml +++ b/eng/pipelines/coreclr/templates/sccache-stats.yml @@ -12,7 +12,7 @@ parameters: osSubgroup: '' steps: - - ${{ if and(eq(parameters.osGroup, 'linux'), or(eq(parameters.osSubgroup, ''), eq(parameters.osSubgroup, '_musl')), eq(parameters.archType, 'x64')) }}: + - ${{ if and(or(eq(parameters.osGroup, 'linux'), eq(parameters.osGroup, 'freebsd')), or(eq(parameters.archType, 'x64'), eq(parameters.archType, 'arm64'))) }}: - script: sccache --show-stats || true displayName: Sccache stats condition: always() diff --git a/eng/pipelines/coreclr/templates/setup-sccache.yml b/eng/pipelines/coreclr/templates/setup-sccache.yml index cdd232589cd80a..3472ffe296bf34 100644 --- a/eng/pipelines/coreclr/templates/setup-sccache.yml +++ b/eng/pipelines/coreclr/templates/setup-sccache.yml @@ -15,7 +15,7 @@ parameters: sccacheVersion: '0.15.0' steps: - - ${{ if and(eq(parameters.osGroup, 'linux'), or(eq(parameters.osSubgroup, ''), eq(parameters.osSubgroup, '_musl')), eq(parameters.archType, 'x64')) }}: + - ${{ if and(or(eq(parameters.osGroup, 'linux'), eq(parameters.osGroup, 'freebsd')), or(eq(parameters.archType, 'x64'), eq(parameters.archType, 'arm64'))) }}: # Set up the Azure Pipeline Cache for sccache's local cache directory. # Use a rolling key so each build can update the cache; restoreKeys # falls back to the most recent saved entry. @@ -43,7 +43,7 @@ steps: chmod +x "$sccacheDir/sccache" echo "##vso[task.prependpath]$sccacheDir" echo "##vso[task.setvariable variable=SCCACHE_DIR]$(Pipeline.Workspace)/.sccache" - echo "##vso[task.setvariable variable=SCCACHE_CACHE_SIZE]3584M" + echo "##vso[task.setvariable variable=SCCACHE_CACHE_SIZE]5120M" echo "##vso[task.setvariable variable=SCCACHE_IDLE_TIMEOUT]0" echo "##vso[task.setvariable variable=USE_SCCACHE]true" displayName: Download and configure sccache diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index f1a62719914144..49f2a156acc1ca 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -113,6 +113,10 @@ extends: nameSuffix: Musl_Validation buildArgs: -subset clr.native+libs.native+host.native -c $(_BuildConfig) timeoutInMinutes: 120 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml condition: or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 58f08f5f183f3c..f763b97ae48dff 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -83,6 +83,10 @@ extends: nameSuffix: AllSubsets_CoreCLR_ReleaseRuntimeLibs buildArgs: -s clr+libs+host+packs -rc Release -lc Release -c $(_BuildConfig) timeoutInMinutes: 120 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), @@ -99,6 +103,10 @@ extends: nameSuffix: AllSubsets_CoreCLR buildArgs: -s clr+libs+host+packs -rc Release -c Release -lc $(_BuildConfig) timeoutInMinutes: 120 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), @@ -360,7 +368,10 @@ extends: nameSuffix: Libraries_CheckedCoreCLR buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:ArchiveTests=true timeoutInMinutes: 120 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - template: /eng/pipelines/common/upload-artifact-step.yml parameters: @@ -539,7 +550,10 @@ extends: nameSuffix: CoreCLR_ReleaseLibraries buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true timeoutInMinutes: 120 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: $(Build.SourcesDirectory)/artifacts/bin @@ -649,6 +663,10 @@ extends: nameSuffix: CoreCLR_Bootstrapped buildArgs: -s clr+libs+host+packs+tools.cdac -c $(_BuildConfig) -rc Checked --bootstrap timeoutInMinutes: 120 + preBuildSteps: + - template: /eng/pipelines/coreclr/templates/setup-sccache.yml + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/sccache-stats.yml condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),