-
Notifications
You must be signed in to change notification settings - Fork 51
70 lines (59 loc) · 1.79 KB
/
buildwheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build source and binary wheels
on:
push:
branches:
- main
pull_request:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
steps:
- uses: actions/checkout@v3
- name: Build wheels
env:
CIBW_BUILD: cp{37,38,39,310,311}-*
CIBW_TEST_EXTRAS: "dev"
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: pytest {project}/crosshair -m smoke
CIBW_BUILD_VERBOSITY: 1
# Skip tests that don't have corresponding z3 binary builds:
CIBW_TEST_SKIP: "*-*linux_{i686,aarch64,ppc64le,s390x} *-musllinux*"
uses: pypa/[email protected]
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: python3 setup.py sdist
- name: Test sdist build
run: pipx install --verbose dist/*.tar.gz
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# Publish when a GitHub Release is created:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}