Skip to content

Commit

Permalink
Merge remote-tracking branch 'chia/main' into add-bindings-for-go-lang
Browse files Browse the repository at this point in the history
  • Loading branch information
shotonoff committed Feb 15, 2022
2 parents ccc3769 + a61089d commit 358d091
Show file tree
Hide file tree
Showing 11 changed files with 269 additions and 18,076 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build-aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build ARM64 wheel

on: [push, pull_request]
on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'

jobs:
build_wheels:
Expand All @@ -14,7 +22,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -30,7 +38,7 @@ jobs:
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install cibuildwheel==1.10.0
python -m pip install cibuildwheel==2.3.1
- name: Lint source with flake8
run: |
Expand All @@ -49,8 +57,8 @@ jobs:
source venv/bin/activate
python -m cibuildwheel --output-dir dist
env:
# 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
CIBW_BUILD_VERBOSITY_LINUX: 0
CIBW_BEFORE_BUILD_LINUX: >
Expand Down
57 changes: 41 additions & 16 deletions .github/workflows/build-m1-wheel.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build M1 Wheels

on: [push, pull_request]
on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'

jobs:
build_wheels:
Expand All @@ -12,7 +20,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -21,29 +29,46 @@ jobs:
with:
fetch-depth: 0

- name: Lint source with flake8
- name: Brew update Python
run: |
arch -arm64 python -m pip install --upgrade pip
arch -arm64 pip install flake8
arch -arm64 flake8 src setup.py python-bindings python-impl
arch -arm64 brew install python@3.9
arch -arm64 brew install python@3.10
- name: Lint source with mypy
run: |
arch -arm64 pip install mypy
arch -arm64 mypy --config-file mypi.ini python-bindings python-impl
- name: Build m1 wheels
- name: Build m1 wheels for 3.9 and 3.10
run: |
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 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 delocate-wheel -v dist/*.whl
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp310*.whl
deactivate
rm -rf venv
- name: Test wheel
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 ./python-bindings/test.py
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 ./python-bindings/test.py
deactivate
rm -rf venv
- name: Create sha256 hash
run: |
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build and Test C++, Javascript, and Python

on: [push, pull_request]
on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'

jobs:
build_wheels:
Expand All @@ -10,12 +18,12 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
python: ['3.7', '3.8', '3.9']
python: ['3.7', '3.8', '3.9', '3.10']

steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build wheels

on: [push, pull_request]
on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'

jobs:
build_wheels:
Expand All @@ -14,7 +22,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
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,16 +54,15 @@ 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
# 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_*'
CIBW_TEST_REQUIRES: pytest
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_ENVIRONMENT_LINUX: "PATH=/project/cmake-3.17.3-Linux-`uname -m`/bin:$PATH"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/relic-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand Down
Loading

0 comments on commit 358d091

Please sign in to comment.