Skip to content

Commit

Permalink
update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nmwsharp committed Dec 10, 2021
1 parent f896e17 commit 56ac55e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,28 @@ on:
- master
tags:
- v*
pull_request:
branches:
- master

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}

# Only run if the commit message contains '[ci build]' OR always run if it's a tag
if: "contains(toJSON(github.event.commits.*.message), '[ci build]') || contains(github.ref, 'refs/tags')"
# This will not respect the tag if it appears in a pull request commit message. Those builds always show up as 'synchronize' events, and there is no easy way to get the corresponding commit messages. We instead pull the PR title to check for tags.
# More info here: https://github.community/t/accessing-commit-message-in-pull-request-event/17158/13
if: "contains(toJSON(github.event.commits.*.message), '[ci build]') || contains(toJSON(github.event.pull_request.title), '[ci build]') || contains(github.ref, 'refs/tags')"

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15]
env:
CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD: "cp3*-manylinux_x86_64 cp3*-manylinux_i686 cp3*-macosx_x86_64 cp3*-win_amd64 cp3*-win32"
CIBW_BUILD: "cp3*-manylinux_x86_64 cp3*-manylinux_i686 cp3*-macosx_x86_64 cp3*-macosx_universal2 cp3*-macosx_arm64 cp3*-win_amd64 cp3*-win32"
#CIBW_BUILD: "cp36-manylinux_x86_64 cp36-manylinux_i686 cp36-macosx_x86_64 cp36-win_amd64 cp36-win32" # a few wheels for quick test runs
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_BEFORE_BUILD_LINUX : "yum remove -y cmake && python -m pip install cmake"

steps:
Expand All @@ -37,7 +43,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.7.4
python -m pip install cibuildwheel==2.3.0
- name: Package source distribution
Expand Down Expand Up @@ -74,5 +80,6 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
# To test: repository_url: https://test.pypi.org/legacy/

0 comments on commit 56ac55e

Please sign in to comment.