From 54836d4834d61f4a3bc29951d9fa3656320c96cf Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Thu, 4 Dec 2025 17:30:27 -0800 Subject: [PATCH 1/2] Use shallow clones for CI jobs. --- .azure/pipelines/ci-public.yml | 2 ++ .azure/pipelines/jobs/default-build.yml | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 6874ec344b77..ee50e2d53259 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -98,6 +98,8 @@ stages: jobName: Code_check jobDisplayName: Code check agentOs: Windows + # Need full history for git log comparison in CodeCheck.ps1 + fetchDepth: 0 steps: - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1 diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index e27cd657128c..a2e24e0560eb 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -71,6 +71,9 @@ parameters: timeoutInMinutes: 180 testRunTitle: $(AgentOsName)-$(BuildConfiguration) useHostedUbuntu: true + # Checkout optimization parameters + fetchDepth: 1 + fetchTags: false # We need longer than the default amount of 5 minutes to upload our logs/artifacts. (We currently take around 5 mins in the best case). # This makes sure we have time to upload everything in the case of a build timeout - really important for investigating a build @@ -159,6 +162,9 @@ jobs: - name: ${{ pair.key }} value: ${{ pair.value }} steps: + - checkout: self + fetchDepth: ${{ parameters.fetchDepth }} + fetchTags: ${{ parameters.fetchTags }} - ${{ if ne(parameters.agentOs, 'Windows') }}: - script: df -h displayName: Disk size @@ -385,6 +391,9 @@ jobs: - name: ${{ pair.key }} value: ${{ pair.value }} steps: + - checkout: self + fetchDepth: ${{ parameters.fetchDepth }} + fetchTags: ${{ parameters.fetchTags }} - ${{ if ne(parameters.agentOs, 'Windows') }}: - script: df -h displayName: Disk size From e635c1a760762f9daa392b4879c48a8c0804f8c4 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Thu, 4 Dec 2025 19:07:13 -0800 Subject: [PATCH 2/2] Handle code_check jobs in other definitions. --- .azure/pipelines/ci-unofficial.yml | 2 ++ .azure/pipelines/ci.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.azure/pipelines/ci-unofficial.yml b/.azure/pipelines/ci-unofficial.yml index 28dbc0f13365..930b42f63ab3 100644 --- a/.azure/pipelines/ci-unofficial.yml +++ b/.azure/pipelines/ci-unofficial.yml @@ -111,6 +111,8 @@ extends: jobName: Code_check jobDisplayName: Code check agentOs: Windows + # Need full history for git log comparison in CodeCheck.ps1 + fetchDepth: 0 beforeBuild: - script: git submodule update --init displayName: Update submodules diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 0705018c8cb9..f0bb0cbf7aff 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -138,6 +138,8 @@ extends: jobName: Code_check jobDisplayName: Code check agentOs: Windows + # Need full history for git log comparison in CodeCheck.ps1 + fetchDepth: 0 steps: - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1