From d2d28366e59070b0a2e2acbe57d30cd486d22f94 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Wed, 8 Oct 2025 23:21:51 +0200 Subject: [PATCH] use image now --- .github/workflows/build_images.yml | 2 +- .github/workflows/build_wheels.yml | 12 ++------- tools/crosscompile.sh | 43 +++++++++++++----------------- 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index f582fb0..ac8b4da 100644 --- a/.github/workflows/build_images.yml +++ b/.github/workflows/build_images.yml @@ -3,7 +3,7 @@ name: Build & Push Images on: push: branches: [main] - path: [.github/workflows, tools/build_container] + # path: [.github/workflows/build_images.yml, tools/build_container] workflow_dispatch: permissions: diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index a9a91e4..d57f456 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -9,19 +9,11 @@ on: jobs: build_stencils: runs-on: ubuntu-latest + container: + image: ghcr.io/nonannet/cross_compiler_unix:1 steps: - uses: actions/checkout@v4 - - name: Install cross compilers - run: | - sudo apt-get update - sudo apt-get install -y \ - gcc-12-aarch64-linux-gnu \ - gcc-12-arm-linux-gnueabihf \ - gcc-12-mips-linux-gnu \ - gcc-12-riscv64-linux-gnu \ - gcc-12-multilib - - name: Build object files run: bash tools/crosscompile.sh diff --git a/tools/crosscompile.sh b/tools/crosscompile.sh index 8ace41d..eb3cf24 100644 --- a/tools/crosscompile.sh +++ b/tools/crosscompile.sh @@ -1,15 +1,5 @@ #!/bin/bash -#Setup: -#sudo apt-get update -#sudo apt-get install -y \ -#gcc-12-aarch64-linux-gnu \ -#gcc-12-arm-linux-gnueabihf \ -#gcc-12-powerpc64le-linux-gnu \ -#gcc-12-s390x-linux-gnu \ -#gcc-12-mips-linux-gnu \ -#gcc-12-riscv64-linux-gnu - set -e set -v @@ -22,40 +12,43 @@ mkdir -p $DEST # Windows x86_64 (ARM64) python tools/generate_stencils.py --abi ms $SRC -gcc-12 -$OPT -c $SRC -o $DEST/stencils_AMD64_$OPT.o +gcc-13 -$OPT -c $SRC -o $DEST/stencils_AMD64_$OPT.o + +# Windows x86 +gcc-13 -m32 -$OPT -c $SRC -o $DEST/stencils_x86_$OPT.o + # Native x86_64 python tools/generate_stencils.py $SRC -gcc-12 -$OPT -c $SRC -o $DEST/stencils_x86_64_$OPT.o - -# Windows x86 -python tools/generate_stencils.py --abi ms $SRC -gcc-12 -m32 -$OPT -c $SRC -o $DEST/stencils_x86_$OPT.o +gcc-13 -$OPT -c $SRC -o $DEST/stencils_x86_64_$OPT.o # Native i686 python tools/generate_stencils.py $SRC -gcc-12 -m32 -$OPT -c $SRC -o $DEST/stencils_i686_$OPT.o +gcc-13 -m32 -$OPT -c $SRC -o $DEST/stencils_i686_$OPT.o # ARM64 linux (aarch64) -aarch64-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_aarch64_$OPT.o +aarch64-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_aarch64_$OPT.o # ARM64 macos (copy aarch64) cp $DEST/stencils_aarch64_$OPT.o $DEST/stencils_arm64_$OPT.o # ARMv7 -arm-linux-gnueabihf-gcc-12 -$OPT -c $SRC -o $DEST/stencils_armv7_$OPT.o +arm-linux-gnueabihf-gcc-13 -$OPT -c $SRC -o $DEST/stencils_armv7_$OPT.o # PowerPC64LE -# powerpc64le-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_ppc64le_$OPT.o +# powerpc64le-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_ppc64le_$OPT.o # S390x -# s390x-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_s390x_$OPT.o +# s390x-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_s390x_$OPT.o -# Mips -mips-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_mips_$OPT.o +# Mips (Big Endian) +mips-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_mips_$OPT.o + +# Mips (Little Endian) +mipsel-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_mips_$OPT.o # RISCV 32 Bit -riscv64-linux-gnu-gcc-12 -$OPT -march=rv32imac -mabi=ilp32 -c $SRC -o $DEST/stencils_riscv32_$OPT.o +riscv64-linux-gnu-gcc-13 -$OPT -march=rv32imac -mabi=ilp32 -c $SRC -o $DEST/stencils_riscv32_$OPT.o # RISCV 64 Bit -riscv64-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_riscv64_$OPT.o \ No newline at end of file +riscv64-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_riscv64_$OPT.o