Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Github action to build wheels. #163

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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/[email protected]
- 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
Loading