2024-04-13 01:25:33 +03:00
|
|
|
trigger: none # Explicitly scheduled for PRs
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- group: "BuildXL Common variables"
|
|
|
|
- name: BuildXL.LogsDirectory.LKG
|
|
|
|
value: $(Build.SourcesDirectory)\Out\Logs\pr-$(Build.BuildNumber)-lkg
|
|
|
|
- name: BuildXL.LogsDirectory
|
|
|
|
value: $(Build.SourcesDirectory)\Out\Logs\pr-$(Build.BuildNumber)
|
|
|
|
- name: BuildXL.PreReleaseTag
|
|
|
|
value: pr.public.win
|
|
|
|
- name: BuildXL.SemanticVersion
|
|
|
|
value: 0.0.$(Build.BuildNumber)
|
|
|
|
- name: BuildXL.Configuration
|
|
|
|
value: Release
|
2024-10-14 22:31:51 +03:00
|
|
|
# We have a separate pipeline that runs clean builds to get full CodeQL coverage.
|
|
|
|
- name: Codeql.Enabled
|
|
|
|
value: "false"
|
2024-04-17 23:34:39 +03:00
|
|
|
|
2024-04-13 01:25:33 +03:00
|
|
|
jobs:
|
|
|
|
- job: Public_Validation
|
|
|
|
displayName: Public PR Validation
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
cancelTimeoutInMinutes: 1
|
|
|
|
|
|
|
|
pool:
|
2024-05-08 00:42:25 +03:00
|
|
|
name: BuildXL-DevOpsAgents-Selfhost
|
|
|
|
os: windows
|
2024-04-16 21:34:05 +03:00
|
|
|
|
2024-04-13 01:25:33 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
fetchDepth: 1
|
|
|
|
fetchTags: false
|
|
|
|
|
2024-04-17 23:34:39 +03:00
|
|
|
- template: /.azdo/common/journaling.yml # Enable journaling
|
2024-04-13 01:25:33 +03:00
|
|
|
|
|
|
|
# Step 1. Build bits and deploy to dev
|
|
|
|
- template: /.azdo/common/set-variable-pats.yml
|
2024-04-17 23:34:39 +03:00
|
|
|
|
2024-04-13 01:25:33 +03:00
|
|
|
- script: >-
|
|
|
|
.\bxl.cmd
|
|
|
|
-minimal
|
|
|
|
-deploy Dev
|
|
|
|
-deployconfig Release
|
|
|
|
-CacheNamespace BuildXL.Public
|
|
|
|
-SharedCacheMode ConsumeAndPublish
|
|
|
|
/p:[Sdk.BuildXL]microsoftInternal=1
|
|
|
|
/q:ReleaseNet8
|
|
|
|
/p:[BuildXL.Branding]SemanticVersion=$(BuildXL.SemanticVersion)
|
|
|
|
/p:[BuildXL.Branding]PrereleaseTag=$(BuildXL.PreReleaseTag)
|
|
|
|
/logOutput:FullOutputOnWarningOrError
|
|
|
|
/traceInfo:prvalidation=Public
|
|
|
|
/scrubDirectory:Out\objects
|
|
|
|
/logsDirectory:$(BuildXL.LogsDirectory.LKG)
|
2024-05-18 00:51:54 +03:00
|
|
|
/cachemiss:BxlPublicValidation
|
2024-04-13 01:25:33 +03:00
|
|
|
displayName: BuildXL -Deploy Dev
|
|
|
|
env:
|
|
|
|
1ESSHAREDASSETS_BUILDXL_FEED_PAT: $(1ESSHAREDASSETS_BUILDXL_FEED_PAT)
|
|
|
|
CLOUDBUILD_BUILDXL_SELFHOST_FEED_PAT: $(CLOUDBUILD_BUILDXL_SELFHOST_FEED_PAT)
|
|
|
|
MSENG_GIT_PAT: $(MSENG_GIT_PAT)
|
|
|
|
VSTSPERSONALACCESSTOKEN: $(VSTSPERSONALACCESSTOKEN)
|
|
|
|
ARTIFACT_CREDENTIALPROVIDERS_PATH: $(ARTIFACT_CREDENTIALPROVIDERS_PATH)
|
|
|
|
CLOUDBUILD_BUILDXL_SELFHOST_FEED_PAT_B64: $(CLOUDBUILD_BUILDXL_SELFHOST_FEED_PAT_B64)
|
|
|
|
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: $(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
displayName: Upload -Deploy Dev logs
|
|
|
|
condition: always()
|
|
|
|
continueOnError: True
|
|
|
|
inputs:
|
|
|
|
path: $(BuildXL.LogsDirectory.LKG)
|
|
|
|
artifactName: BuildXL -Deploy Dev logs
|
|
|
|
|
|
|
|
# Step 2. Build microsoftInternal=0 using the built bits
|
2024-04-17 23:34:39 +03:00
|
|
|
- template: /.azdo/common/set-msvc-version.yml
|
2024-04-13 01:25:33 +03:00
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: BuildXL -Use Dev (microsoftInternal=0)
|
|
|
|
inputs:
|
|
|
|
script: >-
|
|
|
|
bxl.cmd
|
|
|
|
-Use Dev
|
|
|
|
-UseBlobL3
|
|
|
|
-SharedCacheMode ConsumeAndPublish
|
|
|
|
-CacheNamespace BuildXL.Public.Validation
|
|
|
|
/p:[Sdk.BuildXL]microsoftInternal=0
|
|
|
|
/q:$(BuildXL.Configuration)Net8
|
|
|
|
/logOutput:FullOutputOnWarningOrError
|
|
|
|
/p:RetryXunitTests=1
|
|
|
|
/processRetries:3
|
|
|
|
/traceInfo:prvalidation=PublicLKG
|
|
|
|
/p:xunitSemaphoreCount=12
|
|
|
|
/logsDirectory:$(BuildXL.LogsDirectory)
|
|
|
|
/scrubDirectory:Out\objects
|
|
|
|
/pipTimeoutMultiplier:2
|
|
|
|
|
|
|
|
# Step 3. Check to see if there are any unstaged files in the build and fail the build.
|
|
|
|
# We avoid checking cg/nuget/cgmanifest.json, which we expect to change in the external build
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Check for unstaged files in the build
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
continueOnError: true
|
|
|
|
script: |
|
|
|
|
$gitStatus = git status --porcelain . -- ':!cg/nuget/cgmanifest.json'
|
|
|
|
if (-not [string]::IsNullOrWhiteSpace($gitStatus))
|
|
|
|
{
|
|
|
|
Write-Host "##vso[task.logissue type=error]There are unstaged files in the build."
|
|
|
|
Write-Host "##vso[task.logissue type=error]Please commit these files and re-run the validation."
|
|
|
|
$gitStatus.Split([Environment]::NewLine) | ForEach-Object {
|
|
|
|
Write-Host "##vso[task.logissue type=error]$($_)"
|
|
|
|
}
|
|
|
|
Write-Host "git diff"
|
|
|
|
git diff
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
displayName: Upload -Use Dev logs
|
|
|
|
condition: always()
|
|
|
|
continueOnError: True
|
|
|
|
inputs:
|
|
|
|
path: $(BuildXL.LogsDirectory)
|
2024-04-17 23:34:39 +03:00
|
|
|
artifactName: BuildXL -Use Dev logs
|