From c817a323aed8ebb4201a9cdf962f9618b6ea136a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Aug 2020 15:05:29 -0400 Subject: [PATCH 1/6] Fix cibuildwheel trigger condition. --- .github/workflows/cibuildwheel.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 10e5ea3e687a..5184a44303de 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -1,6 +1,12 @@ name: Build CI wheels -on: [push, tags] +on: + push: + branches: + - master + - v[0-9]+.[0-9]+.x + tags: + - v* jobs: build_wheels: From b3465e03f5760a2e771081c7bc34a6fbe9b54290 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Aug 2020 18:06:06 -0400 Subject: [PATCH 2/6] Pin NumPy when building wheels. --- .github/workflows/cibuildwheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 5184a44303de..70d266e1b1cd 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -37,6 +37,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 CIBW_MANYLINUX_I686_IMAGE: manylinux1 CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux1 + CIBW_BEFORE_BUILD: pip install numpy==1.15 - uses: actions/upload-artifact@v2 with: From 5069b83a7337c5c48df197794d0d4905956a5b8d Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Aug 2020 18:09:42 -0400 Subject: [PATCH 3/6] Fetch all commits so that wheels get correct version. --- .github/workflows/cibuildwheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 70d266e1b1cd..ef241468314f 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -18,6 +18,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: actions/setup-python@v2 name: Install Python From e68362aad229943bfb2b0c5aa87cd63bc3f7a4a1 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Aug 2020 19:51:29 -0400 Subject: [PATCH 4/6] Prevent dirty tree while building wheels on CI. Move the wheels to `dist` instead of `wheelhouse`, since that directory is ignored and git won't make the version `+dirty`. --- .github/workflows/cibuildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index ef241468314f..b17e90281151 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -32,7 +32,7 @@ jobs: - name: Build wheels run: | - python -m cibuildwheel --output-dir wheelhouse + python -m cibuildwheel --output-dir dist env: CIBW_BUILD: "cp3?-*" CIBW_SKIP: "cp35-* cp36-*" @@ -44,4 +44,4 @@ jobs: - uses: actions/upload-artifact@v2 with: name: wheels - path: ./wheelhouse/*.whl + path: ./dist/*.whl From e0ac6cb0792b186da0f5f20ebde20f70ccb480dd Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Aug 2020 21:08:11 -0400 Subject: [PATCH 5/6] Build wheels for PyPy if on v3.3.* branch/tag. --- .github/workflows/cibuildwheel.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index b17e90281151..fd6b6619064b 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -30,7 +30,7 @@ jobs: run: | python -m pip install cibuildwheel==1.5.5 - - name: Build wheels + - name: Build wheels for CPython run: | python -m cibuildwheel --output-dir dist env: @@ -38,9 +38,19 @@ jobs: CIBW_SKIP: "cp35-* cp36-*" CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 CIBW_MANYLINUX_I686_IMAGE: manylinux1 - CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux1 CIBW_BEFORE_BUILD: pip install numpy==1.15 + - name: Build wheels for PyPy + run: | + python -m cibuildwheel --output-dir dist + env: + CIBW_BUILD: "pp3?-*" + CIBW_BEFORE_BUILD: pip install numpy==1.15 + if: > + runner.os != 'Windows' && ( + startsWith(github.ref, 'refs/heads/v3.3') || + startsWith(github.ref, 'refs/tags/v3.3') ) + - uses: actions/upload-artifact@v2 with: name: wheels From baba803efd02cda151075614c4221e555ce4236c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Aug 2020 22:20:40 -0400 Subject: [PATCH 6/6] Also build Python 3.6 wheels for v3.3.x. --- .github/workflows/cibuildwheel.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index fd6b6619064b..5dd2d0dea942 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -40,6 +40,18 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: manylinux1 CIBW_BEFORE_BUILD: pip install numpy==1.15 + - name: Build wheels for CPython 3.6 + run: | + python -m cibuildwheel --output-dir dist + env: + CIBW_BUILD: "cp36-*" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 + CIBW_MANYLINUX_I686_IMAGE: manylinux1 + CIBW_BEFORE_BUILD: pip install numpy==1.15 + if: > + startsWith(github.ref, 'refs/heads/v3.3') || + startsWith(github.ref, 'refs/tags/v3.3') + - name: Build wheels for PyPy run: | python -m cibuildwheel --output-dir dist