Skip to content

Run stdlib tests#1024

Draft
indygreg wants to merge 6 commits intomainfrom
gps-stdlib-tests
Draft

Run stdlib tests#1024
indygreg wants to merge 6 commits intomainfrom
gps-stdlib-tests

Conversation

@indygreg
Copy link
Collaborator

Still a draft. Assessing how much effort it is to run the stdlib test suite in CI.

@indygreg indygreg force-pushed the gps-stdlib-tests branch 30 times, most recently from 3776823 to 104fa00 Compare March 23, 2026 07:40
@indygreg indygreg force-pushed the gps-stdlib-tests branch 19 times, most recently from cb4c182 to 96000ee Compare March 25, 2026 04:36
`actions/upload-artifact` uploads a zip archive and applies default
zlib compression level 6 to files by default.

The uploaded PBS distribution artifacts are already zstd compressed.
zlib compression will achieve nothing and waste CPU cycles on both
upload and download.

Disable compression on these artifacts.

I audited all uses of `actions/upload-artifact` and confirmed that
compression is disabled when appropriate (it was already disabled
on the container image artifacts, which are also zstd compressed).
A couple of tests appear to have race conditions on freethreaded builds
on machines with a sufficient number of CPU cores. (These feel like
CPython bugs, which I will report later.)

We disable these tests during PGO training as a workaround.
@indygreg indygreg force-pushed the gps-stdlib-tests branch 4 times, most recently from 154dafb to 7aaaaf2 Compare March 25, 2026 07:20
Default runners have 2 CPUs. We can achieve a nice speed-up
(but not quite linear) by leveraging runners with more CPUs.
Docker on aarch64 macOS will automagically virtualize x86-64 containers
if containers are spawned with `platform=linux/amd64`. Performance of
spawned containers is a bit slower than native, but not horrible. This
functionality means it is viable to develop Linux x86-64 from modern
Apple hardware.

This commit teaches the build system to support cross-compiling
Linux x86-64 from macOS aarch64.

Implementing this wasn't too difficult: we need to pass `platform` into
Docker's APIs for building and creating containers. We need to teach
code to resolve the effective host platform when this scenario is
detected. And we need to advertise support for cross-compiling in the
`targets.yml` file.

In case you are wondering, yes, a similar solution could be employed for
Linux too by using emulation. But this requires Docker be configured to
support emulation, which isn't common. Rosetta on macOS "just works" and
is therefore the lowest hanging fruit to implement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant