Merge pull request #3973 from mrmundt/finalize-release-6.10.1 #66
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pyomo Release Distribution Creation | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| schedule: | |
| - cron: '0 0 3 * *' | |
| workflow_dispatch: | |
| inputs: | |
| git-ref: | |
| description: Git Hash (Optional) | |
| required: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| 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 }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| arch: [all] | |
| wheel-version: ['cp310*', 'cp311*', 'cp312*', 'cp313*', 'cp314*'] | |
| include: | |
| - wheel-version: 'cp310*' | |
| TARGET: 'py310' | |
| GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions" | |
| - wheel-version: 'cp311*' | |
| TARGET: 'py311' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| - wheel-version: 'cp312*' | |
| TARGET: 'py312' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| - wheel-version: 'cp313*' | |
| TARGET: 'py313' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| - wheel-version: 'cp314*' | |
| TARGET: 'py314' | |
| 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 | |
| - wheel-version: 'cp312*' | |
| os: windows-latest | |
| - wheel-version: 'cp313*' | |
| os: windows-latest | |
| - wheel-version: 'cp314*' | |
| os: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update README.md | |
| shell: bash | |
| run: | | |
| # Don't use "sed -i" because sed -i requires an argument on OSX | |
| sed '1,/REMOVE-EVERYTHING-BEFORE-THIS-LINE/d' README.md > README.new | |
| mv README.new README.md | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@main | |
| with: | |
| output-dir: dist | |
| env: | |
| CIBW_ARCHS_LINUX: "native" | |
| CIBW_ARCHS_MACOS: "x86_64 arm64" | |
| CIBW_ARCHS_WINDOWS: "AMD64 ARM64" | |
| CIBW_BUILD: ${{ matrix.wheel-version }} | |
| CIBW_SKIP: "*-musllinux*" | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: native_wheels-${{ matrix.os }}-${{ matrix.TARGET }} | |
| path: dist/*.whl | |
| overwrite: true | |
| alternative_wheels: | |
| name: Build wheels (${{ matrix.wheel-version }}) on ${{ matrix.os }} for aarch64 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| arch: [all] | |
| wheel-version: ['cp310*', 'cp311*', 'cp312*', 'cp313*', 'cp314*'] | |
| include: | |
| - wheel-version: 'cp310*' | |
| TARGET: 'py310' | |
| GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions" | |
| - wheel-version: 'cp311*' | |
| TARGET: 'py311' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| - wheel-version: 'cp312*' | |
| TARGET: 'py312' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| - wheel-version: 'cp313*' | |
| TARGET: 'py313' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| - wheel-version: 'cp314*' | |
| TARGET: 'py314' | |
| GLOBAL_OPTIONS: "--without-cython --with-distributable-extensions" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update README.md | |
| shell: bash | |
| run: | | |
| sed '1,/REMOVE-EVERYTHING-BEFORE-THIS-LINE/d' README.md > README.new | |
| mv README.new README.md | |
| - name: Set up QEMU | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: all | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@main | |
| with: | |
| output-dir: dist | |
| env: | |
| CIBW_ARCHS_LINUX: "aarch64" | |
| CIBW_BUILD: ${{ matrix.wheel-version }} | |
| CIBW_SKIP: "*-musllinux*" | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: alt_wheels-${{ matrix.os }}-${{ matrix.TARGET }} | |
| path: dist/*.whl | |
| overwrite: true | |
| pure_python: | |
| name: pure_python_wheel | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.12'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update README.md | |
| shell: bash | |
| run: | | |
| sed '1,/REMOVE-EVERYTHING-BEFORE-THIS-LINE/d' README.md > README.new | |
| mv README.new README.md | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine wheel setuptools pybind11 | |
| - name: Build pure python wheel | |
| run: | | |
| export PYOMO_SETUP_ARGS=--without-cython | |
| python -m build --wheel --outdir dist --config-setting="--build-option=--without-cython" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: purepythonwheel | |
| path: dist/*.whl | |
| overwrite: true | |
| generictarball: | |
| name: ${{ matrix.TARGET }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| include: | |
| - os: ubuntu-latest | |
| TARGET: generic_tarball | |
| python-version: ['3.10'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update README.md | |
| shell: bash | |
| run: | | |
| sed '1,/REMOVE-EVERYTHING-BEFORE-THIS-LINE/d' README.md > README.new | |
| mv README.new README.md | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine wheel 'setuptools>=77' pybind11 | |
| - name: Build generic tarball | |
| run: | | |
| export PYOMO_SETUP_ARGS=--without-cython | |
| python -m build --sdist --outdir dist --config-setting="--build-option=--without-cython" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: generictarball | |
| path: dist | |
| overwrite: true | |