Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/more wheel fixes #598

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -123,13 +128,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: ""

Expand All @@ -150,7 +155,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
Expand All @@ -173,7 +178,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:
Expand Down
16 changes: 7 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Loading