From dcf3813ad944ebf2b09d47e4d8b96d201916fbbb Mon Sep 17 00:00:00 2001 From: Christian Valente Date: Thu, 27 Jun 2024 12:03:38 +0300 Subject: [PATCH 1/8] Amended conditional policy setting in CMake file. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68e24246eb..595da87831 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,7 +189,7 @@ if (BUILD_CXX) set(ipo_supported NO) message(STATUS "IPO / LTO not currently supported building HiGHS on MinGW") else() - if(CMAKE_VERSION VERSION_GREATER "3.23.0") + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") cmake_policy(SET CMP0138 NEW) endif() From cb9c3a5c6bdaeb7e2f59a678fbd095f60a99d444 Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Fri, 28 Jun 2024 23:48:10 +0200 Subject: [PATCH 2/8] Adding aarch64 build --- .github/workflows/build-wheels-push.yml | 50 ++++++++++++++----------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-wheels-push.yml b/.github/workflows/build-wheels-push.yml index 3de692b56c..07bca6eb7a 100644 --- a/.github/workflows/build-wheels-push.yml +++ b/.github/workflows/build-wheels-push.yml @@ -3,6 +3,7 @@ name: build-wheels-push # on: push on: + workflow_dispatch: release: types: - published @@ -26,8 +27,10 @@ jobs: buildplat: - [ubuntu-20.04, manylinux_x86_64] - [ubuntu-20.04, manylinux_i686] + - [ubuntu-20.04, manylinux_aarch64] - [ubuntu-20.04, musllinux_x86_64] # No OpenBlas, no test - [ubuntu-20.04, musllinux_i686] + - [ubuntu-20.04, musllinux_aarch64] - [macos-12, macosx_x86_64] - [macos-14, macosx_arm64] - [windows-2019, win_amd64] @@ -36,6 +39,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up QEMU # Required for aarch64 builds + if: matrix.buildplat == [ubuntu-20.04, manylinux_aarch64] || matrix.buildplat == [ubuntu-20.04, musllinux_aarch64] + uses: docker/setup-qemu-action@v3 + with: + platforms: all - name: Build wheels uses: pypa/cibuildwheel@v2.19 env: @@ -86,29 +94,29 @@ jobs: # with: # repository-url: https://test.pypi.org/legacy/ - upload_pypi: - name: >- - Publish highspy to PyPI - runs-on: ubuntu-latest - needs: [build_wheels, build_sdist] + # upload_pypi: + # name: >- + # Publish highspy to PyPI + # runs-on: ubuntu-latest + # needs: [build_wheels, build_sdist] - # upload to PyPI on every tag starting with 'v' - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + # # upload to PyPI on every tag starting with 'v' + # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - environment: - name: pypi - url: https://pypi.org/p/highspy + # environment: + # name: pypi + # url: https://pypi.org/p/highspy - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + # permissions: + # id-token: write # IMPORTANT: mandatory for trusted publishing - steps: - - uses: actions/download-artifact@v3 - with: - # unpacks default artifact into dist/ - # if `name: artifact` is omitted, the action will create extra parent dir - name: artifact - path: dist + # steps: + # - uses: actions/download-artifact@v3 + # with: + # # unpacks default artifact into dist/ + # # if `name: artifact` is omitted, the action will create extra parent dir + # name: artifact + # path: dist - - name: Download all - uses: pypa/gh-action-pypi-publish@release/v1 + # - name: Download all + # uses: pypa/gh-action-pypi-publish@release/v1 From 96d44c8ca1eddd039e001dd655a60e3f3058a4b2 Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Fri, 28 Jun 2024 23:49:52 +0200 Subject: [PATCH 3/8] Adding linux aarch64 build --- .github/workflows/build-wheels.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 738c42bcf7..4d273dfef2 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -21,8 +21,10 @@ jobs: buildplat: - [ubuntu-20.04, manylinux_x86_64] - [ubuntu-20.04, manylinux_i686] + - [ubuntu-20.04, manylinux_aarch64] - [ubuntu-20.04, musllinux_x86_64] # No OpenBlas, no test - [ubuntu-20.04, musllinux_i686] + - [ubuntu-20.04, musllinux_aarch64] - [macos-12, macosx_x86_64] - [macos-14, macosx_arm64] - [windows-2019, win_amd64] @@ -31,6 +33,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up QEMU # Required for aarch64 builds + if: matrix.buildplat == [ubuntu-20.04, manylinux_aarch64] || matrix.buildplat == [ubuntu-20.04, musllinux_aarch64] + uses: docker/setup-qemu-action@v3 + with: + platforms: all - name: Build wheels uses: pypa/cibuildwheel@v2.19 env: From 32a6679cd224cc9833f0f92c64e68cd7b5cc2298 Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Fri, 28 Jun 2024 23:50:49 +0200 Subject: [PATCH 4/8] Fix qemu filter --- .github/workflows/build-wheels-push.yml | 2 +- .github/workflows/build-wheels.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels-push.yml b/.github/workflows/build-wheels-push.yml index 07bca6eb7a..f71a6daa3e 100644 --- a/.github/workflows/build-wheels-push.yml +++ b/.github/workflows/build-wheels-push.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up QEMU # Required for aarch64 builds - if: matrix.buildplat == [ubuntu-20.04, manylinux_aarch64] || matrix.buildplat == [ubuntu-20.04, musllinux_aarch64] + if: matrix.buildplat[1] == 'manylinux_aarch64' || matrix.buildplat[1] == 'musllinux_aarch64' uses: docker/setup-qemu-action@v3 with: platforms: all diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 4d273dfef2..1bd93d6a86 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up QEMU # Required for aarch64 builds - if: matrix.buildplat == [ubuntu-20.04, manylinux_aarch64] || matrix.buildplat == [ubuntu-20.04, musllinux_aarch64] + if: matrix.buildplat[1] == 'manylinux_aarch64' || matrix.buildplat[1] == 'musllinux_aarch64' uses: docker/setup-qemu-action@v3 with: platforms: all From 91cabb16fe78c2e3967f54956c5a738539b9b30b Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Sat, 29 Jun 2024 00:58:13 +0200 Subject: [PATCH 5/8] Refine cibuildwheel for aarch64 --- .github/workflows/build-wheels.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 1bd93d6a86..aa658d85a7 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -34,11 +34,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up QEMU # Required for aarch64 builds - if: matrix.buildplat[1] == 'manylinux_aarch64' || matrix.buildplat[1] == 'musllinux_aarch64' + if: ${{ contains(matrix.buildplat[1], 'aarch64') }} uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Build wheels + - name: Build wheels (aarch64) + if: ${{ contains(matrix.buildplat[1], 'aarch64') }} + uses: pypa/cibuildwheel@v2.19 + env: + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS_LINUX: aarch64 + - name: Build wheels (not aarch64) + if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} From 50ee5bcecae1a809f9fe3516f7b50370ad1201f3 Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Sat, 29 Jun 2024 01:58:13 +0200 Subject: [PATCH 6/8] Aligning workflows --- .github/workflows/build-wheels-push.yml | 54 ++++++++++++++----------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-wheels-push.yml b/.github/workflows/build-wheels-push.yml index f71a6daa3e..394ea0987f 100644 --- a/.github/workflows/build-wheels-push.yml +++ b/.github/workflows/build-wheels-push.yml @@ -3,7 +3,6 @@ name: build-wheels-push # on: push on: - workflow_dispatch: release: types: - published @@ -40,11 +39,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up QEMU # Required for aarch64 builds - if: matrix.buildplat[1] == 'manylinux_aarch64' || matrix.buildplat[1] == 'musllinux_aarch64' + if: ${{ contains(matrix.buildplat[1], 'aarch64') }} uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Build wheels + - name: Build wheels (aarch64) + if: ${{ contains(matrix.buildplat[1], 'aarch64') }} + uses: pypa/cibuildwheel@v2.19 + env: + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS_LINUX: aarch64 + - name: Build wheels (not aarch64) + if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} @@ -94,29 +100,29 @@ jobs: # with: # repository-url: https://test.pypi.org/legacy/ - # upload_pypi: - # name: >- - # Publish highspy to PyPI - # runs-on: ubuntu-latest - # needs: [build_wheels, build_sdist] + upload_pypi: + name: >- + Publish highspy to PyPI + runs-on: ubuntu-latest + needs: [build_wheels, build_sdist] - # # upload to PyPI on every tag starting with 'v' - # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + # upload to PyPI on every tag starting with 'v' + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - # environment: - # name: pypi - # url: https://pypi.org/p/highspy + environment: + name: pypi + url: https://pypi.org/p/highspy - # permissions: - # id-token: write # IMPORTANT: mandatory for trusted publishing + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing - # steps: - # - uses: actions/download-artifact@v3 - # with: - # # unpacks default artifact into dist/ - # # if `name: artifact` is omitted, the action will create extra parent dir - # name: artifact - # path: dist + steps: + - uses: actions/download-artifact@v3 + with: + # unpacks default artifact into dist/ + # if `name: artifact` is omitted, the action will create extra parent dir + name: artifact + path: dist - # - name: Download all - # uses: pypa/gh-action-pypi-publish@release/v1 + - name: Download all + uses: pypa/gh-action-pypi-publish@release/v1 From 559fe61db2415fba49cc7366374a60c8080601bf Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Sat, 29 Jun 2024 02:02:12 +0200 Subject: [PATCH 7/8] Use single step build --- .github/workflows/build-wheels-push.yml | 10 ++-------- .github/workflows/build-wheels.yml | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-wheels-push.yml b/.github/workflows/build-wheels-push.yml index 394ea0987f..dbfa6222fa 100644 --- a/.github/workflows/build-wheels-push.yml +++ b/.github/workflows/build-wheels-push.yml @@ -43,17 +43,11 @@ jobs: uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Build wheels (aarch64) - if: ${{ contains(matrix.buildplat[1], 'aarch64') }} - uses: pypa/cibuildwheel@v2.19 - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} - CIBW_ARCHS_LINUX: aarch64 - - name: Build wheels (not aarch64) - if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} + - name: Build wheels uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS_LINUX: ${{ contains(matrix.buildplat[1], 'aarch64') && 'aarch64' || '' }} - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index aa658d85a7..94a2791b34 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -38,17 +38,11 @@ jobs: uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Build wheels (aarch64) - if: ${{ contains(matrix.buildplat[1], 'aarch64') }} - uses: pypa/cibuildwheel@v2.19 - env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} - CIBW_ARCHS_LINUX: aarch64 - - name: Build wheels (not aarch64) - if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} + - name: Build wheels uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS_LINUX: ${{ contains(matrix.buildplat[1], 'aarch64') && 'aarch64' || '' }} build_sdist: name: Build source distribution From 44814aed30398b2d82ad4dd9067d194698d5ff64 Mon Sep 17 00:00:00 2001 From: Marius Merschformann Date: Sat, 29 Jun 2024 02:08:55 +0200 Subject: [PATCH 8/8] Use two step build --- .github/workflows/build-wheels-push.yml | 10 ++++++++-- .github/workflows/build-wheels.yml | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-wheels-push.yml b/.github/workflows/build-wheels-push.yml index dbfa6222fa..394ea0987f 100644 --- a/.github/workflows/build-wheels-push.yml +++ b/.github/workflows/build-wheels-push.yml @@ -43,11 +43,17 @@ jobs: uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Build wheels + - name: Build wheels (aarch64) + if: ${{ contains(matrix.buildplat[1], 'aarch64') }} + uses: pypa/cibuildwheel@v2.19 + env: + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS_LINUX: aarch64 + - name: Build wheels (not aarch64) + if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} - CIBW_ARCHS_LINUX: ${{ contains(matrix.buildplat[1], 'aarch64') && 'aarch64' || '' }} - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 94a2791b34..aa658d85a7 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -38,11 +38,17 @@ jobs: uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Build wheels + - name: Build wheels (aarch64) + if: ${{ contains(matrix.buildplat[1], 'aarch64') }} + uses: pypa/cibuildwheel@v2.19 + env: + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ARCHS_LINUX: aarch64 + - name: Build wheels (not aarch64) + if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} uses: pypa/cibuildwheel@v2.19 env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} - CIBW_ARCHS_LINUX: ${{ contains(matrix.buildplat[1], 'aarch64') && 'aarch64' || '' }} build_sdist: name: Build source distribution