From 5fe8be2fbcfb6bbdff463d70201e373aefcd5723 Mon Sep 17 00:00:00 2001 From: Jimisola Laursen Date: Wed, 10 Jan 2024 17:33:40 +0100 Subject: [PATCH] Add support for musllinux --- .github/workflows/tests.yml | 79 ------------------------------------ .github/workflows/wheels.yml | 8 ++-- build.sh | 5 +++ 3 files changed, 10 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 87e5f6c2..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Tests - -on: - pull_request: - push: - paths-ignore: - - '**.rst' - -jobs: - x86_64: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-22.04 - python-version: 3.8 - - os: ubuntu-22.04 - python-version: '3.12' - - os: ubuntu-22.04 - python-version: 'pypy3.9' - - os: macos-latest - python-version: 3.8 - - steps: - - name: Checkout pygit2 - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Linux - if: runner.os == 'Linux' - run: | - sudo apt install tinyproxy - LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test - - - name: macOS - if: runner.os == 'macOS' - run: | - export OPENSSL_PREFIX=`brew --prefix openssl@1.1` - LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test - - aarch64: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Build & test - uses: uraimo/run-on-arch-action@v2 - with: - arch: aarch64 - distro: ubuntu20.04 - install: | - apt-get update -q -y - apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget - run: | - LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test - - s390x: - runs-on: ubuntu-22.04 - if: github.ref == 'refs/heads/master' - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Build & test - uses: uraimo/run-on-arch-action@v2 - with: - arch: s390x - distro: ubuntu20.04 - install: | - apt-get update -q -y - apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget - run: | - LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test - continue-on-error: true # Tests are expected to fail, see issue #812 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8b8dc3d3..5866331c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -35,13 +35,15 @@ jobs: CIBW_BEFORE_ALL: sh build.sh CIBW_ENVIRONMENT: LIBGIT2_VERSION=1.7.1 LIBSSH2_VERSION=1.11.0 OPENSSL_VERSION=3.1.3 LIBGIT2=/project/ci CIBW_ENVIRONMENT_MACOS: LIBGIT2_VERSION=1.7.1 LIBSSH2_VERSION=1.11.0 OPENSSL_VERSION=3.1.3 LIBGIT2=/Users/runner/work/pygit2/pygit2/ci - CIBW_SKIP: "pp3*" + CIBW_SKIP: "pp3* *manylinux* cp36* cp37* cp38* cp39* cp310* cp311*" + CIBW_BUILD: "cp312-musllinux_x86_64" CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2014" CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014" - CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}" + #CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}" + CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {dest_dir} {wheel}" CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}" CIBW_ARCHS_MACOS: universal2 - CIBW_ARCHS_LINUX: x86_64 aarch64 + CIBW_ARCHS_LINUX: x86_64 # aarch64 - uses: actions/upload-artifact@v3 with: diff --git a/build.sh b/build.sh index 5ea81b51..5bc45c2f 100644 --- a/build.sh +++ b/build.sh @@ -70,6 +70,11 @@ if [ "$CIBUILDWHEEL" = "1" ]; then else yum install perl-IPC-Cmd -y fi + elif [ -f /sbin/apk ]; then + apk add wget + if [ -z "$OPENSSL_VERSION" ]; then + apk add openssl-dev + fi fi rm -rf ci mkdir ci || true