diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index b05ffcc32f..0204d0b4e2 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1744,6 +1744,7 @@ SETTINGCHANGE SETTINGSCHANGED settingsheader settingshotkeycontrol +setvariable SETWORKAREA setzero sfgao @@ -2143,6 +2144,7 @@ vsconfig VSCROLL vsetq VSM +vso vsonline vstemplate VSTHRD diff --git a/.pipelines/ci/ci.yml b/.pipelines/ci/ci.yml index cab3c045fa..982487c435 100644 --- a/.pipelines/ci/ci.yml +++ b/.pipelines/ci/ci.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/main/service-schema.json trigger: batch: true branches: @@ -9,21 +10,27 @@ trigger: - doc/* - temp/* - tools/* + - '**.md' pr: branches: include: - main - stable - + paths: + exclude: + - '**.md' + - doc + # 0.0.yyMM.dd## # 0.0.1904.0900 name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr) jobs: + - template: ./templates/build-powertoys-precheck.yml - template: ./templates/build-powertoys-ci.yml parameters: - platform: x64 + platform: x64 - template: ./templates/build-powertoys-ci.yml parameters: - platform: arm64 + platform: arm64 \ No newline at end of file diff --git a/.pipelines/ci/templates/build-powertoys-ci.yml b/.pipelines/ci/templates/build-powertoys-ci.yml index c21ecd2712..c5f4882cd8 100644 --- a/.pipelines/ci/templates/build-powertoys-ci.yml +++ b/.pipelines/ci/templates/build-powertoys-ci.yml @@ -6,6 +6,8 @@ parameters: jobs: - job: Build${{ parameters.platform }}${{ parameters.configuration }} displayName: Build ${{ parameters.platform }} ${{ parameters.configuration }} + dependsOn: Precheck + condition: and(succeeded(),ne(dependencies.Precheck.outputs['verifyBuildRequest.skipBuild'], 'Yes')) variables: BuildConfiguration: ${{ parameters.configuration }} BuildPlatform: ${{ parameters.platform }} @@ -29,4 +31,4 @@ jobs: # when we renamed our main branch. - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' - condition: and(succeededOrFailed(), not(eq(variables['Build.Reason'], 'PullRequest'))) + condition: and(succeededOrFailed(), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file diff --git a/.pipelines/ci/templates/build-powertoys-precheck.yml b/.pipelines/ci/templates/build-powertoys-precheck.yml new file mode 100644 index 0000000000..5fc8b691e7 --- /dev/null +++ b/.pipelines/ci/templates/build-powertoys-precheck.yml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json +jobs: +- job: Precheck + pool: + demands: ImageOverride -equals SHINE-VS17-Latest + ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}: + name: SHINE-OSS-L + ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}: + name: SHINE-INT-L + steps: + - checkout: none + + - task: PowerShell@2 + displayName: Verify Build Request + inputs: + targetType: 'inline' + script: | + $pullRequestNumber = "$(system.pullRequest.pullRequestNumber)"; + $gitHubPullRequest = Invoke-RestMethod -Method Get "https://api.github.com/repos/microsoft/PowerToys/pulls/$pullRequestNumber/files" + # If there are no files updated in the commit that are .md, set skipBuild variable + if(([array]($gitHubPullRequest.filename) -notmatch ".md|.txt").Length -eq 0) + { + Write-Host '##vso[task.setvariable variable=skipBuild;isOutput=true]Yes' + Write-Host 'Skipping Build' + } + pwsh: true + name: verifyBuildRequest \ No newline at end of file