From e8a02ada515c28605a87426e83438af3a8aa7240 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sun, 19 Feb 2023 15:17:09 +0100 Subject: [PATCH 1/4] Repair wheel with auditwheel. --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecdd38f8..d7700659 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,11 +42,14 @@ jobs: conda-build-version: '3.21.4' - name: Install basic dependencies run: | - conda install -q -y cython>=0.26 "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 + conda install -q -y cython>=0.26 "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 auditwheel conda list - name: Build wheel run: | python setup.py bdist_wheel --dist-dir=wheelhouse + for wheel in wheelhouse/*.whl; do \ + auditwheel repair $wheel \ + done unzip -l wheelhouse/*.whl conda remove ipopt numpy python -m pip install wheelhouse/*.whl From 20ee5d1bf233bf4ae344201762661ec2e5240fa5 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sun, 19 Feb 2023 15:25:44 +0100 Subject: [PATCH 2/4] Use mambaforge. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7700659..794e98af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,11 +39,11 @@ jobs: activate-environment: test-environment python-version: ${{ matrix.python-version }} channels: conda-forge - conda-build-version: '3.21.4' + miniforge-variant: Mambaforge - name: Install basic dependencies run: | - conda install -q -y cython>=0.26 "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 auditwheel - conda list + mamba install -q -y cython>=0.26 "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 auditwheel + mamba list - name: Build wheel run: | python setup.py bdist_wheel --dist-dir=wheelhouse @@ -51,6 +51,6 @@ jobs: auditwheel repair $wheel \ done unzip -l wheelhouse/*.whl - conda remove ipopt numpy + mamba remove ipopt numpy python -m pip install wheelhouse/*.whl python examples/hs071.py From 9c654e36f2d895b815a1c9a289f632b79f9fdd56 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sun, 19 Feb 2023 15:30:38 +0100 Subject: [PATCH 3/4] Bash for loop on one line. --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 794e98af..04a42218 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,9 +47,7 @@ jobs: - name: Build wheel run: | python setup.py bdist_wheel --dist-dir=wheelhouse - for wheel in wheelhouse/*.whl; do \ - auditwheel repair $wheel \ - done + for wheel in wheelhouse/*.whl; do auditwheel repair $wheel; done unzip -l wheelhouse/*.whl mamba remove ipopt numpy python -m pip install wheelhouse/*.whl From f0bc1f602415519245afe6c60638b651ba8cb73a Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Wed, 22 Feb 2023 20:59:10 +0100 Subject: [PATCH 4/4] Try cibuildwheel. --- .github/workflows/build.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04a42218..320a526c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,13 +42,18 @@ jobs: miniforge-variant: Mambaforge - name: Install basic dependencies run: | - mamba install -q -y cython>=0.26 "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 auditwheel + mamba install -q -y cython>=0.26 "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 mamba list - - name: Build wheel - run: | - python setup.py bdist_wheel --dist-dir=wheelhouse - for wheel in wheelhouse/*.whl; do auditwheel repair $wheel; done - unzip -l wheelhouse/*.whl - mamba remove ipopt numpy - python -m pip install wheelhouse/*.whl - python examples/hs071.py + - name: Build wheels + uses: pypa/cibuildwheel@v2.12.0 + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + #- name: Build wheel + #run: | + #python setup.py bdist_wheel --dist-dir=wheelhouse + #for wheel in wheelhouse/*.whl; do auditwheel repair $wheel; done + #unzip -l wheelhouse/*.whl + #mamba remove ipopt numpy + #python -m pip install wheelhouse/*.whl + #python examples/hs071.py