|
|
@ -1,10 +1,9 @@ |
|
|
|
name: build |
|
|
|
|
|
|
|
on: |
|
|
|
create: |
|
|
|
push: |
|
|
|
tags: |
|
|
|
- v* |
|
|
|
push: |
|
|
|
branches: |
|
|
|
- master |
|
|
|
pull_request: |
|
|
@ -16,9 +15,12 @@ concurrency: |
|
|
|
cancel-in-progress: true |
|
|
|
|
|
|
|
env: |
|
|
|
COINCURVE_UPSTREAM_REF: f2d9aeae6d5a7c7fbbba8bbb38b1849b784beef7 |
|
|
|
COINCURVE_UPSTREAM_REF: d8a246324650c3df8d54d133a8ac3c1b857a7a4e |
|
|
|
COINCURVE_IGNORE_SYSTEM_LIB: '1' |
|
|
|
CIBW_BEFORE_ALL_MACOS: ./.github/scripts/install-macos-build-deps.sh |
|
|
|
CIBW_ENVIRONMENT_PASS_LINUX: > |
|
|
|
COINCURVE_UPSTREAM_REF |
|
|
|
COINCURVE_IGNORE_SYSTEM_LIB |
|
|
|
CIBW_TEST_COMMAND: > |
|
|
|
python -c |
|
|
|
"from coincurve import PrivateKey; |
|
|
@ -26,13 +28,12 @@ env: |
|
|
|
b=PrivateKey(); |
|
|
|
assert a.ecdh(b.public_key.format())==b.ecdh(a.public_key.format()) |
|
|
|
" |
|
|
|
CIBW_BEFORE_ALL_LINUX: ./.github/scripts/install-linux-build-deps.sh |
|
|
|
CIBW_SKIP: > |
|
|
|
pp* |
|
|
|
|
|
|
|
jobs: |
|
|
|
test: |
|
|
|
name: Test latest |
|
|
|
name: Test latest Python |
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
|
|
env: |
|
|
@ -69,24 +70,59 @@ jobs: |
|
|
|
- name: Upload coverage |
|
|
|
run: codecov -X gcov |
|
|
|
|
|
|
|
unix-wheels-standard: |
|
|
|
name: Build ${{ startsWith(matrix.os, 'macos-') && 'macOS' || 'Linux' }} wheels |
|
|
|
linux-wheels-standard: |
|
|
|
name: Build Linux wheels |
|
|
|
needs: |
|
|
|
- test |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
|
|
- name: Build wheels |
|
|
|
uses: pypa/cibuildwheel@v2.3.1 |
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
|
name: artifacts |
|
|
|
path: wheelhouse/*.whl |
|
|
|
if-no-files-found: error |
|
|
|
|
|
|
|
macos-wheels-x86-64: |
|
|
|
name: Build macOS wheels |
|
|
|
needs: |
|
|
|
- test |
|
|
|
runs-on: ${{ matrix.os }} |
|
|
|
strategy: |
|
|
|
fail-fast: false |
|
|
|
matrix: |
|
|
|
os: [ubuntu-20.04, macos-10.15] |
|
|
|
runs-on: macos-10.15 |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
|
|
- name: Build wheels |
|
|
|
uses: pypa/cibuildwheel@v2.3.0 |
|
|
|
uses: pypa/cibuildwheel@v2.3.1 |
|
|
|
env: |
|
|
|
CIBW_BEFORE_ALL_MACOS: ./.github/scripts/install-macos-build-deps.sh |
|
|
|
CIBW_ARCHS_MACOS: x86_64 arm64 |
|
|
|
CIBW_ARCHS_MACOS: x86_64 |
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
|
name: artifacts |
|
|
|
path: wheelhouse/*.whl |
|
|
|
if-no-files-found: error |
|
|
|
|
|
|
|
macos-wheels-arm: |
|
|
|
name: Build macOS wheels for ARM |
|
|
|
needs: |
|
|
|
- test |
|
|
|
runs-on: macos-10.15 |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
|
|
- name: Build wheels |
|
|
|
uses: pypa/cibuildwheel@v2.3.1 |
|
|
|
env: |
|
|
|
CIBW_ARCHS_MACOS: arm64 |
|
|
|
COINCURVE_CROSS_HOST: aarch64-apple-darwin |
|
|
|
CFLAGS: -target arm64-apple-macos11 |
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
@ -118,15 +154,15 @@ jobs: |
|
|
|
path: dist/* |
|
|
|
if-no-files-found: error |
|
|
|
|
|
|
|
unix-wheels-arm: |
|
|
|
linux-wheels-arm: |
|
|
|
name: Build Linux wheels for ARM |
|
|
|
needs: |
|
|
|
- test |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
if: > |
|
|
|
(github.event_name == 'push' && github.ref == 'refs/heads/master') |
|
|
|
|| |
|
|
|
(github.event_name == 'create' && github.event.ref_type == 'tag') |
|
|
|
github.event_name == 'push' |
|
|
|
&& |
|
|
|
(github.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/tags')) |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
@ -137,7 +173,7 @@ jobs: |
|
|
|
platforms: arm64 |
|
|
|
|
|
|
|
- name: Build wheels |
|
|
|
uses: pypa/cibuildwheel@v2.3.0 |
|
|
|
uses: pypa/cibuildwheel@v2.3.1 |
|
|
|
env: |
|
|
|
CIBW_ARCHS_LINUX: aarch64 |
|
|
|
|
|
|
@ -150,11 +186,16 @@ jobs: |
|
|
|
publish: |
|
|
|
name: Publish release |
|
|
|
needs: |
|
|
|
- unix-wheels-standard |
|
|
|
- linux-wheels-standard |
|
|
|
- macos-wheels-x86-64 |
|
|
|
- macos-wheels-arm |
|
|
|
- windows-wheels-and-sdist |
|
|
|
- unix-wheels-arm |
|
|
|
- linux-wheels-arm |
|
|
|
runs-on: ubuntu-latest |
|
|
|
if: github.event_name == 'create' && github.event.ref_type == 'tag' |
|
|
|
if: > |
|
|
|
github.event_name == 'push' |
|
|
|
&& |
|
|
|
(github.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/tags')) |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/download-artifact@v2 |
|
|
|