CI: add a 32-bit test job (armv7, emulated) - #10211
Merged
Merged
Conversation
All our other CI machines are 64-bit, so nothing exercises borg where a pointer, size_t, Py_ssize_t and off_t are 32 bits wide. armv7 is the 32-bit platform borg users still run (Raspberry Pi OS 32-bit, NAS / router / embedded boxes); it additionally does not tolerate unaligned accesses everywhere and has an unsigned plain "char", so it exercises C portability, too. Modelled on the big-endian s390x job: debian trixie (python 3.13, and its OpenSSL 3.5 satisfies our OpenSSL >= 3.2 requirement - bookworm's 3.0 would not) under qemu user-mode emulation, the same trigger policy (native/format relevant paths, weekly, manual), the word size sensitive tests, and a cross-architecture interoperability test - a repository written on the emulated 32-bit machine is read (and written to) by the 64-bit runner and the other way round, requiring identical chunk IDs on both sides. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10211 +/- ##
==========================================
+ Coverage 87.20% 87.25% +0.05%
==========================================
Files 102 102
Lines 18394 18430 +36
Branches 2829 2832 +3
==========================================
+ Hits 16040 16082 +42
+ Misses 1644 1642 -2
+ Partials 710 706 -4 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have big-endian coverage (s390x) now, but no 32-bit platform: all our other CI
machines are 64-bit, so nothing exercises borg where a pointer,
size_t,Py_ssize_tandoff_tare 32 bits wide.Why armv7: 32-bit x86 desktops are basically gone, but 32-bit ARM is not — it
is what borg users on Raspberry Pi OS 32-bit and on quite some NAS / router /
embedded boxes run. It also has two properties x86 does not have: it does not
tolerate unaligned memory accesses everywhere, and plain
charis unsigned onARM (signed on x86) — a classic C portability trap. GitHub's arm64 runners cannot
execute 32-bit ARM code natively, so this is emulated (qemu user-mode) regardless.
Why trixie: borg needs OpenSSL >= 3.2, so debian bookworm and its OpenSSL 3.0
are out. trixie has OpenSSL 3.5.6 and python 3.13 for armhf.
The job is modelled on
bigendian.ymland has the same trigger policy: native /format relevant paths on PRs, weekly (Wednesdays, one hour after the s390x job so
the two emulated jobs do not start at the same time), plus
workflow_dispatch.It runs the word size sensitive tests (chunkers, crypto, compress, hashindex,
item, repoobj, repository, archive, cache, digests, msgpack, time) and then the
cross-architecture interoperability test: a repository written on the emulated
32-bit machine is checked, extracted and written to by the 64-bit runner and the
other way round, and both sides must produce identical chunk IDs.
scripts/endian_interop_test.pyis reused unchanged (its labels are just namesfor the two sides); only its docstring mentions the second use now.
Note on runtime: armv7l has fewer wheels on PyPI than s390x — only blake3 ships
one, so PyYAML, msgpack and backports-zstd (which vendors the whole zstd library)
are compiled under emulation. The
.pip-cache-armv7cache keeps that to thefirst run and to dependency bumps.
Not tested beyond YAML validity and the pytest target list — the first run on
GitHub will show the real emulated runtime.