From 13a608ffb3bd472aaf6e6142028ebb99052bf49f Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Fri, 15 Nov 2024 12:42:20 -0700 Subject: [PATCH 1/5] Update Wheel Builder for New Version --- .github/workflows/release_wheel_creation.yml | 21 +++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release_wheel_creation.yml b/.github/workflows/release_wheel_creation.yml index ecaf6afbd59..bc0372eea5a 100644 --- a/.github/workflows/release_wheel_creation.yml +++ b/.github/workflows/release_wheel_creation.yml @@ -14,8 +14,11 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -jobs: +defaults: + run: + shell: bash -l {0} +jobs: native_wheels: name: Build wheels (${{ matrix.wheel-version }}) on ${{ matrix.os }} for native and cross-compiled architecture runs-on: ${{ matrix.os }} @@ -56,8 +59,13 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Create pyproject.toml + run: | + echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml + cat $GITHUB_WORKSPACE/pyproject.toml + ls -la $GITHUB_WORKSPACE - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.21.3 with: output-dir: dist env: @@ -67,7 +75,6 @@ jobs: CIBW_BUILD: ${{ matrix.wheel-version }} CIBW_SKIP: "*-musllinux*" CIBW_BUILD_VERBOSITY: 1 - CIBW_BEFORE_BUILD: pip install cython pybind11 CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}" - uses: actions/upload-artifact@v4 with: @@ -110,8 +117,13 @@ jobs: uses: docker/setup-qemu-action@v3 with: platforms: all + - name: Create pyproject.toml + run: | + echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml + cat $GITHUB_WORKSPACE/pyproject.toml + ls -la $GITHUB_WORKSPACE - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.21.3 with: output-dir: dist env: @@ -119,7 +131,6 @@ jobs: CIBW_BUILD: ${{ matrix.wheel-version }} CIBW_SKIP: "*-musllinux*" CIBW_BUILD_VERBOSITY: 1 - CIBW_BEFORE_BUILD: pip install cython pybind11 CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}" - uses: actions/upload-artifact@v4 with: From 1734f0ee59e604bee9da38044edd628d1d685f92 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Fri, 15 Nov 2024 12:45:15 -0700 Subject: [PATCH 2/5] Set up a monthly test just in case --- .github/workflows/release_wheel_creation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release_wheel_creation.yml b/.github/workflows/release_wheel_creation.yml index bc0372eea5a..a60f0902c74 100644 --- a/.github/workflows/release_wheel_creation.yml +++ b/.github/workflows/release_wheel_creation.yml @@ -4,6 +4,8 @@ on: push: tags: - '*' + schedule: + - cron: '0 0 3 * *' workflow_dispatch: inputs: git-ref: From d410c0d331365b934d95f092014d65bac5dbd32d Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Fri, 15 Nov 2024 12:51:06 -0700 Subject: [PATCH 3/5] Add in two relevant comments --- .github/workflows/release_wheel_creation.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release_wheel_creation.yml b/.github/workflows/release_wheel_creation.yml index a60f0902c74..8af5bd93151 100644 --- a/.github/workflows/release_wheel_creation.yml +++ b/.github/workflows/release_wheel_creation.yml @@ -51,6 +51,7 @@ jobs: TARGET: 'py313' GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" + # We use pure python for any Windows/python greater than 3.10 exclude: - wheel-version: 'cp311*' os: windows-latest @@ -63,6 +64,10 @@ jobs: - uses: actions/checkout@v4 - name: Create pyproject.toml run: | + # Per the cibuildwheel documentation, you can technically use + # CIBW_BEFORE_BUILD to do these steps; however, as of the newest + # version (2.21.3) this feature does not work. This is a hack + # to make cibuildwheel recognize our pre-build requirements echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml cat $GITHUB_WORKSPACE/pyproject.toml ls -la $GITHUB_WORKSPACE @@ -121,6 +126,10 @@ jobs: platforms: all - name: Create pyproject.toml run: | + # Per the cibuildwheel documentation, you can technically use + # CIBW_BEFORE_BUILD to do these steps; however, as of the newest + # version (2.21.3) this feature does not work. This is a hack + # to make cibuildwheel recognize our pre-build requirements echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml cat $GITHUB_WORKSPACE/pyproject.toml ls -la $GITHUB_WORKSPACE From 3fb29c56aaa74f6f365e2e96a8c45bfeb92d1f17 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Fri, 15 Nov 2024 12:52:19 -0700 Subject: [PATCH 4/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8392ac8106..d598c83eb43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ CHANGELOG - Remove pin to Gurobi 10.0.3 (#3393) - Add Python 3.13 to Testing Infrastructure (#3401) - Resolve `timeout()` failures on Windows/py3.13 (#3415) + - Update release wheel builder to support Python 3.13 (#3419) - GDP - Fix performance degradation in hull transformation (#3366) - Contributed Packages From b240c0eff6a87c2ffe03fa49d197981ca126a9f6 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Fri, 15 Nov 2024 12:53:23 -0700 Subject: [PATCH 5/5] Update changelog (again) --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d598c83eb43..b6b7652ec08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,9 +52,8 @@ CHANGELOG - Remove Octeract from NEOS solvers list (and other testing fixes) (#3374) - Guard tests against broken Gurobi licenses (#3383) - Remove pin to Gurobi 10.0.3 (#3393) - - Add Python 3.13 to Testing Infrastructure (#3401) + - Add Python 3.13 to Testing Infrastructure (#3401, #3419) - Resolve `timeout()` failures on Windows/py3.13 (#3415) - - Update release wheel builder to support Python 3.13 (#3419) - GDP - Fix performance degradation in hull transformation (#3366) - Contributed Packages