Skip to content

Commit dd03899

Browse files
committed
PS-11473 [8.0]: azure-pipelines: build five configs by default
Cut Azure Pipelines usage on pull requests, and make the full compiler matrix something CI can ask for explicitly. - Drop the CI trigger (`trigger: none`); pushes no longer queue builds. The nightly 1:00 AM UTC schedule for 8.0 and PR validation are unaffected. - Skip PR validation while a pull request is a draft (`pr: drafts: false`); builds start when it is marked ready for review. - Replace the `clang-22 Debug INVERTED` matrix leg with `gcc-16 Debug INVERTED`, dropping the now-inert `UBUNTU_CODE_NAME` (it only feeds the apt.llvm.org repository line, which is guarded on clang). - Build only clang-22 RelWithDebInfo, clang-22 Debug, gcc-16 RelWithDebInfo, gcc-16 Debug and gcc-16 Debug INVERTED by default. The other 37 legs keep a per-leg compile-time guard, now on a queue-time parameter: ${{ if or(parameters.fullCI, eq(variables['Build.Reason'], 'Schedule')) }} This replaces the "fullci" branch-name escape hatch, which could not work. A guard is evaluated during template expansion, and the branch is not knowable then. Measured on a pull request from branch PS-11473-8.4-fullci, the compile-time values are: Build.Reason 'PullRequest' Build.SourceBranch 'refs/pull/6116/merge' Build.SourceBranchName 'merge' System.PullRequest.SourceBranch '' (runtime: the branch name) So Build.SourceBranchName is always "merge" on a pull request and the old expression never fired there; it only ever worked for non-PR runs, which its Build.Reason term already covered. A parameter is resolved when the run is created and therefore is visible to ${{ }}. It makes the pipeline callable from GitHub Actions in either mode: POST https://dev.azure.com/it0639/percona-server/_apis/pipelines/<id>/runs?api-version=7.1 { "resources": { "repositories": { "self": { "refName": "refs/pull/<n>/merge" } } }, "templateParameters": { "fullCI": true } } Queued without templateParameters it builds the five default configs; with fullCI true, all 42. The guard tests the parameter rather than "not a pull request" because an API-created run reports Build.Reason=Manual, which would otherwise make every queued run build everything. Schedule is kept so the nightly still covers all 42; a manual queue from the Azure UI now gets five unless the checkbox is ticked. Guards stay per-leg rather than grouped under a single ${{ if }}: that is the shape this pipeline used before and is known to expand. Verified by expanding both branches of the guard: the default run yields the five configs and a fullCI run yields the same 42 legs as before, with the job's steps, variables, pool and timeout unchanged. Backport of de116cd from 8.4. The 8.0 matrix is larger (clang-12..22, gcc-9..16 -- 42 legs against 8.4's 36), so the extended tier is 37 legs; the five default configs are the same.
1 parent 290de0d commit dd03899

1 file changed

Lines changed: 181 additions & 142 deletions

File tree

0 commit comments

Comments
 (0)