Skip to content

CI: build and test 32-bit Debian packages (i386, armhf) - #4682

Open
grandixximo wants to merge 3 commits into
LinuxCNC:masterfrom
grandixximo:ci-32bit
Open

grandixximo wants to merge 3 commits into
LinuxCNC:masterfrom
grandixximo:ci-32bit

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Adds a package-arch-32bit job building and testing the Debian packages on i386 and armhf (Debian trixie), as asked in #4614.

  • Same steps as package-arch (build, install, run tests), in .github/scripts/package-arch-in-container.sh.
  • The images are started with docker run --platform: the container: key cannot be used because the runner injects its own 64-bit node into the container.
  • i386 runs natively on the x86_64 runner. armhf runs natively on the arm64 runner (AArch32 userland on an aarch64 kernel), with a QEMU fallback if a runner ever lacks AArch32.
  • About 20 minutes per job with serial tests. When runtests: Add parallel mode (CI tests) #4665 lands, the job just needs -j $RUNTEST_JOBS and the bwrap docker options; I tested that combination too and it takes about 10 minutes.

The first run found two 32-bit bugs, fixed here:

  • tests/inifile/ini_api_c: printed rtapi_s64/rtapi_u64 with %ld/%lu, which does not compile with -Werror on ILP32.
  • G76 cut a duplicate full-depth pass on i386 (tests/interp/g76-d-word): with x87 math the pass depth stays in 80-bit precision just below end_depth. The loop now stops TINY short of it; the final full-depth pass covers it.

Both arches pass 333/333 in my fork.

ini_api_c printed rtapi_s64/rtapi_u64 with %ld/%lu, which only matches
on LP64. On i386 and armhf the test failed to compile with -Werror.
The pass loop compared the freshly computed depth against end_depth.
With x87 math (Debian i386) the depth stays in an 80-bit register and
can sit just below an end_depth it equals once rounded to double, so
the loop cut one more pass at full depth before the final full-depth
pass. Seen in tests/interp/g76-d-word (i-.05 j.01 k.02): the second
pass lands exactly on end_depth.

Stop the loop TINY short of end_depth; the final pass covers it.
32-bit support stays (BeagleBone and similar armhf boards), but nothing
in CI builds for an ILP32 target, so breakage like the libnml long vs
int64_t overload errors fixed in LinuxCNC#4614 goes unnoticed until someone
builds on such a machine.

Add a package-arch-32bit job that runs the same steps as package-arch
(build the arch Debian packages, install them, run the test suite) in a
Debian trixie container for i386 and armhf. The GitHub "container:" key
cannot be used for these images because the runner injects its own
64-bit node into the container to run actions, so the job checks out on
the host and starts the container with "docker run --platform".

i386 runs natively on the x86_64 runner. armhf runs on the arm64 runner,
natively if the CPU can execute AArch32, otherwise through QEMU.
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