Skip to content

Commit

Permalink
streamline wheel building
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Neches committed May 15, 2024
1 parent 3710244 commit f8a5e55
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} for python ${{ matrix.python-version }}
# name: Build wheels on ${{ matrix.os }} for python ${{ matrix.python-version }}
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -19,28 +20,33 @@ jobs:
python-version: "3.12"
steps:
- uses: actions/checkout@v4

# Set up miniconda env
#- uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# python-version: ${{ matrix.python-version }}
#- name: Conda info
# shell: bash -l {0}
# run: conda info
# install numpy and scipy with conda, so we get the system dependencies
#- name: Install numpy and scipy
# shell: bash -l {0}
# run : conda install numpy scipy

# Used to host cibuildwheel

- uses: actions/setup-python@v5
with :
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install test dependencies
run: |
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 SuchTree --count --ignore=E201,E202,E203 --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 SuchTree --count --ignore=E201,E202,E203 --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: pytest

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.18.0

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
Expand All @@ -54,9 +60,9 @@ jobs:
# I'm not sure what's up with cp310-manylinux_i686, but
# doesn't seem to set up LAPACK, BLAS and ATLAS, so the
# scipy build fails.

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
merge-multiple: true
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/{{ matrix.runs-on }}.whl
# merge-multiple: true

0 comments on commit f8a5e55

Please sign in to comment.