From 325f731ffa4a9a68dc37f1e62d184dec8b1442f2 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 7 Mar 2024 10:11:39 +1100 Subject: [PATCH 1/3] chore(ci): pin os to older versions To ensure that the wheels generated are compatible with as many devices as possible, I am pinning the operating systems of the runners to the oldest version currently supported. Signed-off-by: JP-Ellis --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a0ce8087..866fed002 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: name: Build source distribution if: github.event_name == 'push' || ! github.event.pull_request.draft - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 @@ -62,11 +62,11 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: ubuntu-20.04 archs: x86_64 - - os: macos-latest + - os: macos-12 archs: x86_64 - - os: windows-latest + - os: windows-2019 archs: AMD64 steps: @@ -123,13 +123,13 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: ubuntu-20.04 archs: aarch64 build: manylinux - - os: ubuntu-latest + - os: ubuntu-20.04 archs: aarch64 build: musllinux - - os: macos-latest + - os: macos-12 archs: arm64 build: "" @@ -150,7 +150,7 @@ jobs: ${{ github.workflow }} - name: Set up QEMU - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu-') uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3 with: platforms: arm64 @@ -173,7 +173,7 @@ jobs: name: Publish wheels and sdist if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 environment: pypi needs: From 5085931a5f5439e4eead8d4f48a1f223d85def41 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 7 Mar 2024 10:13:34 +1100 Subject: [PATCH 2/3] chore(ci): set osx deployment target To avoid ambiguity, setting the macOS deployment target explicitly. Signed-off-by: JP-Ellis --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 866fed002..9c78ac9cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,6 +97,11 @@ jobs: echo "build=*" >> "$GITHUB_OUTPUT" fi + - name: Set macOS deployment target + if: startsWith(matrix.os, 'macos-') + run: | + echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> "$GITHUB_ENV" + - name: Create wheels uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5 env: From 228dfa77372bb4453e84b664ef1ca83c7e597cbd Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 7 Mar 2024 10:31:49 +1100 Subject: [PATCH 3/3] chore(ci): replace hatch clean with rm Install hatch on the PyPy images seems unnecessarily difficult, just to run a few `rm` commands. So I am replacing the before-build step with the required `rm` commands. Signed-off-by: JP-Ellis --- pyproject.toml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 112ee336c..984aca2f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -293,16 +293,14 @@ exclude = '^(src/pact|tests)/(?!v3).+\.py$' ## CI Build Wheel ################################################################################ [tool.cibuildwheel] +skip = "pp38-*" before-build = """ -python -m pip install hatch -hatch clean -if ! command -v cargo &> /dev/null; then - curl -sSf https://sh.rustup.rs | sh -s -- --profile=minimal -y - for bin in $(ls "$HOME/.cargo/bin"); do - ln -v "$HOME/.cargo/bin/$bin" "/usr/bin/$bin" - done - rustup show -fi +rm -rvf src/pact/v3/bin +rm -rvf src/pact/v3/data +rm -rvf src/pact/v3/lib +mv -v src/pact/v3/_ffi.pyi _ffi.pyi +rm -rvf src/pact/v3/_ffi.* +mv -v _ffi.pyi src/pact/v3/_ffi.pyi """ test-command = """ python -c \