diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index e5102c32cd..f57de88355 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -6,92 +6,53 @@ variables: linux-pool: 'PrLin-2021-09-08' osx-pool: 'PrOsx-2021-07-27' -stages: -- stage: FormatChecks - displayName: 'Formatting and Documentation Checks' - pool: $(windows-pool) - jobs: - - job: - workspace: - clean: resources - variables: - - name: VCPKG_DOWNLOADS - value: D:\downloads - - name: DiffFile - value: $(Build.ArtifactStagingDirectory)\format.diff - steps: - - task: Powershell@2 - displayName: 'Generate Documentation' - inputs: - filePath: 'docs/regenerate.ps1' - arguments: '-VcpkgRoot . -WarningAction Stop' - pwsh: true - - script: .\bootstrap-vcpkg.bat - displayName: 'Bootstrap vcpkg' - - script: '.\vcpkg.exe format-manifest --all' - displayName: 'Format Manifests' - - task: Powershell@2 - displayName: 'Create Diff' - inputs: - filePath: scripts/azure-pipelines/Create-PRDiff.ps1 - arguments: '-DiffFile $(DiffFile)' - pwsh: true - - task: PublishBuildArtifacts@1 - condition: failed() - displayName: 'Publish Format and Documentation Diff' - inputs: - PathtoPublish: '$(DiffFile)' - ArtifactName: 'format.diff' -- stage: RunPrTests - displayName: 'Run PR Tests:' - dependsOn: FormatChecks - jobs: - - template: windows/azure-pipelines.yml - parameters: - triplet: x86-windows - jobName: x86_windows - poolName: $(windows-pool) +jobs: +- template: windows/azure-pipelines.yml + parameters: + triplet: x86-windows + jobName: x86_windows + poolName: $(windows-pool) - - template: windows/azure-pipelines.yml - parameters: - triplet: x64-windows - jobName: x64_windows - poolName: $(windows-pool) +- template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows + jobName: x64_windows + poolName: $(windows-pool) - - template: windows/azure-pipelines.yml - parameters: - triplet: x64-windows-static - jobName: x64_windows_static - poolName: $(windows-pool) +- template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows-static + jobName: x64_windows_static + poolName: $(windows-pool) - - template: windows/azure-pipelines.yml - parameters: - triplet: x64-windows-static-md - jobName: x64_windows_static_md - poolName: $(windows-pool) +- template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows-static-md + jobName: x64_windows_static_md + poolName: $(windows-pool) - - template: windows/azure-pipelines.yml - parameters: - triplet: x64-uwp - jobName: x64_uwp - poolName: $(windows-pool) +- template: windows/azure-pipelines.yml + parameters: + triplet: x64-uwp + jobName: x64_uwp + poolName: $(windows-pool) - - template: windows/azure-pipelines.yml - parameters: - triplet: arm64-windows - jobName: arm64_windows - poolName: $(windows-pool) +- template: windows/azure-pipelines.yml + parameters: + triplet: arm64-windows + jobName: arm64_windows + poolName: $(windows-pool) - - template: windows/azure-pipelines.yml - parameters: - triplet: arm-uwp - jobName: arm_uwp - poolName: $(windows-pool) +- template: windows/azure-pipelines.yml + parameters: + triplet: arm-uwp + jobName: arm_uwp + poolName: $(windows-pool) - - template: osx/azure-pipelines.yml - parameters: - poolName: $(osx-pool) +- template: osx/azure-pipelines.yml + parameters: + poolName: $(osx-pool) - - template: linux/azure-pipelines.yml - parameters: - poolName: $(linux-pool) +- template: linux/azure-pipelines.yml + parameters: + poolName: $(linux-pool) diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index b88a5f1203..d341a7a9de 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -14,6 +14,10 @@ jobs: value: D:\ - name: VCPKG_DOWNLOADS value: D:\downloads + - name: DiffFile + value: $(Build.ArtifactStagingDirectory)\format.diff + - name: ExtraChecksTriplet + value: x86-windows - group: vcpkg-asset-caching-credentials - name: X_VCPKG_ASSET_SOURCES value: "x-azurl,$(root-url),$(sas),readwrite" @@ -28,12 +32,35 @@ jobs: inputs: filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' pwsh: true - # Note: E: is the Azure machines' temporary disk. - script: .\bootstrap-vcpkg.bat displayName: 'Bootstrap vcpkg' - script: | if exist ${{ variables.VCPKG_DOWNLOADS }} rmdir /S /Q ${{ variables.VCPKG_DOWNLOADS }} 2>&1 displayName: 'Clean downloads' + # Note that we run docs checks before PR checks because they are likely to invalidate a whole run anyway + - task: Powershell@2 + displayName: 'Generate Documentation' + condition: eq('${{ parameters.triplet }}', '${{ variables.ExtraChecksTriplet }}') + inputs: + filePath: 'docs/regenerate.ps1' + arguments: '-VcpkgRoot . -WarningAction Stop' + pwsh: true + - script: '.\vcpkg.exe format-manifest --all' + displayName: 'Format Manifests' + condition: eq('${{ parameters.triplet }}', '${{ variables.ExtraChecksTriplet }}') + - task: Powershell@2 + displayName: 'Create Diff' + condition: eq('${{ parameters.triplet }}', '${{ variables.ExtraChecksTriplet }}') + inputs: + filePath: scripts/azure-pipelines/Create-PRDiff.ps1 + arguments: "-DiffFile '$(DiffFile)'" + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Format and Documentation Diff' + condition: and(eq('${{ parameters.triplet }}', '${{ variables.ExtraChecksTriplet }}'), failed()) + inputs: + PathtoPublish: '$(DiffFile)' + ArtifactName: 'format.diff' - task: PowerShell@2 displayName: '*** Test Modified Ports and Prepare Test Logs ***' inputs: @@ -43,7 +70,7 @@ jobs: pwsh: true - task: PowerShell@2 displayName: 'Validate version files' - condition: eq('${{ parameters.triplet }}', 'x86-windows') + condition: eq('${{ parameters.triplet }}', '${{ variables.ExtraChecksTriplet }}') inputs: targetType: inline script: |