-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (107 loc) · 2.98 KB
/
python.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Python
on:
pull_request:
branches: [ "main" ]
release:
types: [ published ]
jobs:
linux-wheels:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64:2023-04-30-c9c30dc
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.65.0
default: true
- name: build wheels
run: bash .github/workflows/build_wheels.sh
- uses: actions/upload-artifact@v3
with:
name: linux-wheels
path: wheelhouse/
osx-wheels:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.65.0
default: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: build wheels
run: |
python3 -m pip install cffi maturin
maturin build --features python --release
- uses: actions/upload-artifact@v3
with:
name: osx-${{ matrix.python-version }}-wheel
path: target/wheels
windows-wheels:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.65.0
default: true
- uses: actions/setup-python@v4
- name: build wheels
run: |
python -m pip install cffi maturin
maturin build --features python --release
- uses: actions/upload-artifact@v3
with:
name: windows-wheels
path: target/wheels
twine:
if: github.event_name == 'release'
needs: [linux-wheels, osx-wheels, windows-wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: check
run: |
mkdir wheelhouse/
mv ./*-wheel*/*.whl wheelhouse/ || true
pip install twine
twine check wheelhouse/*.whl
- name: upload
run: twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} wheelhouse/*.whl
test:
if: github.event_name != 'release'
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: maturin
run: |
pip install maturin
maturin build --features python --release --out .
pip install --find-links=. polymers
- name: pytest
run: |
pip install pytest
pytest --verbose .
- name: pycodestyle
run: |
pip install pycodestyle
pycodestyle --verbose .
- name: pylint
run: |
pip install pylint
pylint --verbose src