-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* try some new wheels logic * try it! * wheels! * just need one file for wheels * typos
- Loading branch information
Showing
4 changed files
with
82 additions
and
139 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: wheels | ||
|
||
on: [pull_request, release] | ||
|
||
env: | ||
# only needed for Py3.5 on Windows for some reason | ||
# ideally, would be picked up from pyproject.toml | ||
CIBW_BEFORE_BUILD: pip install scikit-build cython cmake | ||
|
||
CIBW_TEST_REQUIRES: pytest numpy | ||
CIBW_TEST_COMMAND: pytest {project}/tests | ||
|
||
jobs: | ||
make_wheels: | ||
name: Wheels | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
|
||
steps: | ||
|
||
## Setup Env | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install Deps | ||
# only need scikit-build for the linux sdist step | ||
run: pip install --upgrade cibuildwheel scikit-build | ||
|
||
- uses: ilammy/[email protected] | ||
if: startsWith(matrix.os, 'windows') | ||
|
||
## Build across platforms | ||
|
||
- name: Build Windows | ||
if: startsWith(matrix.os, 'windows') | ||
env: | ||
CC: cl.exe | ||
CXX: cl.exe | ||
CIBW_SKIP: pp* cp27* *-win32 | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- name: Build Mac | ||
if: startsWith(matrix.os, 'mac') | ||
env: | ||
CIBW_SKIP: pp* | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- name: Build Linux | ||
if: startsWith(matrix.os, 'ubuntu') | ||
env: | ||
CIBW_SKIP: pp* cp27* *-manylinux_i686 | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
python setup.py sdist --dist-dir=wheelhouse | ||
## Upload | ||
|
||
- name: Upload artifacts to GitHub | ||
if: github.event_name == 'release' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: ./wheelhouse | ||
|
||
- name: Release to PyPI | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.pypi_password }} | ||
run: | | ||
python -m pip install --upgrade twine | ||
twine upload wheelhouse/* |