From f7466e9edd8b198f185d29231a243d83e6626a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 14:26:49 +0100 Subject: [PATCH 01/10] first stab at wheel building --- .github/workflows/wheels.yml | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..7cb792c --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,55 @@ +name: Build wheels + + # on: + # release: + # types: [released] +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ + ubuntu-latest, + # macOS-latest, + # windows-latest, + ] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Build wheels + uses: pypa/cibuildwheel@v2.3.1 + env: + CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* + # CIBW_SKIP: "*-musllinux*" + # Be a little economical here and only build native archs. Otherwise, + # it'll produce other targets, too. + # : + CIBW_ARCHS: native + - name: Save wheels + uses: actions/upload-artifact@v2 + with: + path: ./wheelhouse/*.whl + + # https://cibuildwheel.readthedocs.io/en/stable/deliver-to-pypi/ + # upload: + # name: Upload wheels to PyPI + # needs: [build_wheels] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/download-artifact@v2 + # with: + # name: artifact + # path: dist + # - uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # user: __token__ + # password: ${{ secrets.PYPI_API_TOKEN }} From 24675bddb155b8d597ddf1d7d1cce54337763dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 14:29:55 +0100 Subject: [PATCH 02/10] wheels: install system dependencies --- .github/workflows/ci.yml | 2 +- .github/workflows/wheels.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a1f550..113bce0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: sudo apt install -y libcgal-dev - name: Install other dependencies run: | - sudo apt-get install -y libeigen3-dev python3-pip clang + sudo apt-get install -y libeigen3-dev clang - name: Test with tox run: | pip install tox diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 7cb792c..508f27b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -25,6 +25,16 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 + - name: Install CGAL 5 + run: | + # Leave that here in case we ever need a PPA again + # sudo apt-get install -y software-properties-common + # sudo apt-add-repository -y ppa:nschloe/cgal-backports + # sudo apt update + sudo apt install -y libcgal-dev + - name: Install other dependencies + run: | + sudo apt-get install -y libeigen3-dev - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 env: From e5519b2271c9b849844202e7a5300ce049a705d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 14:37:42 +0100 Subject: [PATCH 03/10] cibuildwheel fix --- .github/workflows/wheels.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 508f27b..0c92dd8 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -25,21 +25,13 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - name: Install CGAL 5 - run: | - # Leave that here in case we ever need a PPA again - # sudo apt-get install -y software-properties-common - # sudo apt-add-repository -y ppa:nschloe/cgal-backports - # sudo apt update - sudo apt install -y libcgal-dev - - name: Install other dependencies - run: | - sudo apt-get install -y libeigen3-dev - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 env: + # install dependencies + CIBW_BEFORE_BUILD: sudo apt-get install -y libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* - # CIBW_SKIP: "*-musllinux*" + CIBW_SKIP: "*-musllinux*" # Be a little economical here and only build native archs. Otherwise, # it'll produce other targets, too. # : From 1062f5bc93387d40c79e56ea67f04fedbf6e8e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 14:46:45 +0100 Subject: [PATCH 04/10] there's no sudo in cibuildwheels --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0c92dd8..f9e9b38 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,7 @@ jobs: uses: pypa/cibuildwheel@v2.3.1 env: # install dependencies - CIBW_BEFORE_BUILD: sudo apt-get install -y libeigen3-dev libcgal-dev + CIBW_BEFORE_BUILD: apt-get install -y libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" # Be a little economical here and only build native archs. Otherwise, From 0a749215481b79794f19505d181e532da2418b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 14:48:27 +0100 Subject: [PATCH 05/10] another wheel build fix --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f9e9b38..6efeb58 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,7 @@ jobs: uses: pypa/cibuildwheel@v2.3.1 env: # install dependencies - CIBW_BEFORE_BUILD: apt-get install -y libeigen3-dev libcgal-dev + CIBW_BEFORE_BUILD: apt install libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" # Be a little economical here and only build native archs. Otherwise, From e330a27d7d7605e1c50f2393ca9eb1c9a899d968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 15:00:18 +0100 Subject: [PATCH 06/10] gha: use different base image --- .github/workflows/wheels.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 6efeb58..67eccfa 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -28,8 +28,10 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 env: - # install dependencies - CIBW_BEFORE_BUILD: apt install libeigen3-dev libcgal-dev + # Install dependencies; use manylinux_2_24 to have Debian images with + # apt-get. With manylinux2014, it'll use CentOS. + CIBW_MANYLINUX_*_IMAGE: manylinux_2_24 + CIBW_BEFORE_BUILD: apt-get install libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" # Be a little economical here and only build native archs. Otherwise, From fb034c36973ef78ce67583d5f10262797a392edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 15:03:48 +0100 Subject: [PATCH 07/10] gha fix --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 67eccfa..82c868c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -30,7 +30,7 @@ jobs: env: # Install dependencies; use manylinux_2_24 to have Debian images with # apt-get. With manylinux2014, it'll use CentOS. - CIBW_MANYLINUX_*_IMAGE: manylinux_2_24 + CIBW_MANYLINUX_x86_64_IMAGE: manylinux_2_24 CIBW_BEFORE_BUILD: apt-get install libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" From 89df15bd9997a747fe4ab606803ff76aa4c8db49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 15:06:12 +0100 Subject: [PATCH 08/10] gha fix --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 82c868c..ceab4ec 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -30,7 +30,7 @@ jobs: env: # Install dependencies; use manylinux_2_24 to have Debian images with # apt-get. With manylinux2014, it'll use CentOS. - CIBW_MANYLINUX_x86_64_IMAGE: manylinux_2_24 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24 CIBW_BEFORE_BUILD: apt-get install libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" From 770aea320d87eea74a315daa20e6d85faba03dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 15:09:48 +0100 Subject: [PATCH 09/10] gha fix --- .github/workflows/wheels.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ceab4ec..b508a40 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -31,7 +31,9 @@ jobs: # Install dependencies; use manylinux_2_24 to have Debian images with # apt-get. With manylinux2014, it'll use CentOS. CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24 - CIBW_BEFORE_BUILD: apt-get install libeigen3-dev libcgal-dev + CIBW_BEFORE_BUILD: | + apt-get update + apt-get install libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" # Be a little economical here and only build native archs. Otherwise, From 2f873e601f36553c5f47e5af998c40d2fbe4a172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= Date: Wed, 15 Dec 2021 15:39:57 +0100 Subject: [PATCH 10/10] gha: install -y --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index b508a40..b06c377 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -33,7 +33,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24 CIBW_BEFORE_BUILD: | apt-get update - apt-get install libeigen3-dev libcgal-dev + apt-get install -y libeigen3-dev libcgal-dev CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* CIBW_SKIP: "*-musllinux*" # Be a little economical here and only build native archs. Otherwise,