diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0cee081ab..af268acdb 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -661,6 +661,93 @@ 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-latest + wheel-tags-to-skip: + - >- + ${{ + !fromJSON(needs.pre-setup.outputs.release-requested) + && '*_i686 + *-macosx_universal2 + *-musllinux_* + *-win32 + *_arm64 + *-*linux_{aarch64,ppc64le,s390x} + pp*' + || '' + }} + - >- + ${{ + !fromJSON(needs.pre-setup.outputs.release-requested) + && '*_i686 + *-macosx_universal2 + *-musllinux_* + *-win32 + *_arm64 + *-*linux_{x86_64,ppc64le,s390x} + pp*' + || '' + }} + - >- + ${{ + !fromJSON(needs.pre-setup.outputs.release-requested) + && '*_i686 + *-macosx_universal2 + *-musllinux_* + *-win32 + *_arm64 + *-*linux_{x86_64,aarch64,s390x} + pp*' + || '' + }} + - >- + ${{ + !fromJSON(needs.pre-setup.outputs.release-requested) + && '*_i686 + *-macosx_universal2 + *-musllinux_* + *-win32 + *_arm64 + *-*linux_{x86_64,aarch64,ppc64le} + pp*' + || '' + }} + uses: ./.github/workflows/reusable-cibuildwheel.yml + with: + os: ${{ matrix.os }} + wheel-tags-to-skip: ${{ matrix.wheel-tags-to-skip }} + 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/.github/workflows/reusable-cibuildwheel.yml b/.github/workflows/reusable-cibuildwheel.yml index f40629ab9..27bb0d99b 100644 --- a/.github/workflows/reusable-cibuildwheel.yml +++ b/.github/workflows/reusable-cibuildwheel.yml @@ -66,11 +66,11 @@ jobs: echo "CIBW_ARCHS_LINUX=${{ inputs.qemu }}" >> "${GITHUB_ENV}" shell: bash - # - name: Skip building some wheel tags - # if: inputs.wheel-tags-to-skip - # run: | - # echo "CIBW_SKIP=${{ inputs.wheel-tags-to-skip }}" >> "${GITHUB_ENV}" - # shell: bash + - name: Skip building some wheel tags + if: inputs.wheel-tags-to-skip + run: | + echo "CIBW_SKIP=${{ inputs.wheel-tags-to-skip }}" >> "${GITHUB_ENV}" + shell: bash - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 @@ -79,6 +79,7 @@ jobs: CIBW_ARCHS_MACOS: native CIBW_CONFIG_SETTINGS: >- # Cython line tracing for coverage collection with-cython-tracing=${{ inputs.cython-tracing }} + timeout-minutes: 120 - name: Upload built artifacts for testing and publishing uses: actions/upload-artifact@v3 diff --git a/pyproject.toml b/pyproject.toml index 9ccc99803..f5e258d43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,7 +143,7 @@ profile = "True" [tool.cibuildwheel] build-frontend = "build" test-requires = "pytest pytest-cov pytest-xdist pytest-forked" -test-command = "python -Im pytest -m smoke --no-cov {project}/tests" +test-command = "python -Im pytest -m smoke --no-cov -n 0 {project}/tests" skip = "pp*" [tool.cibuildwheel.environment] @@ -158,6 +158,32 @@ PIP_NO_WARN_SCRIPT_LOCATION = "1" PRE_COMMIT_COLOR = "always" PY_COLORS = "1" +[tool.cibuildwheel.linux] +before-build = [ + "env", + "export", +] +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" +skip = [ + "*-musllinux_*", # FIXME: musllinux needs us to provide with containers pre-built libssh + "pp*", # FIXME: we don't ship these currently but could + + # The support for 32-bit wheels has been dropped long ago: + "*-manylinux_i686", + "*-musllinux_i686", +] + +[tool.cibuildwheel.linux.environment] +STATIC_DEPS_DIR = "$(cat /root/.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}" +CFLAGS="'-I$(cat /root/.static-deps-path)/include'" +LDFLAGS = "'-L$(cat /root/.static-deps-path)/lib64' '-L$(cat /root/.static-deps-path)/lib'" +LD_LIBRARY_PATH = "$(cat /root/.static-deps-path)/lib64:$(cat /root/.static-deps-path)/lib:${LD_LIBRARY_PATH}" + [tool.cibuildwheel.macos] before-build = [ "brew install libssh", # @0.9.4 # pinning the version does not work