From f71666c850fe13f3164a324e314ce31a19d72f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pol=C3=A1=C4=8Dek?= Date: Sat, 30 Mar 2024 12:30:08 +0100 Subject: [PATCH] Add a manylinux-config.sh for armhf --- .github/workflows/linux-python.yml | 14 ++++++-------- conf/manylinux-config.sh | 8 ++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 conf/manylinux-config.sh diff --git a/.github/workflows/linux-python.yml b/.github/workflows/linux-python.yml index 023354c..ea6474d 100644 --- a/.github/workflows/linux-python.yml +++ b/.github/workflows/linux-python.yml @@ -23,30 +23,28 @@ jobs: strategy: matrix: # target: [x86_64, aarch64, armv7] - target: [x86_64] + target: [armv7] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.11' + - name: Setup QEMU + uses: docker/setup-qemu-action@v1 - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - args: --release --out dist --find-interpreter + args: --release --out dist --find-interpreter --skip-auditwheel sccache: 'false' # TODO: sccache is broken on 2_28 - before-script-linux: yum install -y dbus-devel libudev-devel pkgconfig protobuf-devel protobuf-compiler && yum -y clean all + docker-options: -e PKG_CONFIG_SYSROOT_DIR=/usr/armv7-unknown-linux-gnueabihf/armv7-unknown-linux-gnueabihf/sysroot/ -e PKG_CONFIG_DIR= -e PKG_CONFIG_ALLOW_CROSS=1 -e PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig -e CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc -e PYO3_CROSS_PYTHON_VERSION=3.11 + before-script-linux: "sh /home/runner/work/yaroc/yaroc/conf/manylinux-config.sh" manylinux: 2_28 - name: Test the wheel run: | pip install yaroc --find-links dist --force-reinstall pip install pytest pytest - - name: Lint with ruff - run: | - pip install ruff - ruff check . --select=E9,F63,F7,F82 --statistics - ruff check . --exit-zero --statistics - name: Upload wheels uses: actions/upload-artifact@v3 with: diff --git a/conf/manylinux-config.sh b/conf/manylinux-config.sh new file mode 100644 index 0000000..85e15bc --- /dev/null +++ b/conf/manylinux-config.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +cp /home/runner/work/yaroc/yaroc/conf/sources.list /etc/apt/sources.list +apt update +dpkg --add-architecture armhf + +apt install -y gcc-arm-linux-gnueabihf pkg-config python3 python3-pip python3-venv protobuf-compiler +apt install -y libudev-dev:armhf libdbus-1-dev:armhf