| 1 |
|
| 2 |
# This is a basic workflow to help you get started with Actions |
| 3 |
|
| 4 |
name: Wheels |
| 5 |
|
| 6 |
on: workflow_dispatch |
| 7 |
|
| 8 |
jobs: |
| 9 |
build_wheels: |
| 10 |
name: Build wheels for ${{ matrix.os }} |
| 11 |
runs-on: ${{ matrix.os }} |
| 12 |
strategy: |
| 13 |
matrix: |
| 14 |
os: [ubuntu-latest, windows-latest, macOS-latest] |
| 15 |
|
| 16 |
steps: |
| 17 |
- uses: actions/checkout@v2 |
| 18 |
|
| 19 |
- uses: actions/setup-python@v2 |
| 20 |
name: Install Python |
| 21 |
with: |
| 22 |
python-version: '3.8' |
| 23 |
|
| 24 |
- name: Install dependencies |
| 25 |
run: | |
| 26 |
python -m pip install --upgrade pip |
| 27 |
python -m pip install wheel |
| 28 |
python -m pip install numpy>=1.20.0 |
| 29 |
pip install -r dev-requirements.txt |
| 30 |
python setup.py install |
| 31 |
- name: Install cibuildwheel |
| 32 |
run: python -m pip install cibuildwheel==1.7.2 |
| 33 |
|
| 34 |
- name: Build wheels |
| 35 |
run: python -m cibuildwheel --output-dir wheelhouse |
| 36 |
env: |
| 37 |
CIBW_SKIP: "cp27-* cp35-* cp36-* cp39-* pp*" # skip Python 2.7 wheels |
| 38 |
CIBW_BEFORE_BUILD: "rm -rf build/" |
| 39 |
|
| 40 |
- name: Upload wheels |
| 41 |
run: | |
| 42 |
python -m pip install twine |
| 43 |
python -m twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} ./wheelhouse/*.whl |