Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/scripts/package-arch-in-container.sh
Original file line number Diff line number Diff line change
@@ -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'
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/emc/rs274ngc/interp_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions tests/inifile/ini_api_c/initest.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <getopt.h>
#include <ctype.h>
#include <errno.h>
#include <inttypes.h>

#include <inifile.h>

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading