Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add optional build wheels in PR
  • Loading branch information
rflamary committed Apr 15, 2021
commit cf4a1aabed0ef919059b29f308436dbae21d1ad3
51 changes: 51 additions & 0 deletions .github/workflows/build_wheels_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build dist and wheels in PR

on:
release:
push:
branches:
- "*"

jobs:
build_wheels_pr:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: "contains(github.event.head_commit.message, 'build wheels')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# macos-latest, windows-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -U "cython"

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.10.0

- name: Install Visual C++ for Python 2.7
if: startsWith(matrix.os, 'windows')
run: |
choco install vcpython27 -f -y

- name: Build wheel
env:
CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version)
CIBW_BEFORE_BUILD: "pip install numpy cython"
run: |
python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v1
with:
name: wheels
path: ./wheelhouse