A warm wheel job still takes 8 to 14 minutes: pytest, uncached dependency setup and extension files, not the library compile
Statement#
In run 37744334163 (partly filled sccache), a macOS cp313 wheel job took 8.4 min. Its phases: about 0.6 min setup (checkout, Xcode, sccache action, CPM cache, cibuildwheel install), 3.5 min Building wheel (cmake configure of the dependency sub-builds Ragel, boost_headers and vectorscan took about 1.8 min before the main configure finished, then ninja 156 s for 1144 steps, 1312 of 1350 compiles were hits), 0.5 min delocate, 0.3 min test dependency install, and 2.6 min pytest (2086 passed). Linux x86 cp312 took 14 min: Building wheel 7.9 min (ninja 430 s for 1033 steps; hit rate unknown, no stats print there), repair 0.6 min, pytest 3.4 min (the dask tests alone about 90 s). Ragel is built from source with autotools and is not cached by sccache (28 s on one macOS runner, 36 s on Linux, 164 s on a slow macOS runner). The macOS cp38 job took 20 min: 14.4 min Building wheel with the same 1312 hits, a 164 s gap after Building Ragel, a 127 s gap before The C compiler identification, and 52 s to install Python 3.8, so macOS runner speed varies a lot. Across Python 3.8 and 3.12, 1215 of 1248 compile commands were identical (all 33 differing ones are the Python binding sources), so the cp312 objects serve the other versions.
Evidence#
Step and line timestamps of the job logs from gh api repos/<owner>/<repo>/actions/jobs/<id>/logs, and a comparison of compile_commands.json from two configures of the same tree with -DPython_EXECUTABLE set to Python 3.8 and 3.12 (build directory and the -o/-MF/-MT arguments removed). The Linux hit rate was not measured, because the sccache server ends with the cibuildwheel container.
Also found by searching
- why is the wheel build job still slow after enabling sccache
- where does the time go in a cibuildwheel job with a warm compiler cache
- Building Ragel 6.10 for Vectorscan takes minutes in the wheel build
- sccache hits across Python versions for the library but not the extension