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. |
| with path.open("rb") as f: | ||
| return json.load(f) |
There was a problem hiding this comment.
nit
| with path.open("rb") as f: | |
| return json.load(f) | |
| json.load(path.read_bytes("rb")) |
| continue | ||
|
|
||
| for file in filenames: | ||
| if relative_dirpath.is_relative_to("usr/include") and file == "pyconfig.h": |
There was a problem hiding this comment.
I think it might be cleaner to move checks like relative_dirpath.is_relative_to("usr/include") into vars outside this nested loop so they aren't recomputed.
| # some tests write to srcdir, lack of pyc files slows down testing | ||
| run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw | ||
| - name: Tests | ||
| if: ${{ inputs.test }} |
There was a problem hiding this comment.
nit: mustache is redundant in if-keys.
| if: ${{ inputs.test }} | |
| if: inputs.test |
| CPYTHON_TEST_ABI3T=1 CPYTHON_TEST_EXT_NAME=abi3t_mod \ | ||
| build/install/usr/bin/python3 -m pip install ../cpython-ro-srcdir/Lib/test/test_cext | ||
| # Until https://github.com/pypa/setuptools/pull/5193 is released | ||
| if [ ${{ fromJSON(inputs.free-threading) && '1' || '0' }} = '0' ]; then \ |
There was a problem hiding this comment.
Pretty sure Zizmor will be unhappy w/ the mix of GHA rendering and bash.. Plz move this into a step.
| CPYTHON_TEST_EXT_NAME=c_mod \ | ||
| build/install/usr/bin/python3 -m pip install ../cpython-ro-srcdir/Lib/test/test_cext | ||
| CPYTHON_TEST_LIMITED=1 CPYTHON_TEST_EXT_NAME=abi3_mod \ | ||
| build/install/usr/bin/python3 -m pip install ../cpython-ro-srcdir/Lib/test/test_cext | ||
| CPYTHON_TEST_ABI3T=1 CPYTHON_TEST_EXT_NAME=abi3t_mod \ | ||
| build/install/usr/bin/python3 -m pip install ../cpython-ro-srcdir/Lib/test/test_cext |
There was a problem hiding this comment.
Can we have separate steps for these plz? They'd be easier to deal with and visually distinct.
| - name: Generate the install hashes filename | ||
| if: ${{ inputs.upload-install-hashes }} | ||
| run: | | ||
| echo "INSTALL_HASHES_FILE=install-hashes-${{ runner.arch }}-${{ case(inputs.free-threading, 't', '')}}${{ case(inputs.debug, 'd', '') }}" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
Plz move the GHA-level rendering into an env: — https://docs.zizmor.sh/audits/#template-injection
| test-hypothesis, | ||
| build-asan, | ||
| build-san, | ||
| cross-build-linux, |
There was a problem hiding this comment.
| cross-build-linux, | |
| linux-install-compare, |
Do you mean the debug option?
Seems like having another matrix will add 15–16 minutes of CI runtime. |
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 reuse
reusable-ubuntuto perform an extra set of build+install+hash runs without running the Python test suite. We do not do this in the main test suite execution, as achieving multi-arch co-installability requires some non-default configure parameters. But we could share builds, if desired for performance.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