gh-122931 CI for Linux multiarch co-installability - #152831
Conversation
a347830 to
3a52cb5
Compare
3a52cb5 to
b84e719
Compare
Duh. Let me store hash manifests instead of storing the installs. |
Do you mean the debug option?
Seems like having another matrix will add 15–16 minutes of CI runtime. |
We are trying to install into a prefix, any absolute path would not necessarily be writeable. e.g. if Python is configured with --libdir=/usr/lib/$(MULTIARCH)/ during a Debian build.
I meant a multiarch libdir and
|
It's part of the main test matrix, now. |
| if internal: | ||
| cflags.append('-DTEST_INTERNAL_C_API=1') | ||
|
|
||
| py_limited_api = limited or abi3t |
There was a problem hiding this comment.
This looks unrelated to the purpose of this PR, but is a correctness fix, so 👍🏼
There was a problem hiding this comment.
It was necessary to tell setuptools to produce abi3/abi3t filenames.
| description: OS to run the job | ||
| required: true | ||
| type: string |
There was a problem hiding this comment.
This is unrelated but is probably fine provided it's backported into the older branches.
There was a problem hiding this comment.
Yeah, let's split this and the other unindent into another PR so we can more cleanly backport this, along with the other changes like:
- if: ${{ fromJSON(inputs.bolt-optimizations) }}
+ if: fromJSON(inputs.bolt-optimizations)Which could maybe be just?
- if: ${{ fromJSON(inputs.bolt-optimizations) }}
+ if: inputs.bolt-optimizations|
Looks like tiny timestamp differences are still happening here and there: - 'date_time': (2026, 7, 29, 12, 1, 52),
? ^
+ 'date_time': (2026, 7, 29, 12, 1, 53),
? ^(https://github.com/python/cpython/actions/runs/30450012974/job/90569653484?pr=152831#step:20:9330) |
| sudo apt-get install --no-install-recommends bolt-21 | ||
| echo PATH="$(llvm-config-21 --bindir):$PATH" >> $GITHUB_ENV | ||
| - name: Use the commit timestamp for timestamps the install | ||
| run: echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" >> $GITHUB_ENV |
There was a problem hiding this comment.
Ideally, I'd put this as early as possible, right after the actions/checkout step since it's rather coupled.
There was a problem hiding this comment.
Actually, that's causing the test failures that you mentioned earlier, so I'm going to move it later, after the tests.
| "$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed | ||
|
|
||
| linux-install-compare: | ||
| name: Ubuntu Co-install comparison |
There was a problem hiding this comment.
| name: Ubuntu Co-install comparison | |
| name: Ubuntu co-install comparison |
| @@ -0,0 +1,3 @@ | |||
| CI Tests to ensure Debian `multi-arch co-installability | |||
| <https://www.debian.org/doc/debian-policy/ch-controlfields.html#multi-arch>`_ | |||
There was a problem hiding this comment.
Prefer anonymous Sphinx links, if we don't need to create a reference.
| <https://www.debian.org/doc/debian-policy/ch-controlfields.html#multi-arch>`_ | |
| <https://www.debian.org/doc/debian-policy/ch-controlfields.html#multi-arch>`__ |
| debug: | ||
| description: Whether to create a Debug Build | ||
| required: false | ||
| type: boolean | ||
| default: true |
There was a problem hiding this comment.
We don't need a variable for this because we're not varying it:
| debug: | |
| description: Whether to create a Debug Build | |
| required: false | |
| type: boolean | |
| default: true |
| @@ -84,14 +102,15 @@ jobs: | |||
| PROFILE_TASK='-m test --pgo --ignore test_unpickle_module_race' | |||
| ../cpython-ro-srcdir/configure | |||
| --config-cache | |||
There was a problem hiding this comment.
Re-instate:
| --config-cache | |
| --config-cache | |
| --with-pydebug |
| --enable-slower-safety | ||
| --enable-safety | ||
| --with-openssl="$OPENSSL_DIR" | ||
| ${{ fromJSON(inputs.debug) && '--with-pydebug' || '' }} |
There was a problem hiding this comment.
Drop:
| ${{ fromJSON(inputs.debug) && '--with-pydebug' || '' }} |
| from typing import Any | ||
| from pathlib import Path |
There was a problem hiding this comment.
| from typing import Any | |
| from pathlib import Path | |
| from pathlib import Path | |
| from typing import Any |
| from argparse import ArgumentParser | ||
| from hashlib import file_digest | ||
| from pathlib import Path | ||
| from typing import Any, cast | ||
| import gzip | ||
| import json |
There was a problem hiding this comment.
| from argparse import ArgumentParser | |
| from hashlib import file_digest | |
| from pathlib import Path | |
| from typing import Any, cast | |
| import gzip | |
| import json | |
| import gzip | |
| import json | |
| from argparse import ArgumentParser | |
| from hashlib import file_digest | |
| from pathlib import Path | |
| from typing import Any, cast |
|
|
||
|
|
||
| def main() -> None: | ||
| p = ArgumentParser("Hash a python install for comparison later") |
There was a problem hiding this comment.
| p = ArgumentParser("Hash a python install for comparison later") | |
| p = ArgumentParser("Hash a Python install for comparison later") |
| p.add_argument( | ||
| "-o", | ||
| "--output", | ||
| type=Path, | ||
| help="Output file (gzipped)", | ||
| ) |
There was a problem hiding this comment.
This has no default: either make it required=True, make positional, or add a default. And let's list this after destdir.
| for platform, tagsets in tags_seen_by_platform.items(): | ||
| if len(tagsets) >= 2: | ||
| break |
There was a problem hiding this comment.
platform never used:
| for platform, tagsets in tags_seen_by_platform.items(): | |
| if len(tagsets) >= 2: | |
| break | |
| for tagsets in tags_seen_by_platform.values(): | |
| if len(tagsets) >= 2: | |
| break |
As suggested in this thread, add some CI tooling to ensure that Python continues to be multi-arch co-installable.
Explicitly skip checking
abi3.soandabi3t.soextensions, as they are currently not co-installable (#122931).We extend
reusable-ubuntuto perform an extra set of build+install+hash runs. This required some slightly different configure options to get more co-install-friendly builds. Those configure options broke some existing tests, but the fixes are trivial, and included.From an earlier implementation that didn't use hash-manifests:
Example failure (without
abi3andabi3tignored): https://github.com/stefanor/cpython/actions/runs/28550736484/job/84647793000Example success (with them ignored): https://github.com/stefanor/cpython/actions/runs/28551134448/job/84648971317