Skip to content

Commit 848eaad

Browse files
Add shallow clone optimization for CI jobs (backport of #64657)
Co-authored-by: adityamandaleeka <219224+adityamandaleeka@users.noreply.github.com>
1 parent bb9ab72 commit 848eaad

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.azure/pipelines/ci-public.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ stages:
9797
jobName: Code_check
9898
jobDisplayName: Code check
9999
agentOs: Windows
100+
# Need full history for git log comparison in CodeCheck.ps1
101+
fetchDepth: 0
100102
steps:
101103
- powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs)
102104
displayName: Run eng/scripts/CodeCheck.ps1

.azure/pipelines/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ extends:
162162
jobName: Code_check
163163
jobDisplayName: Code check
164164
agentOs: Windows
165+
# Need full history for git log comparison in CodeCheck.ps1
166+
fetchDepth: 0
165167
steps:
166168
- powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs)
167169
displayName: Run eng/scripts/CodeCheck.ps1

.azure/pipelines/jobs/default-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ parameters:
7171
timeoutInMinutes: 180
7272
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
7373
useHostedUbuntu: true
74+
# Checkout optimization parameters
75+
fetchDepth: 1
76+
fetchTags: false
7477

7578
# 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).
7679
# This makes sure we have time to upload everything in the case of a build timeout - really important for investigating a build
@@ -168,6 +171,8 @@ jobs:
168171
displayName: Use XCode 16.4.0
169172
- checkout: self
170173
clean: true
174+
fetchDepth: ${{ parameters.fetchDepth }}
175+
fetchTags: ${{ parameters.fetchTags }}
171176
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
172177
- powershell: ./eng/scripts/InstallProcDump.ps1
173178
displayName: Install ProcDump
@@ -395,6 +400,8 @@ jobs:
395400
displayName: Use XCode 16.4.0
396401
- checkout: self
397402
clean: true
403+
fetchDepth: ${{ parameters.fetchDepth }}
404+
fetchTags: ${{ parameters.fetchTags }}
398405
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
399406
- powershell: ./eng/scripts/InstallProcDump.ps1
400407
displayName: Install ProcDump

0 commit comments

Comments
 (0)