6
6
branches :
7
7
- develop
8
8
- main
9
- tags :
10
- - " *"
11
9
12
10
13
11
jobs :
44
42
run : tox -e docs
45
43
env :
46
44
PYTHON_ISAL_LINK_DYNAMIC : True
47
- mypy :
48
- needs : lint
49
- runs-on : ubuntu-20.04
50
- steps :
51
-
52
- with :
53
- submodules : recursive
54
- - name : Set up Python 3.6
55
-
56
- with :
57
- python-version : 3.6
58
- - name : Install isal
59
- run : sudo apt-get install libisal-dev
60
- - name : Install tox and upgrade setuptools and pip
61
- run : pip install --upgrade tox setuptools pip
62
- - name : Mypy checks
63
- run : tox -e mypy
64
- env :
65
- PYTHON_ISAL_LINK_DYNAMIC : True
66
- twine_check :
67
- needs : lint
68
- runs-on : ${{ matrix.os }}
69
- strategy :
70
- matrix :
71
- python-version :
72
- - 3.6
73
- os : ["ubuntu-latest" ]
74
- steps :
75
-
76
- with :
77
- submodules : recursive
78
- - name : Set up Python ${{ matrix.python-version }}
79
-
80
- with :
81
- python-version : ${{ matrix.python-version }}
82
- - name : Install build dependencies (Linux) # Yasm in pypa/manylinux images.
83
- run : sudo apt install yasm
84
- if : runner.os == 'Linux'
85
- - name : Install build dependencies (Macos)
86
- run : brew install yasm automake autoconf
87
- if : runner.os == 'macOS'
88
- - name : Install twine, cython wheel and upgrade setuptools
89
- run : pip install --upgrade twine cython wheel setuptools
90
- - name : create dists
91
- run : python setup.py sdist bdist_wheel
92
- - name : check dists
93
- run : twine check dist/*
94
-
95
45
test-static :
96
46
needs : lint
97
47
runs-on : ${{ matrix.os }}
@@ -102,10 +52,7 @@ jobs:
102
52
- 3.7
103
53
- 3.8
104
54
- 3.9
105
- os : ["ubuntu-latest"]
106
- include :
107
- - os : " macos-latest"
108
- python-version : 3.8
55
+ os : ["macos-latest", "ubuntu-latest", "windows-latest"]
109
56
steps :
110
57
111
58
with :
122
69
- name : Install build dependencies (Macos)
123
70
run : brew install yasm automake autoconf
124
71
if : runner.os == 'macOS'
72
+ - name : Install build dependencies (Windows)
73
+ run : choco install yasm visualstudio2019-workload-universalbuildtools
74
+ if : runner.os == 'Windows'
125
75
- name : Run tests
126
76
run : tox -e py3
127
77
- name : Upload coverage report
134
84
matrix :
135
85
python-version :
136
86
- 3.6
87
+ - 3.7
88
+ - 3.8
89
+ - 3.9
137
90
os : ["ubuntu-20.04"]
138
91
steps :
139
92
@@ -147,52 +100,8 @@ jobs:
147
100
run : sudo apt-get install libisal-dev
148
101
- name : Install tox and upgrade setuptools and pip
149
102
run : pip install --upgrade tox setuptools pip
103
+
150
104
- name : Run tests (dynamic link)
151
105
run : tox -e py3
152
106
env :
153
107
PYTHON_ISAL_LINK_DYNAMIC : True
154
-
155
- deploy :
156
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
157
- runs-on : ${{ matrix.os }}
158
- needs : [lint, docs, test-static, test-dynamic, twine_check]
159
- strategy :
160
- matrix :
161
- os : [ "macos-latest", "ubuntu-latest" ]
162
- steps :
163
-
164
- with :
165
- submodules : recursive
166
- - uses : actions/setup-python@v2
167
- name : Install Python
168
- - name : Install cibuildwheel twine
169
- run : python -m pip install cibuildwheel twine
170
- - name : Install build dependencies (Macos)
171
- run : brew install yasm automake autoconf
172
- if : runner.os == 'macOS'
173
- - name : Build wheels
174
- run : cibuildwheel --output-dir dist
175
- env :
176
- CIBW_BUILD : " cp3{6,7,8,9}-*"
177
- CIBW_SKIP : " *-win32 *-manylinux_i686" # Skip 32 bit.
178
- CIBW_MANYLINUX_X86_64_IMAGE : " manylinux2014"
179
- # Below command fails when data is not correctly statically linked
180
- # Full tests not needed: these are done prior to building.
181
- CIBW_TEST_COMMAND : " python -c 'from isal import isal_zlib, igzip; isal_zlib.adler32(b\" bla\" )'"
182
- - name : Build sdist
183
- if : " runner.os == 'Linux'"
184
- run : python setup.py sdist
185
- - name : Publish package to TestPyPI
186
- # pypa/gh-action-pypi-publish@master does not work on OSX
187
- # Alpha, Beta and dev releases contain a - in the tag.
188
- if : contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
189
- run : twine upload --repository-url https://test.pypi.org/legacy/ dist/*
190
- env :
191
- TWINE_USERNAME : __token__
192
- TWINE_PASSWORD : ${{ secrets.TEST_PYPI_API_TOKEN }}
193
- - name : Publish package to PyPI
194
- if : " !contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
195
- run : twine upload dist/*
196
- env :
197
- TWINE_USERNAME : __token__
198
- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments