Repository navigation
Move Azure Pipelines CI to GitHub Actions #109408
Description
GitHub Actions is easier to use and maintain. For example, GitHub Actions is more popular and widely used, and so more familiar. It's easier to maintain a single system. Also core devs can restart failed GitHub Actions whereas they can't for Azure Pipelines. Both are owned by Microsoft and I believe they run on much the same infra.
There's a lot of duplication of tests between Azure Pipelines and GitHub Actions.
Let's remove the duplicated tests, and move the unique things over to GitHub Actions. For example, patchcheck is only run on AP.
We might not necessarily need to port things directly over, it may be possible to replicate equivalent checks in another way, possible with a pre-commit or Ruff lint rule. Let's evaluate these separately.
Related issues/PRs:
- Azure Pipelines:
macOS CI TestsandUbuntu CI Tests (coverage)jobs are always skipped #109395 - CI: Remove docs build from Azure Pipelines #105823
- Make Azure Pipelines optional on GitHub PRs #84018
Linked PRs
- gh-109408: Remove Ubuntu unit tests from Azure Pipelines #109452
- gh-109408: Azure Pipelines: test 3.12 branch #109453
- gh-109408: Run
patchcheckin GitHub Actions #109459 - [3.12] gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-109452) #109519
- [3.11] gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-109452) #109520
- [3.12] gh-109408: Azure Pipelines: test 3.12 branch (GH-109453) #109535
- [3.11] gh-109408: Azure Pipelines: test 3.12 branch (GH-109453) #109536
- gh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions #109569
- [3.12] gh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions (GH-109569) #109623
- [3.11] gh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions (GH-109569) #109624
- gh-109408: Add the docs whitespace check from patchcheck to pre-commit #109854
- GH-109408: Move the C file whitespace check from patchcheck to pre-commit #109890
- GH-109408: Move the Python file whitespace check from patchcheck to pre-commit #109891
- gh-109408: Stop running patchcheck in CI #109895
- [3.12] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) #110594
- [3.11] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) #110595
- [3.12] GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891) #110633
- [3.12] GH-109408: Move the C file whitespace check from patchcheck to pre-commit (GH-109890) #110636
- [3.11] GH-109408: Move the C file whitespace check from patchcheck to pre-commit (GH-109890) #110640
- [3.11] GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891) #110641
- gh-109408: Revert pre-commit whitespace checks pending portable solution #110726
- [3.12] gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726) #110730
- GH-109408: Add a
make linttarget #122333 - GH-109408: Remove
.azure-pipelines/pr.yml#122643
Activity
hugovk commentedon Sep 14, 2023
Hmm, and Azure Pipelines is only running for PRs to
main(not backports); and on the version branches after PRs have been merged, but not for3.12.There are two top-level Azure Pipelines config files:
Azure Pipelines CI
This runs on version branches, after a PR has been merged.
But when we forked 3.12 from
mainin May, we forgot to add'3.12'to the config, so it's not run on that branch at all:Azure Pipelines PR
This runs when PRs are opened. But it's only running for PRs against
main, not for any of the backport PRs. I'm not sure why.Example
To illustrate, this set of PRs only only had AP builds for
main(python/cpython#109360) and not3.12(python/cpython#109361) or
3.11(#109362).After merge, AP ran for
main(https://dev.azure.com/Python/cpython/_build/results?buildId=137654&view=results) and3.11(https://dev.azure.com/Python/cpython/_build/results?buildId=137657&view=results) but not3.12.For comparison, GitHub Actions runs for PRs for all branches, but not merged pushes to version branches.
brettcannon commentedon Sep 14, 2023
I believe @zooba said there were some things being tested on Azure Pipelines that GitHub Actions didn't support?
zooba commentedon Sep 14, 2023
Azure Pipelines is doing install layout testing using the APPX layout as a second step post-commit. While I'd most like to have the default build match the install layout, this has been a useful way to catch issues in tests that assume a source directory layout. These tests are templated at https://github.com/python/cpython/blob/main/.azure-pipelines/windows-layout-steps.yml and included a few times in
ci.yml.hugovk commentedon Sep 14, 2023
Looks like we could potentially remove the "Tests" step (and "Publish Test Results") from
windows-steps.ymlwithout affecting the layout testing? The main thing inwindows-steps.ymlbeing the CPython build.In addition to the APPX layout step, should we also keep the nuget and embed layout steps?
cpython/.azure-pipelines/ci.yml
Lines 103 to 115 in 3b9d10b
zooba commentedon Sep 14, 2023
Yeah, that would work. But it's post-commit testing anyway, so it isn't holding anyone up. And knowing that the regular tests pass is incredibly valuable when something specific to one of the layouts fails.
I'm pretty sure people are only annoyed by the PR integration. If that goes away, nobody will care unless they're looking for it.
As for the different layouts, the nuget and embed layouts only do really quick tests. I'd keep them all, as it gives us early warning that something has broken them (e.g. a new DLL isn't being copied). Otherwise we won't find out until during the release process when the same tests are run.
hugovk commentedon Sep 15, 2023
Sounds good. I suggest we proceed as follows:
ci.ymlbe, only changepr.ymlpr.yml, keepingpatchcheckon APpatchcheckto GHA, either as is or equivalent lint checkspr.ymlhugovk commentedon Sep 15, 2023
Clarification on 1:
ci.ymlbe, change Windows testing inpr.ymlLet's remove Ubuntu unit tests from both
ci.ymlandpr.yml, because they're run on GHA.That leaves only
patchcheckinpr.yml(it's skipped inci.ymlbecause it only makes sense for PRs).Please see PR #109452.
pythongh-109408: Run `patchcheck` in GitHub Actions
gh-109408: Remove Ubuntu unit tests from Azure Pipelines (#109452)
pythongh-109408: Remove Ubuntu unit tests from Azure Pipelines (pytho…
[3.11] pythongh-109408: Remove Ubuntu unit tests from Azure Pipelines (…
[3.11] gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-1…
[3.12] gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-1…
gh-109408: Azure Pipelines: test 3.12 branch (#109453)
pythongh-109408: Azure Pipelines: test 3.12 branch (pythonGH-109453)
26 remaining items
[3.12] gh-109408: Revert pre-commit whitespace checks pending portabl…
GH-109408: Stop running patchcheck in CI (#109895)
gh-109408: Remove ``.azure-pipelines/pr.yml`` (#122643)
pythonGH-109408: Stop running patchcheck in CI (python#109895)
pythongh-109408: Remove ``.azure-pipelines/pr.yml`` (python#122643)
pythonGH-109408: Stop running patchcheck in CI (python#109895)
pythongh-109408: Remove ``.azure-pipelines/pr.yml`` (python#122643)
pythongh-109408: Move Windows builds from Azure Pipelines PR to GitHu…
pythongh-109408: Add the docs whitespace check from patchcheck to pre…
pythonGH-109408: Move the Python file whitespace check from patchchec…
pythonGH-109408: Move the C file whitespace check from patchcheck to …
pythongh-109408: Revert pre-commit whitespace checks pending portable…
hugovk commentedon Oct 3, 2024
Closing, this is essentially done now.
The remaining Azure Pipelines config is for testing after merge, and can stay to help test packaging the Windows installers.
We've moved all the pre-merge, PR-level stuff into GitHub Actions.
#122333 is still open, but isn't directly about moving AP stuff into GHA.