fix: windows build #75
This file contains hidden or 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 wheel on arm | |
| on: [push] | |
| env: | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_ARCHS: "auto64" | |
| CIBW_TEST_REQUIRES: pytest | |
| CIBW_TEST_COMMAND: "pytest {project}/tests" | |
| CIBW_TEST_SOURCES: "tests" | |
| CIBW_BEFORE_BUILD: | | |
| set -eux && \ | |
| pip install setuptools wheel cffi pycparser && \ | |
| curl -L -O https://github.com/libffi/libffi/archive/v3.4.6.tar.gz && \ | |
| tar zxf v3.4.6.tar.gz && cd libffi-3.4.6 && \ | |
| ((command -v apk && apk add libtool) || true) && \ | |
| ./autogen.sh && \ | |
| ./configure --without-gcc-arch --disable-docs --with-pic --enable-shared=no && \ | |
| make install && \ | |
| cd .. && \ | |
| rm -rf libffi-3.4.6 && \ | |
| python setup.py build_lib && \ | |
| python generate_cffi_definitions.py | |
| jobs: | |
| build_aarch64_wheels: | |
| name: Build wheels manylinux_aarch64 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: [312] | |
| include: | |
| - os: ubuntu-latest | |
| arch: aarch64 | |
| platform_id: manylinux_aarch64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Install requirements | |
| run: python -m pip install -r requirements.txt | |
| - name: Install libffi-dev | |
| run: sudo apt-get update && sudo apt-get install -y build-essential libssl-dev libffi-dev python3-dev cmake | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel | |
| - name: Build wheels | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| env: | |
| CIBW_ARCHS_LINUX: ${{matrix.arch}} | |
| CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: wheelhouse/*.whl | |
| upload_pypi: | |
| name: Upload to PyPI (prod) | |
| needs: [build_aarch64_wheels] | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@v1.5.0 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |