* ci: improve Azure test reliability
Azure has intermittent failures, often the macOS framework-Python
`posix_spawn: Undefined error: 0` spawn race under load, plus transient
download flakiness. Address both:
- Retry integration tests via pytest-rerunfailures (already required):
add `--reruns=2 --reruns-delay=5` to the serial and non-serial runs so a
single transient flake self-heals instead of failing the whole job.
- Cap Azure at `--num-processes 3` to reduce concurrent process spawning
(the macOS runner was using 4 xdist workers), lowering the spawn-race
probability and peak resource pressure.
- Cache downloads across runs: relocate CIBW_CACHE_PATH to a stable path
and add a Cache@2 task (interpreter downloads + per-worker test pip
caches live under it), cutting the network-download flake surface.
- Bump the Azure host interpreter to 3.13.
Assisted-by: ClaudeCode:claude-opus-4.8
* ci: stabilize iOS tests, bound rerun cost
An iOS run on Azure (build 9043) hung for the full 40-min pytest timeout
on the second build config of test_ios_platforms, then reran twice
(reruns=2), blowing past the 180-min job cap with no useful signal. The
hang was a stuck simulator/xcodebuild on the second config, after the
first config had run.
- Shut down running simulators before each parametrized config via a
`clean_ios_simulators` fixture, so a simulator left booted/wedged by the
previous config isn't reused.
- Drop iOS reruns from 2 to 1. One retry still covers the documented
"fails the first time" simulator-boot flake, while halving the
worst-case retry cost (3x40=120min -> 2x40=80min) on a hang.
Assisted-by: ClaudeCode:claude-opus-4.8
* ci: don't limit num processes
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* ci: rerun OCI unit tests that pull from Docker Hub
test_local_image et al. occasionally fail on a transient Docker Hub
anonymous-pull blip ("unauthorized: authentication required") when
pulling debian:trixie-slim. The integration runs already self-heal via
pytest-rerunfailures, but the unit run had no reruns, so a single flake
failed the whole job. Mark the three network-dependent OCI tests
(test_local_image, test_enter_error, test_multiarch_image) flaky so they
retry instead of blanket-rerunning the suite.
Assisted-by: ClaudeCode:claude-opus-4.8
* Drop iOS clean step
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* ci: scope integration reruns to test_0_basic::test
Drop the blanket --reruns from the serial and non-serial integration
runs and instead mark test_0_basic.py::test as flaky, so only the known
flaky basic test is retried.
Assisted-by: ClaudeCode:claude-opus-4.8
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* fix: drop Cirrus CI (going away June 1, 2026)
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* Restore missing note
* Update CI services documentation for Cirrus CI
Removed official support for Cirrus CI due to end-of-life.
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
2026-04-10 13:08:09 -04:00
Henry Schreinerandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* tests: fully type the test suite
* chore: require more typing
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Python 3.14 for Android
* Simplify GitHub Actions workflows
* Update tests
* Allow running `patchelf` even when the environment's `bin` directory is not on the PATH
* Search in both the environment's bin directory and the PATH
* Use `sysconfig.get_path`
* Fix lint warning
* Added Python 3.14 preview for iOS
* Test all Python versions with iOS
* add cp314-ios to the build selector table
---------
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
* feat: support multiple commands on iOS
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Move split_command into a util module
* (unrelated) fix test docstring
* Implement short-circuit behaviour on test-command
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Skip Cirrus CI iOS testing
* Remove support tick in readme
* Debugging cirrus windows failure
* Use a separate file to avoid error messages from vsdevcmd getting into the output
* cirrus: TEMP target just the test i care about
* Revert "cirrus: TEMP target just the test i care about"
This reverts commit 7ed4417970930ab9e0e1cb1f17497d406310d6ff.
* Remove debug code
* Fix windows issues with multiline -c Python commands
* Revert to running tests from from a temp dir when test-sources is unset
* Fix placeholders error message, add test for it
* Add back {project} placeholders to CIBW_TEST_COMMAND in tests & docs
* Update test/test_before_test.py
---------
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Change to the iOS testing option semantics
Don't assume the presence of `python -m` in the test command. Less magic
and allows more option reuse between platforms.
* Update schema
* Add a test for this warning
* Don't try to execute a test-command when it doesn't look like a module
* Update docs/options.md
Co-authored-by: Malcolm Smith <smith@chaquo.com>
* Only allow invalid test command if the first part is 'pytest'
* Responses to code review from @freakboy3742
* Fixes post-merge
---------
Co-authored-by: Malcolm Smith <smith@chaquo.com>
* Improve integration test options
- Keep the platform and enable options in os.environ, don't duplicate state in utils
- Provide more user-friendly options for setting enable and platform in integration tests
* Ensure that CIBW_ENABLE is set in the test process
* Use get_enable_groups() where necessary
* Add the ability to declare safe tools in a cross-build environment.
* Add an xfail if cmake isn't available on the test machine.
* Placate linter regarding positional args.
* Rework test to provide more robust confirmation of safe tools.
* Remove a test skip condition that is no longer needed.
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Rename the setting to xbuild-tools.
* Add docs to clarify that xbuild-tools is transitive.
* Raise a warning if xbuild-tools isn't defined.
* Correct a bad copy-paste in the schema generator.
* .. and now fix the indentation.
* Move sentinel handling earlier into the parsing process.
* Remove serialization from tests that won't start a test suite.
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Add support for building iOS wheels.
* Replace use of system() in test binary module.
* Restored the 'minimal' approach of the minimal examples.
* Split out platform details into standalone pages, and expand iOS platform details.
* More doc corrections.
* Bump support package to include fix for python/cpython#130292
* Ensure iOS tests are all run on the same xdist worker.
* More iOS documentation tweaks.
* Factor out common xcode version test utility.
* Simplify iOS to a single platform with an expanded interpretation of arch.
* I guess I should update the iOS tests as well...
* Additional safety for missing iOS test output.
* Remove DYLD_LIBRARY_PATH from the iOS environment.
* Make test-sources mandatory for iOS builds.
* Updates and clarifications to documentation.
* Clarify what a slice is.
* Normalize use of underscores in platform name.
* Modify auto target to be matching CPU only.
* Use consistent ordering of platforms in examples.
* Use consistent naming in iOS archiectures.
* Placate the linter.
* Miscellaneous cleanups picked up by @joerick's review.
* Correct the list of expected wheels.
* Correct which 'native' we're actually checking.
* Correct the docs links so they're all relative.
* Correct the identification of free threaded builds.
* Use target instead of host to describe the platform we're building for.
* Rework iOS test to remove issue with log completeness.
* Convert errors to FatalError
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Removed a repeated check for a valid python.
* Update bin/update_pythons.py to update iOS support packages.
* Document that iOS CI is available on other platforms.
* Restore a comment needed for some platforms.
* Small cleanups identified in code review
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Simplify logic to appease linter.
* Modify dependency constraint handling to use new API.
* Cosmetic change to trigger a CI rebuild.
---------
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>