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

Build py 3.10 wheels #101

Merged
merged 11 commits into from Jan 9, 2022
Merged
19 changes: 4 additions & 15 deletions .github/workflows/build-aarch64.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -31,19 +31,7 @@ jobs:
source venv/bin/activate
python -m pip install --upgrade pip
pip install wheel
pip install cibuildwheel==1.9.0

- name: Lint source with flake8
run: |
source venv/bin/activate
pip install flake8
flake8 tests setup.py

- name: Lint source with mypy
run: |
source venv/bin/activate
pip install mypy
mypy --config-file mypi.ini setup.py tests
pip install cibuildwheel==2.3.1

- name: Build wheel and test
run: |
Expand All @@ -52,7 +40,8 @@ jobs:
env:
CIBW_BUILD_VERBOSITY_LINUX: 0
# build python 3.7 and 3.8
CIBW_BUILD: cp37-* cp38-* cp39-*
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
CIBW_SKIP: '*-musllinux_*'
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
# we need boost
CIBW_BEFORE_ALL_LINUX: >
Expand Down
48 changes: 31 additions & 17 deletions .github/workflows/build-m1-wheel.yml
Expand Up @@ -23,32 +23,46 @@ jobs:

- name: Ensure dependencies are present
run: |
brew install gmp boost

- name: Lint source with flake8
run: |
arch -arm64 python -m pip install --upgrade pip
arch -arm64 pip install flake8
arch -arm64 flake8 tests setup.py

- name: Lint source with mypy
run: |
arch -arm64 pip install mypy
arch -arm64 mypy --config-file mypi.ini setup.py tests
arch -arm64 brew install gmp boost
arch -arm64 brew install python@3.9
arch -arm64 brew install python@3.10

- name: Build m1 wheels
run: |
export BUILD_VDF_CLIENT=N
rm -rf venv
arch -arm64 $(brew --prefix python@3.9)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip wheel -w dist --no-deps .
arch -arm64 delocate-wheel -v dist/*.whl
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp39*.whl
deactivate
rm -rf venv
arch -arm64 $(brew --prefix python@3.10)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip wheel -w dist --no-deps .
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp310*.whl
deactivate
rm -rf venv

- name: Test wheel
- name: Test wheels
run: |
arch -arm64 python3 -m venv venv
. ./venv/bin/activate
arch -arm64 pip install ./dist/*.whl
rm -rf venv
arch -arm64 $(brew --prefix python@3.9)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip install ./dist/*cp39*.whl
arch -arm64 pip install pytest
arch -arm64 ./venv/bin/pytest -v ./tests
deactivate
rm -rf venv
arch -arm64 $(brew --prefix python@3.10)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip install ./dist/*cp310*.whl
arch -arm64 pip install pytest
arch -arm64 ./venv/bin/pytest -v ./tests
deactivate
rm -rf venv

- name: Create sha256 hash
run: |
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -46,25 +46,27 @@ jobs:
python -m build --sdist --outdir dist .

- name: Build ${{ matrix.os }} wheels and test
uses: joerick/cibuildwheel@v1.10.0
uses: joerick/cibuildwheel@v2.3.1
with:
output-dir: dist
env:
CIBW_BUILD_VERBOSITY_MACOS: 0
CIBW_BUILD_VERBOSITY_LINUX: 0
CIBW_BUILD_VERBOSITY_WINDOWS: 0
# build python 3.7 and 3.8
CIBW_BUILD: cp37-* cp38-* cp39-*
CIBW_SKIP: '*-manylinux_i686 *-win32'
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
CIBW_SKIP: '*-manylinux_i686 *-win32 *-musllinux_*'
# we need boost
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_ENVIRONMENT_LINUX: "PATH=/project/cmake-3.17.3-Linux-`uname -m`/bin:$PATH BUILD_VDF_CLIENT=N"
CIBW_BEFORE_ALL_LINUX: >
curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-`uname -m`.sh > cmake.sh
yum -y install epel-release
&& echo "epel-relesase installed"
&& yum -y install boost-devel lzip
&& echo "boost-devel and lzip installed"
&& curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-`uname -m`.sh > cmake.sh
&& yes | sh cmake.sh | cat
&& rm -f /usr/bin/cmake
&& yum -y install epel-release
&& yum -y install boost-devel lzip
&& curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | tar x --lzip
&& cp src/lib/gmp-patch-6.2.1/longlong.h gmp-6.2.1/
&& cp src/lib/gmp-patch-6.2.1/compat.c gmp-6.2.1/
Expand Down