From aa4f8aebebe280359ba5d23f4d0bc838e92fe3ec Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Mon, 23 Feb 2026 09:27:43 +0300 Subject: [PATCH] github actions: use an x86 binary for building under qemu 3x faster than a target-specific binary. --- .github/workflows/linux-qemu.yml | 54 +++++++++++--------------------- src/code/float-trap.lisp | 9 ++++-- tests/ansi-tests.sh | 3 +- 3 files changed, 27 insertions(+), 39 deletions(-) diff --git a/.github/workflows/linux-qemu.yml b/.github/workflows/linux-qemu.yml index 27508b32b..1a8c17fcb 100644 --- a/.github/workflows/linux-qemu.yml +++ b/.github/workflows/linux-qemu.yml @@ -3,58 +3,42 @@ name: Linux qemu on: [push] jobs: - ppc64le: + build: runs-on: ubuntu-latest - name: ppc64le + strategy: + matrix: + arch: [ppc64le, riscv64] + fail-fast: false steps: - uses: actions/checkout@v4 - - run: echo "\"`git rev-parse HEAD`\"" > version.lisp-expr + - name: install host sbcl + run: | + echo "\"`git rev-parse HEAD`\"" > version.lisp-expr + cd tests; git clone --depth 1 https://github.com/sbcl/ansi-test.git + - uses: uraimo/run-on-arch-action@v3 name: Run commands id: runcmd with: arch: none distro: none - base_image: --platform=linux/ppc64le debian:trixie + base_image: --platform=linux/${{ matrix.arch }} debian:trixie githubToken: ${{ github.token }} install: | + dpkg --add-architecture amd64 apt-get -qq update | true - apt-get -qq install sbcl libzstd-dev build-essential + apt-get -qq install libzstd-dev build-essential curl libc6:amd64 + curl -O -L https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-2.4.8-x86-64-linux-binary.tar.bz2 + tar xf sbcl-2.4.8-x86-64-linux-binary.tar.bz2 + cd sbcl-2.4.8-x86-64-linux/ + ./install.sh + useradd -u 1001 -m dtest run: | export SBCL_MAKE_TARGET_2_OPTIONS="--disable-ldb --disable-debugger" export SBCL_MAKE_JOBS=-j4 ./make.sh --with-sb-core-compression --xc-host='sbcl --dynamic-space-size 700MB --lose-on-corruption --disable-ldb --disable-debugger' cd tests #./run-tests.sh --slow - # ./ansi-tests.sh - riscv64: - runs-on: ubuntu-latest - name: riscv64 - steps: - - uses: actions/checkout@v4 - - name: download sbcl - run: | - curl -O -L https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-riscv-261x.tar.gz - tar xf sbcl-riscv-261x.tar.gz - echo "\"`git rev-parse HEAD`\"" > version.lisp-expr - - uses: uraimo/run-on-arch-action@v3 - name: Run commands - id: runcmd - with: - arch: none - distro: none - base_image: --platform=linux/riscv64 debian:trixie + ./ansi-tests.sh - githubToken: ${{ github.token }} - install: | - apt-get -qq update | true - apt-get -qq install libzstd-dev build-essential - run: | - (cd sbcl; ./install.sh) - export SBCL_MAKE_TARGET_2_OPTIONS="--disable-ldb --disable-debugger" - export SBCL_MAKE_JOBS=-j4 - ./make.sh --with-sb-core-compression --xc-host='sbcl --dynamic-space-size 700MB --lose-on-corruption --disable-ldb --disable-debugger' - #cd tests - #./run-tests.sh --slow - # ./ansi-tests.sh diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp index 224f750d3..7ad01a37c 100644 --- a/src/code/float-trap.lisp +++ b/src/code/float-trap.lisp @@ -158,9 +158,12 @@ sets the floating point modes to their current values (and thus is a no-op)." ;;; disabled by default. Joe User can explicitly enable them if ;;; desired. (define-load-time-global *saved-floating-point-modes* - '(:traps (#-(and arm64 win32) :overflow - #-(or netbsd ppc (and arm64 win32)) :invalid - #-(and arm64 win32) :divide-by-zero) + '(:traps + #-riscv + (#-(and arm64 win32) :overflow + #-(or netbsd ppc (and arm64 win32)) :invalid + #-(and arm64 win32) :divide-by-zero) + #+riscv nil :rounding-mode :nearest :current-exceptions nil :accrued-exceptions nil :fast-mode nil #+x86 :precision #+x86 :53-bit)) diff --git a/tests/ansi-tests.sh b/tests/ansi-tests.sh index ccc06ab6d..fb8dc92ce 100755 --- a/tests/ansi-tests.sh +++ b/tests/ansi-tests.sh @@ -58,9 +58,10 @@ rm -fr sandbox/scratch "SUBSTITUTE.FOLD.1" "SUBSTITUTE-IF-NOT.FOLD.3" "MISC.598" "IMAGPART.4" (append #+x86 (list "CIS.4") - #+(or arm (and arm64 (not darwin))) + #+(or arm riscv (and arm64 (not darwin))) (list "EXP.ERROR.4" "EXP.ERROR.5" "EXP.ERROR.6" "EXP.ERROR.7" "EXPT.ERROR.4" "EXPT.ERROR.5" "EXPT.ERROR.6" "EXPT.ERROR.7") + #+(or riscv loongarch64) (list "LOOP.13.8") #-sb-unicode (list "MISC.638") (if (member :sb-fasteval sb-impl:+internal-features+) (list "INTERSECTION.FOLD.1" "UNION.FOLD.1" "SET-DIFFERENCE.FOLD.1"