From 66eee7e63157c202682a6243c336d051174fd1a0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 22 Jan 2024 02:48:51 +0100 Subject: [PATCH] Build Linux platform wheels with `cibuildwheel` --- .github/workflows/ci-cd.yml | 48 +++++++++++++++++++++++++++++++++++++ pyproject.toml | 11 +++++++++ 2 files changed, 59 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index eabd91125..3eae973e4 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -605,6 +605,54 @@ jobs: || 'false' }} + build-bin-manylinux-tested-arches-cibuildwheel: + name: >- + [cibuildwheel] 📦 ${{ needs.pre-setup.outputs.git-tag }} + [mode: ${{ + fromJSON(needs.pre-setup.outputs.is-untagged-devel) + && 'nightly' || '' + }}${{ + fromJSON(needs.pre-setup.outputs.release-requested) + && 'release' || '' + }}${{ + ( + !fromJSON(needs.pre-setup.outputs.is-untagged-devel) + && !fromJSON(needs.pre-setup.outputs.release-requested) + ) && 'test' || '' + }}] manylinux + needs: + - build-src + - pre-setup # transitive, for accessing settings + strategy: + matrix: + os: + - ubuntu + uses: ./.github/workflows/reusable-cibuildwheel.yml + with: + os: ${{ matrix.os }} + wheel-tags-to-skip: >- + ${{ + !fromJSON(needs.pre-setup.outputs.release-requested) + && '*_i686 + *-macosx_universal2 + *-musllinux_* + *-win32 + *_arm64 + pp*' + || '' + }} + source-tarball-name: >- + ${{ needs.pre-setup.outputs.sdist-artifact-name }} + dists-artifact-name: >- + ${{ needs.pre-setup.outputs.dists-artifact-name }} + qemu: all + cython-tracing: >- # Cython line tracing for coverage collection + ${{ + fromJSON(needs.pre-setup.outputs.profiling-enabled) + && 'true' + || 'false' + }} + build-bin-manylinux-tested-arches: name: >- 📦 ${{ needs.pre-setup.outputs.git-tag }} diff --git a/pyproject.toml b/pyproject.toml index da2fada1a..8d3b1a054 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -162,6 +162,17 @@ PIP_NO_WARN_SCRIPT_LOCATION = "1" PRE_COMMIT_COLOR = "always" PY_COLORS = "1" +[tool.cibuildwheel.linux] +manylinux-aarch64-image = "ghcr.io/ansible/pylibssh-manylinux_2_28_aarch64:libssh-v0.9.6" +manylinux-ppc64le-image = "ghcr.io/ansible/pylibssh-manylinux_2_28_ppc64le:libssh-v0.9.6" +manylinux-s390x-image = "ghcr.io/ansible/pylibssh-manylinux_2_28_s390x:libssh-v0.9.6" +manylinux-x86_64-image = "ghcr.io/ansible/pylibssh-manylinux_2_28_x86_64:libssh-v0.9.6" + +[tool.cibuildwheel.linux.environment] +STATIC_DEPS_DIR = "$(cat .static-deps-path)" +LDFLAGS = "'-L${STATIC_DEPS_PREFIX}/lib64' '-L${STATIC_DEPS_PREFIX}/lib'" +LD_LIBRARY_PATH = "${STATIC_DEPS_PREFIX}/lib64:${STATIC_DEPS_PREFIX}/lib:${LD_LIBRARY_PATH}" + [tool.cibuildwheel.macos] before-build = [ "brew install libssh", # @0.9.4 # pinning the version does not work