Skip to content

Commit 4430d84

Browse files
committed
Add build action
1 parent d11d4ed commit 4430d84

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,29 @@ jobs:
4242
run: tox -e docs
4343
env:
4444
PYTHON_ISAL_LINK_DYNAMIC: True
45+
twine_check:
46+
needs: lint
47+
runs-on: ${{ matrix.os }}
48+
strategy:
49+
matrix:
50+
python-version:
51+
- 3.6
52+
os: [ "macos-latest", "ubuntu-latest" ]
53+
steps:
54+
- uses: actions/[email protected]
55+
with:
56+
submodules: recursive
57+
- name: Set up Python ${{ matrix.python-version }}
58+
uses: actions/[email protected]
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
- name: Install twine, cython wheel and upgrade setuptools
62+
run: pip install --upgrade twine cython wheel setuptools
63+
- name: create dists
64+
run: python setup.py sdist bdist_wheel
65+
- name: check dists
66+
run: twine check dist/*
67+
4568
test-static:
4669
needs: lint
4770
runs-on: ${{ matrix.os }}
@@ -98,3 +121,30 @@ jobs:
98121
run: tox -e py3
99122
env:
100123
PYTHON_ISAL_LINK_DYNAMIC: True
124+
125+
buildwheels:
126+
runs-on: ${{ matrix.os }}
127+
needs: [lint, docs, test-static, test-dynamic, twine_check]
128+
if: startsWith(github.ref, 'refs/tags')
129+
strategy:
130+
matrix:
131+
os: [ "macos-latest", "ubuntu-latest" ]
132+
steps:
133+
- uses: actions/[email protected]
134+
with:
135+
submodules: recursive
136+
- uses: actions/setup-python@v2
137+
name: Install Python
138+
- name: Install cibuildwheel
139+
run: python -m pip install cibuildwheel==1.8.0
140+
env:
141+
CIBW_BUILD: py36,py37,py38,py39
142+
- name: Build wheels
143+
run: cibuildwheel --outputdir dist
144+
- name: Build sdist
145+
if: runner.os == "Linux"
146+
run: python setup.py sdist
147+
- uses: actions/upload-artifact@v2
148+
with:
149+
name: ${{matrix.os}}_wheels
150+
path: wheelhouse/

0 commit comments

Comments
 (0)