|
5 | 5 | types: [created, edited] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - flake8: |
9 | | - runs-on: ubuntu-latest |
10 | | - steps: |
11 | | - - uses: actions/checkout@v2 |
12 | | - - name: Set up Python |
13 | | - uses: actions/setup-python@v1 |
14 | | - with: |
15 | | - python-version: 3.8 |
16 | | - - name: Install dependencies |
17 | | - run: | |
18 | | - python -m pip install --upgrade pip |
19 | | - pip install flake8 |
20 | | - - name: Lint with flake8 for syntax errors |
21 | | - run: | |
22 | | - pip install flake8 |
23 | | - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
24 | | - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
25 | | - manylinux: |
26 | | - runs-on: ubuntu-latest |
27 | | - needs: flake8 |
28 | | - steps: |
29 | | - - uses: actions/checkout@v2 |
30 | | - - name: Set up Python |
31 | | - uses: actions/setup-python@v1 |
32 | | - with: |
33 | | - python-version: 3.8 |
34 | | - - name: Install dependencies |
35 | | - run: | |
36 | | - python -m pip install --upgrade pip |
37 | | - pip install twine |
38 | | - - name: Build manylinux Python wheels |
39 | | - uses: RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64 |
40 | | - with: |
41 | | - python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38' |
42 | | - build-requirements: 'cython numpy scipy scikit-learn' |
43 | | - system-packages: '' |
44 | | - package-path: '' |
45 | | - pip-wheel-args: '--no-deps' |
46 | | - - name: Publish wheels to PyPI |
47 | | - env: |
48 | | - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
49 | | - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
50 | | - run: | |
51 | | - twine upload wheelhouse/*-manylinux*.whl |
52 | | - |
53 | | - |
54 | | - build-windows: |
55 | | - runs-on: windows-latest |
56 | | - needs: flake8 |
| 8 | + build_wheels_macos: |
| 9 | + name: Build wheels |
| 10 | + runs-on: ${{ matrix.os }} |
57 | 11 | strategy: |
58 | 12 | matrix: |
59 | | - python: ['3.6','3.7','3.8'] |
| 13 | + os: [ubuntu-latest, windows-latest, macos-latest] |
60 | 14 | steps: |
61 | | - - uses: actions/checkout@v2 |
62 | | - - uses: conda-incubator/setup-miniconda@v2 |
63 | | - with: |
64 | | - python-version: ${{ matrix.python }} |
65 | | - activate-environment: loop |
66 | | - - name: Installing dependencies |
67 | | - shell: bash -l {0} |
68 | | - run: | |
69 | | - python --version |
70 | | - pip install -r requirements.txt |
71 | | - conda info |
72 | | - conda list |
73 | | - - name: Building Loop wheel and installing |
74 | | - shell: bash -l {0} |
75 | | - run: | |
76 | | - python setup.py bdist_wheel |
77 | | - python setup.py bdist |
78 | | - - name: Publish wheels to PyPI |
79 | | - env: |
80 | | - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
81 | | - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
82 | | - shell: bash -l {0} |
83 | | - run : | |
84 | | - pip install twine |
85 | | - twine upload dist/*.whl |
86 | | - |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + |
| 17 | + - name: Build wheels |
| 18 | + uses: joerick/cibuildwheel@v1.10.0 |
| 19 | + env: |
| 20 | + CIBW_ARCHS_MACOS: x86_64 universal2 |
| 21 | + CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*" |
| 22 | + CIBW_BEFORE_BUILD: "pip install numpy==1.18 cython" #make sure numpy is the same version as required by LS |
| 23 | + |
| 24 | + - name: Publish wheels to PyPI |
| 25 | + env: |
| 26 | + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 27 | + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 28 | + run : | |
| 29 | + pip install twine |
| 30 | + python -m twine upload ./wheelhouse/*.whl |
0 commit comments