diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41051853..0b2d94e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "pypy3.10"] + python-version: ["cp310", "cp311", "pp310"] os: ["ubuntu-latest", "macos-latest"] steps: - name: Checkout @@ -27,22 +27,31 @@ jobs: - name: Disable AppArmor run: sudo aa-disable /usr/sbin/slapd if: runner.os == 'Linux' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - name: Set up QEMU for multi-arch build + # Check https://github.com/docker/setup-qemu-action for newer versions. + uses: docker/setup-qemu-action@v2 + if: runner.os == 'Linux' with: - python-version: ${{ matrix.python-version }} - - name: "Install Python dependencies" - run: | - set -xe - python -V - python -m pip install --upgrade pip setuptools build - - name: "build python-ldap ${{ matrix.python-version }}" - run: "python -m build" + # Note: 6.2.0 is buggy: make sure to avoid it. + # See https://github.com/pypa/cibuildwheel/issues/1250 + image: tonistiigi/binfmt:qemu-v7.0.0 + - name: Build wheels + uses: pypa/cibuildwheel@v2.14.1 + env: + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 + CIBW_BUILD: ${{matrix.python-version}}-* + CIBW_SKIP: "*musllinux*" + CIBW_ARCHS_LINUX: x86_64 aarch64 + CIBW_ARCHS_MACOS: x86_64 arm64 universal2 + CIBW_BEFORE_ALL_LINUX: >- + yum -y groupinstall "Development tools" + && yum -y install openldap-devel python-devel - name: Upload a Build Artifact uses: actions/upload-artifact@v3 with: # A file, directory or wildcard pattern that describes what to upload - path: dist/*.whl + path: wheelhouse/*.whl release: name: "Release" needs: build @@ -56,4 +65,4 @@ jobs: with: tag_name: latest files: | - *.whl + artifact/*.whl