Updates the requirements on [actions/setup-python](https://github.com/actions/setup-python) to permit the latest version.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](dc73133d4d)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
138 lines
6.5 KiB
YAML
138 lines
6.5 KiB
YAML
name: Wheel Builder
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
required: true
|
|
|
|
|
|
jobs:
|
|
manylinux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
PYTHON:
|
|
- {VERSION: "cp36-cp36m", ABI_VERSION: 'cp36'}
|
|
CONTAINER:
|
|
- {IMAGE: "pyca/cryptography-manylinux1:x86_64", NAME: "manylinux1"}
|
|
- {IMAGE: "pyca/cryptography-manylinux2010:x86_64", NAME: "manylinux2010"}
|
|
name: "${{ matrix.PYTHON.ABI_VERSION }} ${{ matrix.CONTAINER.NAME }}"
|
|
container: ${{ matrix.CONTAINER.IMAGE }}
|
|
steps:
|
|
- run: /opt/python/${{ matrix.PYTHON.VERSION }}/bin/python -m venv .venv
|
|
- name: Install python dependencies
|
|
run: .venv/bin/pip install -U pip wheel cffi six
|
|
- run: .venv/bin/pip download bcrypt==${{ github.event.inputs.version }} --no-deps --no-binary bcrypt && tar zxvf bcrypt*.tar.gz && mkdir tmpwheelhouse
|
|
- run: cd bcrypt* && ../.venv/bin/python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }} && mv dist/bcrypt*.whl ../tmpwheelhouse
|
|
- run: auditwheel repair tmpwheelhouse/bcrypt*.whl -w wheelhouse/
|
|
- run: .venv/bin/pip install bcrypt --no-index -f wheelhouse/
|
|
- run: |
|
|
.venv/bin/python -c "import bcrypt; password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)"
|
|
|
|
- run: mkdir bcrypt-wheelhouse
|
|
- run: mv wheelhouse/bcrypt*.whl bcrypt-wheelhouse/
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "bcrypt-${{ github.event.inputs.version }}-${{ matrix.CONTAINER.NAME }} -${{ matrix.PYTHON.ABI_VERSION }}"
|
|
path: bcrypt-wheelhouse/
|
|
|
|
macos:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
PYTHON:
|
|
- ABI_VERSION: 'cp36'
|
|
DOWNLOAD_URL: 'https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg'
|
|
BIN_PATH: '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3'
|
|
name: "${{ matrix.PYTHON.ABI_VERSION }} macOS"
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- run: |
|
|
curl "${{ matrix.PYTHON.DOWNLOAD_URL }}" -o python.pkg
|
|
sudo installer -pkg python.pkg -target /
|
|
- run: ${{ matrix.PYTHON.BIN_PATH }} -m venv venv
|
|
- run: venv/bin/pip install -U pip wheel cffi six
|
|
- run: venv/bin/pip download bcrypt==${{ github.event.inputs.version }} --no-deps --no-binary bcrypt && tar zxvf bcrypt*.tar.gz && mkdir wheelhouse
|
|
- run: cd bcrypt* && ../venv/bin/python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }} && mv dist/bcrypt*.whl ../wheelhouse
|
|
- run: venv/bin/pip install -f wheelhouse --no-index bcrypt
|
|
- run: |
|
|
venv/bin/python -c "import bcrypt;password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)"
|
|
|
|
- run: mkdir bcrypt-wheelhouse
|
|
- run: mv wheelhouse/bcrypt*.whl bcrypt-wheelhouse/
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "bcrypt-${{ github.event.inputs.version }}-macOS-${{ matrix.PYTHON.ABI_VERSION }}"
|
|
path: bcrypt-wheelhouse/
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
WINDOWS:
|
|
- 'x86'
|
|
- 'x64'
|
|
PYTHON:
|
|
- {VERSION: "3.6", ABI_VERSION: "cp36"}
|
|
name: "${{ matrix.PYTHON.VERSION }} ${{ matrix.PYTHON.ABI_VERSION }} ${{ matrix.WINDOWS}}"
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Setup python
|
|
uses: actions/setup-python@v2.2.2
|
|
with:
|
|
python-version: ${{ matrix.PYTHON.VERSION }}
|
|
architecture: ${{ matrix.WINDOWS }}
|
|
- run: python -m pip install -U pip wheel cffi six
|
|
- run: pip download bcrypt==${{ github.event.inputs.version }} --no-deps --no-binary bcrypt && tar zxvf bcrypt*.tar.gz && mkdir wheelhouse
|
|
shell: bash
|
|
- run: cd bcrypt* && python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }} && mv dist/bcrypt*.whl ../wheelhouse
|
|
- run: pip install -f wheelhouse --no-index bcrypt
|
|
- run: |
|
|
python -c "import bcrypt; password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)"
|
|
|
|
# TODO: can we setup another python and test in the same job? this would catch bad linking problems (e.g. build and test on py36, but then install py38 and see if it works
|
|
- run: mkdir bcrypt-wheelhouse
|
|
- run: move wheelhouse\bcrypt*.whl bcrypt-wheelhouse\
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "bcrypt-${{ github.event.inputs.version }}-${{ matrix.WINDOWS }}-${{ matrix.PYTHON.ABI_VERSION }}"
|
|
path: bcrypt-wheelhouse\
|
|
|
|
manylinux-arm64:
|
|
name: "${{ matrix.PYTHON.ABI_VERSION }} manylinux2014-aarch64"
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
PYTHON:
|
|
- {VERSION: "cp36-cp36m", ABI_VERSION: 'cp36'}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: |
|
|
docker run --rm --privileged hypriot/qemu-register
|
|
- uses: docker://quay.io/pypa/manylinux2014_aarch64
|
|
# The weird pip cache nonsense below is due to docker ownership issues. We want
|
|
# a cache because otherwise we end up building cffi twice.
|
|
with:
|
|
args: |
|
|
bash -c "set -xe;
|
|
mkdir -p /github/home/.cache/pip;
|
|
chown -R $(whoami) /github/home/.cache;
|
|
/opt/python/${{ matrix.PYTHON.VERSION }}/bin/python -m venv .venv;
|
|
.venv/bin/pip install -U pip wheel cffi six;
|
|
.venv/bin/pip download bcrypt==${{ github.event.inputs.version }} --no-deps --no-binary bcrypt;
|
|
tar zxvf bcrypt*.tar.gz;
|
|
mkdir tmpwheelhouse;
|
|
pushd bcrypt*;
|
|
../.venv/bin/python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }};
|
|
mv dist/bcrypt*.whl ../tmpwheelhouse;
|
|
popd;
|
|
auditwheel repair tmpwheelhouse/bcrypt*.whl -w wheelhouse/;
|
|
.venv/bin/pip install bcrypt --no-index -f wheelhouse/;
|
|
.venv/bin/python -c \"import bcrypt; password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)\";"
|
|
- run: mkdir bcrypt-wheelhouse
|
|
- run: sudo mv wheelhouse/bcrypt*.whl bcrypt-wheelhouse/
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "bcrypt-${{ github.event.inputs.version }}-manylinux2014-aarch64-${{ matrix.PYTHON.ABI_VERSION }}"
|
|
path: bcrypt-wheelhouse/
|