mirror of https://github.com/Nonannet/copapy.git
use image now
This commit is contained in:
parent
ef57c3e3f5
commit
d2d28366e5
|
|
@ -3,7 +3,7 @@ name: Build & Push Images
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
path: [.github/workflows, tools/build_container]
|
# path: [.github/workflows/build_images.yml, tools/build_container]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
||||||
|
|
@ -9,19 +9,11 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build_stencils:
|
build_stencils:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/nonannet/cross_compiler_unix:1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Build object files
|
||||||
run: bash tools/crosscompile.sh
|
run: bash tools/crosscompile.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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 -e
|
||||||
set -v
|
set -v
|
||||||
|
|
||||||
|
|
@ -22,40 +12,43 @@ mkdir -p $DEST
|
||||||
|
|
||||||
# Windows x86_64 (ARM64)
|
# Windows x86_64 (ARM64)
|
||||||
python tools/generate_stencils.py --abi ms $SRC
|
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
|
# Native x86_64
|
||||||
python tools/generate_stencils.py $SRC
|
python tools/generate_stencils.py $SRC
|
||||||
gcc-12 -$OPT -c $SRC -o $DEST/stencils_x86_64_$OPT.o
|
gcc-13 -$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
|
|
||||||
|
|
||||||
# Native i686
|
# Native i686
|
||||||
python tools/generate_stencils.py $SRC
|
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)
|
# 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)
|
# ARM64 macos (copy aarch64)
|
||||||
cp $DEST/stencils_aarch64_$OPT.o $DEST/stencils_arm64_$OPT.o
|
cp $DEST/stencils_aarch64_$OPT.o $DEST/stencils_arm64_$OPT.o
|
||||||
|
|
||||||
# ARMv7
|
# 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
|
||||||
# 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
|
||||||
# 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 (Big Endian)
|
||||||
mips-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_mips_$OPT.o
|
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
|
# 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
|
# RISCV 64 Bit
|
||||||
riscv64-linux-gnu-gcc-12 -$OPT -c $SRC -o $DEST/stencils_riscv64_$OPT.o
|
riscv64-linux-gnu-gcc-13 -$OPT -c $SRC -o $DEST/stencils_riscv64_$OPT.o
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue