Skip to content

Added Github action to build wheels. #11

Added Github action to build wheels.

Added Github action to build wheels. #11

Workflow file for this run

name: build
on:
push:
branches: master
pull_request:
branches: master
# cancels prior builds for this workflow when new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
name: Install dependencies
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
ipopt-version: ['3.14']
env:
PYTHON_VERSION: ${{ matrix.python-version }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Set Additional Envs
shell: bash
run: |
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
- name: Checkout CyIpopt
uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: test-environment
python-version: ${{ matrix.python-version }}
channels: conda-forge
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
mamba list
- 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