Skip to content

Commit

Permalink
Add a manylinux-config.sh for armhf
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed Mar 30, 2024
1 parent f5fad9a commit f71666c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/linux-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions conf/manylinux-config.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f71666c

Please sign in to comment.