@@ -2,6 +2,9 @@ name: Continous integration
2
2
3
3
on :
4
4
pull_request :
5
+ paths-ignore :
6
+ - ' docs/**'
7
+ - ' *.rst'
5
8
push :
6
9
branches :
7
10
- develop
11
14
12
15
jobs :
13
16
lint :
14
- runs-on : ubuntu-20.04
17
+ runs-on : ubuntu-latest
15
18
steps :
16
19
17
20
with :
18
21
submodules : recursive
19
- - name : Set up Python 3.6
22
+ - name : Set up Python 3.7
20
23
21
24
with :
22
- python-version : 3.6
25
+ python-version : 3.7
23
26
- name : Install tox
24
27
run : pip install tox
25
28
- name : Lint
@@ -31,16 +34,15 @@ jobs:
31
34
tox_env :
32
35
- docs
33
36
- twine_check
34
- needs : lint
35
- runs-on : ubuntu-20.04
37
+ runs-on : ubuntu-latest
36
38
steps :
37
39
38
40
with :
39
41
submodules : recursive
40
- - name : Set up Python 3.6
42
+ - name : Set up Python 3.7
41
43
42
44
with :
43
- python-version : 3.6
45
+ python-version : 3.7
44
46
- name : Install isal
45
47
run : sudo apt-get install libisal-dev
46
48
- name : Install tox and upgrade setuptools and pip
@@ -51,23 +53,20 @@ jobs:
51
53
PYTHON_ISAL_LINK_DYNAMIC : True
52
54
53
55
test-static :
54
- needs : lint
55
56
runs-on : ${{ matrix.os }}
56
57
strategy :
57
58
matrix :
58
59
python-version :
59
- - " 3.6"
60
60
- " 3.7"
61
61
- " 3.8"
62
62
- " 3.9"
63
- - " pypy-3.6"
64
- - " pypy-3.7"
63
+ - " 3.10"
65
64
os : ["ubuntu-latest"]
66
65
include :
67
66
- os : " macos-latest"
68
- python-version : 3.6
67
+ python-version : 3.7
69
68
- os : " windows-latest"
70
- python-version : 3.6
69
+ python-version : 3.7
71
70
steps :
72
71
73
72
with :
@@ -79,12 +78,12 @@ jobs:
79
78
- name : Install tox and upgrade setuptools
80
79
run : pip install --upgrade tox setuptools
81
80
- name : Install build dependencies (Linux) # Yasm in pypa/manylinux images.
82
- run : sudo apt install yasm
81
+ run : sudo apt install nasm
83
82
if : runner.os == 'Linux'
84
83
- name : Install build dependencies (Macos)
85
84
# Install yasm because nasm does not work when building wheels.
86
85
# Probably because of nasm-filter.sh not filtering all flags that can not be used.
87
- run : brew install yasm automake autoconf
86
+ run : brew install nasm automake autoconf
88
87
if : runner.os == 'macOS'
89
88
- name : Set MSVC developer prompt
90
89
@@ -100,25 +99,23 @@ jobs:
100
99
test-arch :
101
100
if : startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
102
101
runs-on : " ubuntu-latest"
103
- needs : lint
104
102
strategy :
105
103
matrix :
106
- distro : [ "ubuntu20.04 " ]
104
+ distro : [ "ubuntu_latest " ]
107
105
arch : ["aarch64"]
108
106
steps :
109
107
110
108
with :
111
109
submodules : recursive
112
- - uses : uraimo/run-on-arch-action@v2.0.9
110
+ - uses : uraimo/run-on-arch-action@v2.2.0
113
111
name : Build & run test
114
112
with :
115
113
arch : ${{ matrix.arch }}
116
114
distro : ${{ matrix.distro }}
117
115
install : |
118
116
apt-get update -q -y
119
- apt-get install -q -y python3 python3-pip gcc binutils automake autoconf libtool
117
+ apt-get install -q -y python3 python3-pip gcc binutils automake autoconf libtool tox
120
118
run : |
121
- python3 -m pip install -U setuptools pip wheel tox
122
119
tox
123
120
124
121
# Test if the python-isal conda package can be build. Which is linked
@@ -130,14 +127,9 @@ jobs:
130
127
# This is needed for miniconda, see:
131
128
# https://github.com/marketplace/actions/setup-miniconda#important.
132
129
shell : bash -l {0}
133
- needs : lint
134
130
strategy :
135
131
matrix :
136
132
os : ["ubuntu-latest", "macos-latest", "windows-latest"]
137
- python_version : ["python"]
138
- include :
139
- - os : " ubuntu-latest"
140
- python_version : " pypy"
141
133
steps :
142
134
143
135
with :
@@ -147,7 +139,7 @@ jobs:
147
139
with :
148
140
channels : conda-forge,defaults
149
141
- name : Install requirements (universal)
150
- run : conda install isa-l ${{ matrix.python_version}} tox
142
+ run : conda install isa-l python tox
151
143
- name : Set MSVC developer prompt
152
144
153
145
if : runner.os == 'Windows'
@@ -159,10 +151,33 @@ jobs:
159
151
deploy :
160
152
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
161
153
runs-on : ${{ matrix.os }}
162
- needs : [lint, package-checks, test-static, test-dynamic, test-arch]
154
+ needs :
155
+ - lint
156
+ - package-checks
157
+ - test-static
158
+ - test-dynamic
159
+ - test-arch
163
160
strategy :
164
161
matrix :
165
- os : ["macos-latest", "ubuntu-latest", "windows-latest"]
162
+ os :
163
+ - ubuntu-latest
164
+ - macos-latest
165
+ - windows-latest
166
+ cibw_archs_linux : ["x86_64"]
167
+ cibw_before_all_linux :
168
+ - >-
169
+ curl -o nasm-2.15.05.tar.gz https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.gz &&
170
+ tar -xzvf nasm-2.15.05.tar.gz &&
171
+ cd nasm-2.15.05/ &&
172
+ ./autogen.sh &&
173
+ ./configure &&
174
+ make nasm &&
175
+ install -c nasm /usr/bin/nasm
176
+ build_sdist : [true]
177
+ include :
178
+ - os : " ubuntu-latest"
179
+ cibw_archs_linux : " aarch64"
180
+ cibw_before_all_linux : " true" # The true command exits with 0
166
181
steps :
167
182
168
183
with :
@@ -172,7 +187,7 @@ jobs:
172
187
- name : Install cibuildwheel twine wheel
173
188
run : python -m pip install cibuildwheel twine wheel
174
189
- name : Install build dependencies (Macos)
175
- run : brew install yasm automake autoconf
190
+ run : brew install nasm automake autoconf
176
191
if : runner.os == 'macOS'
177
192
- name : Set MSVC developer prompt
178
193
@@ -181,27 +196,43 @@ jobs:
181
196
182
197
if : runner.os == 'Windows'
183
198
- name : Set up QEMU
184
- if : runner.os == 'Linux'
199
+ if : ${{ runner.os == 'Linux' && matrix.cibw_archs_linux == 'aarch64'}}
185
200
186
201
with :
187
202
platforms : arm64
188
203
- name : Build wheels
189
204
run : cibuildwheel --output-dir dist
190
205
env :
191
- CIBW_SKIP : " *-win32 *-manylinux_i686" # Skip 32 bit.
192
- CIBW_MANYLINUX_X86_64_IMAGE : " manylinux2014"
193
- CIBW_MANYLINUX_AARCH64_IMAGE : " manylinux2014"
194
- CIBW_ARCHS_LINUX : " x86_64 aarch64"
206
+ CIBW_SKIP : " *-win32 *-manylinux_i686 *pp3*" # Skip 32 bit and pypy
207
+ CIBW_ARCHS_LINUX : ${{ matrix.cibw_archs_linux }}
208
+ CIBW_BEFORE_ALL_LINUX : ${{ matrix.cibw_before_all_linux }}
195
209
# Fully test the build wheels again.
196
210
CIBW_TEST_REQUIRES : " pytest"
197
211
# Simple test that requires the project to be build correctly
198
212
CIBW_TEST_COMMAND : >-
199
213
pytest {project}/tests/test_igzip.py
200
214
{project}/tests/test_compat.py
201
215
{project}/tests/test_igzip_lib.py
216
+ CIBW_ENVIRONMENT_LINUX : >-
217
+ PYTHON_ISAL_BUILD_CACHE=True
218
+ PYTHON_ISAL_BUILD_CACHE_FILE=/tmp/build_cache
219
+ CFLAGS="-g0 -DNDEBUG"
220
+ CIBW_ENVIRONMENT_WINDOWS : >-
221
+ PYTHON_ISAL_BUILD_CACHE=True
222
+ PYTHON_ISAL_BUILD_CACHE_FILE=${{ runner.temp }}\build_cache
223
+ CIBW_ENVIRONMENT_MACOS : >-
224
+ PYTHON_ISAL_BUILD_CACHE=True
225
+ PYTHON_ISAL_BUILD_CACHE_FILE=${{ runner.temp }}/build_cache
226
+ CFLAGS="-g0 -DNDEBUG"
202
227
- name : Build sdist
203
- if : " runner.os == 'Linux'"
204
- run : python setup.py sdist
228
+ if : ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'x86_64'}}
229
+ run : |
230
+ pip install build
231
+ python -m build --sdist
232
+ - uses : actions/upload-artifact@v2
233
+ with :
234
+ name : " dist"
235
+ path : " dist/"
205
236
- name : Publish package to TestPyPI
206
237
# pypa/gh-action-pypi-publish@master does not work on OSX
207
238
# Alpha, Beta and dev releases contain a - in the tag.
@@ -215,4 +246,4 @@ jobs:
215
246
run : twine upload dist/*
216
247
env :
217
248
TWINE_USERNAME : __token__
218
- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
249
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments