Skip to content

Commit

Permalink
build pypy wheels too (#5859)
Browse files Browse the repository at this point in the history
* build pypy wheels too

* remove unneeded packages
  • Loading branch information
reaperhulk authored Feb 22, 2021
1 parent 5efb07d commit dd09d50
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/wheel-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@ jobs:
container: ghcr.io/pyca/${{ matrix.MANYLINUX.CONTAINER }}
strategy:
matrix:
PYTHON: ["cp36-cp36m"]
PYTHON:
- { VERSION: "cp36-cp36m", PATH: "/opt/python/cp36-cp36m/bin/python", ABI_VERSION: 'cp36' }
- { VERSION: "pypy3.6", PATH: "/opt/pypy3.6/bin/pypy" }
- { VERSION: "pypy3.7", PATH: "/opt/pypy3.7/bin/pypy" }
MANYLINUX:
- NAME: manylinux2010_x86_64
CONTAINER: "cryptography-manylinux2010:x86_64"
- NAME: manylinux2014_x86_64
CONTAINER: "cryptography-manylinux2014:x86_64"
name: "${{ matrix.PYTHON }} for ${{ matrix.MANYLINUX.NAME }}"
- { NAME: "manylinux2010_x86_64", CONTAINER: "cryptography-manylinux2010:x86_64" }
- { NAME: "manylinux2014_x86_64", CONTAINER: "cryptography-manylinux2014:x86_64" }
name: "${{ matrix.PYTHON.VERSION }} for ${{ matrix.MANYLINUX.NAME }}"
steps:
- run: /opt/python/${{ matrix.PYTHON }}/bin/python -m venv .venv
- run: ${{ matrix.PYTHON.PATH }} -m venv .venv
- name: Install Python dependencies
run: .venv/bin/pip install -U pip wheel cffi six ipaddress setuptools-rust
run: .venv/bin/pip install -U pip wheel cffi setuptools-rust
- run: .venv/bin/pip download cryptography==${{ github.event.inputs.version }} --no-deps --no-binary cryptography && tar zxvf cryptography*.tar.gz && mkdir tmpwheelhouse
- run: |
REGEX="cp3([0-9])*"
if [[ "${{ matrix.PYTHON }}" =~ $REGEX ]]; then
PY_LIMITED_API="--py-limited-api=cp3${BASH_REMATCH[1]}"
- name: Build the wheel
run: |
if [ -n "${{ matrix.PYTHON.ABI_VERSION }}" ]; then
PY_LIMITED_API="--py-limited-api=${{ matrix.PYTHON.ABI_VERSION }}"
fi
cd cryptography*
LDFLAGS="-L/opt/pyca/cryptography/openssl/lib" \
Expand All @@ -51,7 +52,7 @@ jobs:
- run: mv wheelhouse/cryptography*.whl cryptography-wheelhouse/
- uses: actions/upload-artifact@v1
with:
name: "cryptography-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }}-${{ matrix.PYTHON }}"
name: "cryptography-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }}-${{ matrix.PYTHON.VERSION }}"
path: cryptography-wheelhouse/

macos:
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
default: true

- run: ${{ matrix.PYTHON.BIN_PATH }} -m venv venv
- run: venv/bin/pip install -U pip wheel cffi six ipaddress setuptools-rust
- run: venv/bin/pip install -U pip wheel cffi setuptools-rust
- run: venv/bin/pip download cryptography==${{ github.event.inputs.version }} --no-deps --no-binary cryptography && tar zxvf cryptography*.tar.gz && mkdir wheelhouse
- name: Build the wheel
run: |
Expand Down Expand Up @@ -142,7 +143,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash

- run: python -m pip install -U pip wheel cffi six ipaddress setuptools-rust
- run: python -m pip install -U pip wheel cffi setuptools-rust
- run: pip download cryptography==${{ github.event.inputs.version }} --no-deps --no-binary cryptography && tar zxvf cryptography*.tar.gz && mkdir wheelhouse
shell: bash
- run: cd cryptography* && python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }} && mv dist/cryptography*.whl ../wheelhouse
Expand Down

0 comments on commit dd09d50

Please sign in to comment.