@@ -2,6 +2,9 @@ name: Continous integration
22
33on :
44 pull_request :
5+ paths-ignore :
6+ - ' docs/**'
7+ - ' *.rst'
58 push :
69 branches :
710 - develop
1114
1215jobs :
1316 lint :
14- runs-on : ubuntu-20.04
17+ runs-on : ubuntu-latest
1518 steps :
16191720 with :
1821 submodules : recursive
19- - name : Set up Python 3.6
22+ - name : Set up Python 3.7
20232124 with :
22- python-version : 3.6
25+ python-version : 3.7
2326 - name : Install tox
2427 run : pip install tox
2528 - name : Lint
@@ -31,16 +34,15 @@ jobs:
3134 tox_env :
3235 - docs
3336 - twine_check
34- needs : lint
35- runs-on : ubuntu-20.04
37+ runs-on : ubuntu-latest
3638 steps :
37393840 with :
3941 submodules : recursive
40- - name : Set up Python 3.6
42+ - name : Set up Python 3.7
41434244 with :
43- python-version : 3.6
45+ python-version : 3.7
4446 - name : Install isal
4547 run : sudo apt-get install libisal-dev
4648 - name : Install tox and upgrade setuptools and pip
@@ -51,23 +53,20 @@ jobs:
5153 PYTHON_ISAL_LINK_DYNAMIC : True
5254
5355 test-static :
54- needs : lint
5556 runs-on : ${{ matrix.os }}
5657 strategy :
5758 matrix :
5859 python-version :
59- - " 3.6"
6060 - " 3.7"
6161 - " 3.8"
6262 - " 3.9"
63- - " pypy-3.6"
64- - " pypy-3.7"
63+ - " 3.10"
6564 os : ["ubuntu-latest"]
6665 include :
6766 - os : " macos-latest"
68- python-version : 3.6
67+ python-version : 3.7
6968 - os : " windows-latest"
70- python-version : 3.6
69+ python-version : 3.7
7170 steps :
72717372 with :
@@ -79,12 +78,12 @@ jobs:
7978 - name : Install tox and upgrade setuptools
8079 run : pip install --upgrade tox setuptools
8180 - name : Install build dependencies (Linux) # Yasm in pypa/manylinux images.
82- run : sudo apt install yasm
81+ run : sudo apt install nasm
8382 if : runner.os == 'Linux'
8483 - name : Install build dependencies (Macos)
8584 # Install yasm because nasm does not work when building wheels.
8685 # 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
8887 if : runner.os == 'macOS'
8988 - name : Set MSVC developer prompt
9089@@ -100,25 +99,23 @@ jobs:
10099 test-arch :
101100 if : startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
102101 runs-on : " ubuntu-latest"
103- needs : lint
104102 strategy :
105103 matrix :
106- distro : [ "ubuntu20.04 " ]
104+ distro : [ "ubuntu_latest " ]
107105 arch : ["aarch64"]
108106 steps :
109107110108 with :
111109 submodules : recursive
112- - uses : uraimo/run-on-arch-action@v2.0.9
110+ - uses : uraimo/run-on-arch-action@v2.2.0
113111 name : Build & run test
114112 with :
115113 arch : ${{ matrix.arch }}
116114 distro : ${{ matrix.distro }}
117115 install : |
118116 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
120118 run : |
121- python3 -m pip install -U setuptools pip wheel tox
122119 tox
123120
124121 # Test if the python-isal conda package can be build. Which is linked
@@ -130,14 +127,9 @@ jobs:
130127 # This is needed for miniconda, see:
131128 # https://github.com/marketplace/actions/setup-miniconda#important.
132129 shell : bash -l {0}
133- needs : lint
134130 strategy :
135131 matrix :
136132 os : ["ubuntu-latest", "macos-latest", "windows-latest"]
137- python_version : ["python"]
138- include :
139- - os : " ubuntu-latest"
140- python_version : " pypy"
141133 steps :
142134143135 with :
@@ -147,7 +139,7 @@ jobs:
147139 with :
148140 channels : conda-forge,defaults
149141 - name : Install requirements (universal)
150- run : conda install isa-l ${{ matrix.python_version}} tox
142+ run : conda install isa-l python tox
151143 - name : Set MSVC developer prompt
152144153145 if : runner.os == 'Windows'
@@ -159,10 +151,33 @@ jobs:
159151 deploy :
160152 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
161153 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
163160 strategy :
164161 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
166181 steps :
167182168183 with :
@@ -172,7 +187,7 @@ jobs:
172187 - name : Install cibuildwheel twine wheel
173188 run : python -m pip install cibuildwheel twine wheel
174189 - name : Install build dependencies (Macos)
175- run : brew install yasm automake autoconf
190+ run : brew install nasm automake autoconf
176191 if : runner.os == 'macOS'
177192 - name : Set MSVC developer prompt
178193@@ -181,27 +196,43 @@ jobs:
181196182197 if : runner.os == 'Windows'
183198 - name : Set up QEMU
184- if : runner.os == 'Linux'
199+ if : ${{ runner.os == 'Linux' && matrix.cibw_archs_linux == 'aarch64'}}
185200186201 with :
187202 platforms : arm64
188203 - name : Build wheels
189204 run : cibuildwheel --output-dir dist
190205 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 }}
195209 # Fully test the build wheels again.
196210 CIBW_TEST_REQUIRES : " pytest"
197211 # Simple test that requires the project to be build correctly
198212 CIBW_TEST_COMMAND : >-
199213 pytest {project}/tests/test_igzip.py
200214 {project}/tests/test_compat.py
201215 {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"
202227 - 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/"
205236 - name : Publish package to TestPyPI
206237 # pypa/gh-action-pypi-publish@master does not work on OSX
207238 # Alpha, Beta and dev releases contain a - in the tag.
@@ -215,4 +246,4 @@ jobs:
215246 run : twine upload dist/*
216247 env :
217248 TWINE_USERNAME : __token__
218- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
249+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments