Skip to content

Commit

Permalink
try some new wheels logic (#122)
Browse files Browse the repository at this point in the history
* try some new wheels logic

* try it!

* wheels!

* just need one file for wheels

* typos
  • Loading branch information
ajfriend authored May 27, 2020
1 parent 7521efd commit 11a3df6
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 139 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/wheels-linux.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/wheels-mac.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/wheels-windows.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/wheels.yml
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/*

0 comments on commit 11a3df6

Please sign in to comment.