Fix example #147
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-test-wheels-arm64 | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
arm64-build: | |
name: Build arm64 wheel | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: prepare snap7 archive | |
uses: ./.github/actions/prepare_snap7 | |
- name: Copy files | |
run: | | |
cp .github/build_scripts/aarch64-linux-gnu.mk snap7-full-1.4.2/build/unix/ | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
with: | |
output-dir: wheelhouse | |
env: | |
CIBW_ARCHS_LINUX: aarch64 | |
CIBW_BUILD: cp37-* | |
CIBW_ENVIRONMENT: "BUILD_WHEEL_WITH_EXTENSION=1" | |
CIBW_BEFORE_ALL_LINUX: cd snap7-full-1.4.2/build/unix/;make -f aarch64-linux-gnu.mk install | |
- name: Build pure python wheel | |
run: python3 setup.py bdist_wheel --plat-name=manylinux2014_aarch64 | |
- name: Repack wheel | |
run: bash .github/build_scripts/repack_wheel.sh wheelhouse dist wheelhouse/${{ runner.os }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse/*/*.whl | |
test-wheel: | |
name: Testing wheel | |
needs: arm64-build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- name: Run tests in docker:arm64v8 | |
run: | | |
docker run --rm --interactive -v $PWD/tests:/tests -v $PWD/setup.cfg:/setup.cfg -v $PWD/wheelhouse:/wheelhouse \ | |
"arm64v8/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF | |
python3 -m pip install pytest pytest-asyncio $(ls wheelhouse/${{ runner.os }}/*.whl) | |
python3 -m pytest tests/ -m server -m util -m client -m mainloop -m partner | |
EOF |