mirror of https://github.com/Nonannet/copapy.git
ci: aarch64 build updated
This commit is contained in:
parent
7717b1aca5
commit
e5f6897ca9
|
|
@ -60,19 +60,19 @@ jobs:
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: python -m pip install -e .[dev]
|
run: python -m pip install -e .[dev]
|
||||||
|
|
||||||
- name: Install ARM binutils, qemu and gcc-multilib (32 bit support)
|
#- name: Install ARM binutils and qemu
|
||||||
if: strategy.job-index == 0
|
# if: strategy.job-index == 0
|
||||||
run: |
|
# run: |
|
||||||
echo "set man-db/auto-update false" | sudo debconf-communicate
|
# echo "set man-db/auto-update false" | sudo debconf-communicate
|
||||||
sudo dpkg-reconfigure man-db
|
# sudo dpkg-reconfigure man-db
|
||||||
sudo apt-get update
|
# sudo apt-get update
|
||||||
sudo apt-get install --no-install-recommends --no-install-suggests binutils-aarch64-linux-gnu qemu-user gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
# sudo apt-get install --no-install-recommends --no-install-suggests binutils-aarch64-linux-gnu qemu-user gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
||||||
|
|
||||||
- name: Compile coparun
|
- name: Compile coparun
|
||||||
run: |
|
run: |
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
gcc -O3 -DENABLE_BASIC_LOGGING -o bin/coparun src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c
|
gcc -O3 -DENABLE_BASIC_LOGGING -o bin/coparun src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c
|
||||||
aarch64-linux-gnu-gcc -O3 -static -DENABLE_BASIC_LOGGING src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c -o bin/coparun-aarch64
|
# aarch64-linux-gnu-gcc -O3 -static -DENABLE_BASIC_LOGGING src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c -o bin/coparun-aarch64
|
||||||
|
|
||||||
- name: Generate debug asm files
|
- name: Generate debug asm files
|
||||||
if: strategy.job-index == 0
|
if: strategy.job-index == 0
|
||||||
|
|
@ -83,7 +83,7 @@ jobs:
|
||||||
|
|
||||||
echo "- Patch code..."
|
echo "- Patch code..."
|
||||||
bin/coparun bin/test.copapy bin/test.copapy.bin
|
bin/coparun bin/test.copapy bin/test.copapy.bin
|
||||||
qemu-aarch64 bin/coparun-aarch64 bin/test-aarch64.copapy bin/test-aarch64.copapy.bin
|
#qemu-aarch64 bin/coparun-aarch64 bin/test-aarch64.copapy bin/test-aarch64.copapy.bin
|
||||||
|
|
||||||
objdump -D -b binary -m i386:x86-64 --adjust-vma=0x1000 bin/test.copapy.bin > bin/test.copapy.asm
|
objdump -D -b binary -m i386:x86-64 --adjust-vma=0x1000 bin/test.copapy.bin > bin/test.copapy.asm
|
||||||
echo '<p>test.copapy.asm</p>' >> $GITHUB_STEP_SUMMARY
|
echo '<p>test.copapy.asm</p>' >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
@ -97,9 +97,9 @@ jobs:
|
||||||
echo '<p>stencils_x86_64_O3.asm</p>' >> $GITHUB_STEP_SUMMARY
|
echo '<p>stencils_x86_64_O3.asm</p>' >> $GITHUB_STEP_SUMMARY
|
||||||
python tools/clean_asm.py bin/stencils_x86_64_O3.asm >> $GITHUB_STEP_SUMMARY
|
python tools/clean_asm.py bin/stencils_x86_64_O3.asm >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
aarch64-linux-gnu-objdump -d -x src/copapy/obj/stencils_arm64_O3.o > bin/stencils_arm64_O3.asm
|
#aarch64-linux-gnu-objdump -d -x src/copapy/obj/stencils_arm64_O3.o > bin/stencils_arm64_O3.asm
|
||||||
echo '<p>stencils_arm64_O3.asm</p>' >> $GITHUB_STEP_SUMMARY
|
#echo '<p>stencils_arm64_O3.asm</p>' >> $GITHUB_STEP_SUMMARY
|
||||||
python tools/clean_asm.py bin/stencils_arm64_O3.asm >> $GITHUB_STEP_SUMMARY
|
#python tools/clean_asm.py bin/stencils_arm64_O3.asm >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
- name: Run tests with pytest
|
- name: Run tests with pytest
|
||||||
run: pytest
|
run: pytest
|
||||||
|
|
@ -132,15 +132,18 @@ jobs:
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
- name: Use ARM64 container
|
- name: Use ARM64 container
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v $PWD:/app -w /app --platform linux/arm64 python:3.11-slim \
|
docker run --rm -v $PWD:/app -w /app --platform linux/arm64 ghcr.io/nonannet/arm64_test:1 \
|
||||||
bash -lc "apt-get update && \
|
bash -lc "pip install . && \
|
||||||
apt-get install -y build-essential && \
|
|
||||||
pip install setuptools wheel pytest && \
|
|
||||||
pip install . && \
|
|
||||||
mkdir -p bin && \
|
mkdir -p bin && \
|
||||||
gcc -O3 -DENABLE_LOGGING -o bin/coparun src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c && \
|
gcc -O3 -DENABLE_LOGGING -o bin/coparun src/coparun/runmem.c \
|
||||||
|
src/coparun/coparun.c src/coparun/mem_man.c && \
|
||||||
pytest"
|
pytest"
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: runner-linux-arm64
|
||||||
|
path: bin/*
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
needs: [build_stencils]
|
needs: [build_stencils]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
@ -196,7 +199,7 @@ jobs:
|
||||||
path: bin/*
|
path: bin/*
|
||||||
|
|
||||||
release-stencils:
|
release-stencils:
|
||||||
needs: [build_stencils, build-ubuntu, build-windows]
|
needs: [build_stencils, build-ubuntu, build-windows, build-arm64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
permissions:
|
permissions:
|
||||||
|
|
@ -227,7 +230,8 @@ jobs:
|
||||||
cp tmp/stencil-object-files/*.o release/
|
cp tmp/stencil-object-files/*.o release/
|
||||||
cp tmp/cross-runner/coparun-* release/
|
cp tmp/cross-runner/coparun-* release/
|
||||||
cp tmp/runner-linux/coparun release/
|
cp tmp/runner-linux/coparun release/
|
||||||
cp tmp/runner-win/coparun.exe release/
|
cp tmp/runner-linux-arm64/coparun release/
|
||||||
|
cp tmp/runner-win/coparun*.exe release/
|
||||||
|
|
||||||
TAG="${{ steps.version.outputs.version }}"
|
TAG="${{ steps.version.outputs.version }}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue