diff --git a/.github/scripts/package-arch-in-container.sh b/.github/scripts/package-arch-in-container.sh new file mode 100755 index 00000000000..304b4474533 --- /dev/null +++ b/.github/scripts/package-arch-in-container.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -eu #Needed so CI fails when anything is wrong +set -x + +# Build and test the architecture-specific Debian packages inside a plain +# Debian container started with "docker run", for architectures where the +# GitHub "container:" job key cannot be used (the runner injects its own +# 64-bit node into the container to run actions). +# Same steps as the package-arch job, run from the repository root. + +echo "Kernel: $(uname -m), userland: $(dpkg --print-architecture), CPUs: $(nproc)" + +apt-get -q update +apt-get --yes upgrade +# Install stuff needed to turn the repo into a debian source package and run tests. +apt-get --yes --no-install-recommends install curl git lsb-release python3 devscripts sudo adduser xauth + +git config --global --add safe.directory "${PWD}" + +DEBEMAIL=emc-developers@lists.sourceforge.net \ +DEBFULLNAME="LinuxCNC Github CI Robot" \ + .github/scripts/build-package-arch.sh + +.github/scripts/verify-clean-repo.sh ':(exclude)VERSION' ':(exclude)debian/changelog' + +apt-get --yes --no-install-recommends install ../*.deb + +adduser --disabled-password --gecos "" testrunner +passwd -d testrunner +adduser testrunner sudo +find tests/ -type d -exec chmod 0777 {} + # make test dirs world-writable for the testrunner +su -c "./scripts/runtests -p -d ./tests" testrunner + +.github/scripts/verify-clean-repo.sh ':(exclude)VERSION' ':(exclude)debian/changelog' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f943a1152a9..597d17646bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -393,6 +393,58 @@ jobs: path: artifacts/${{ steps.meta.outputs.dist }}/${{ steps.meta.outputs.arch }} if-no-files-found: error + package-arch-32bit: + runs-on: ${{ matrix.runner }} + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + include: + - arch: i386 + platform: linux/386 + runner: ubuntu-24.04 + - arch: armhf + platform: linux/arm/v7 + runner: ubuntu-24.04-arm + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo Number of CPUs: $(nproc) + echo "$GITHUB_CONTEXT" + - name: Checkout repository + uses: actions/checkout@v6 + with: + submodules: false + # "fetch-depth: 0" fetches all of history, this is needed by + # our build system to determine the version from tags + fetch-depth: 0 + - name: Check for native 32-bit execution + id: native + run: | + set -x + if docker run --rm --platform ${{ matrix.platform }} debian:trixie true; then + echo "native=true" >> $GITHUB_OUTPUT + else + echo "native=false" >> $GITHUB_OUTPUT + fi + - name: Set up QEMU + if: steps.native.outputs.native != 'true' + uses: docker/setup-qemu-action@v3 + with: + platforms: ${{ matrix.platform }} + - name: Build and test ${{ matrix.arch }} Debian packages + run: | + set -x + # IPC_OWNER is needed for shmget IPC_CREAT + # SYS_ADMIN is needed for shmctl IPC_SET + docker run --rm --platform ${{ matrix.platform }} \ + --cap-add=IPC_OWNER --cap-add=SYS_ADMIN \ + -e DEBIAN_FRONTEND \ + -v "$PWD:/build/linuxcnc" -w /build/linuxcnc \ + debian:trixie .github/scripts/package-arch-in-container.sh + package-indep: runs-on: ubuntu-24.04 timeout-minutes: 75 diff --git a/src/emc/rs274ngc/interp_convert.cc b/src/emc/rs274ngc/interp_convert.cc index 6a4e77b8c71..76a4f7b90ab 100644 --- a/src/emc/rs274ngc/interp_convert.cc +++ b/src/emc/rs274ngc/interp_convert.cc @@ -6086,7 +6086,9 @@ int Interp::convert_threading_cycle(block_pointer block, depth = start_depth; zoff = (depth - full_dia_depth) * tan(compound_angle); - while (depth < end_depth) { + // TINY: with x87 math (i386) depth can be held in extended precision just + // below an end_depth it equals as a double, adding a duplicate full-depth pass + while (depth < end_depth - TINY) { threading_pass(settings, block, boring, safe_x, depth, end_depth, start_y, start_z, zoff, taper_dist, entry_taper, exit_taper, taper_pitch, pitch, full_threadheight, target_z, angle_offset); diff --git a/tests/inifile/ini_api_c/initest.c b/tests/inifile/ini_api_c/initest.c index d71f5a3e213..f2996c30d8c 100644 --- a/tests/inifile/ini_api_c/initest.c +++ b/tests/inifile/ini_api_c/initest.c @@ -3,6 +3,7 @@ #include #include #include +#include #include @@ -94,7 +95,7 @@ int main(int argc, char *argv[]) case 'i': rv = iniFindSInt(argv[optind], var, sec, &i); if(!rv) { - printf("%ld\n", i); + printf("%" PRId64 "\n", i); } else { myerror("iniFindSInt", rv); return -rv; @@ -103,7 +104,7 @@ int main(int argc, char *argv[]) case 'u': rv = iniFindUInt(argv[optind], var, sec, &u); if(!rv) { - printf("%lu\n", u); + printf("%" PRIu64 "\n", u); } else { myerror("iniFindUInt", rv); return -rv;