99 tags :
1010 - " *"
1111
12-
1312jobs :
1413 lint :
1514 runs-on : ubuntu-20.04
@@ -25,26 +24,14 @@ jobs:
2524 run : pip install tox
2625 - name : Lint
2726 run : tox -e lint
28- docs :
29- needs : lint
30- runs-on : ubuntu-20.04
31- steps :
32- 33- with :
34- submodules : recursive
35- - name : Set up Python 3.6
36- 37- with :
38- python-version : 3.6
39- - name : Install isal
40- run : sudo apt-get install libisal-dev
41- - name : Install tox and upgrade setuptools and pip
42- run : pip install --upgrade tox setuptools pip
43- - name : Build docs
44- run : tox -e docs
45- env :
46- PYTHON_ISAL_LINK_DYNAMIC : True
47- mypy :
27+
28+ package-checks :
29+ strategy :
30+ matrix :
31+ tox_env :
32+ - docs
33+ - mypy
34+ - twine_check
4835 needs : lint
4936 runs-on : ubuntu-20.04
5037 steps :
@@ -59,38 +46,10 @@ jobs:
5946 run : sudo apt-get install libisal-dev
6047 - name : Install tox and upgrade setuptools and pip
6148 run : pip install --upgrade tox setuptools pip
62- - name : Mypy checks
63- run : tox -e mypy
49+ - name : Run tox -e ${{ matrix.tox_env }}
50+ run : tox -e ${{ matrix.tox_env }}
6451 env :
6552 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/*
9453
9554 test-static :
9655 needs : lint
10564 os : ["ubuntu-latest"]
10665 include :
10766 - os : " macos-latest"
108- python-version : 3.8
67+ python-version : 3.6
68+ - os : " windows-latest"
69+ python-version : 3.6
10970 steps :
1107111172 with :
@@ -120,33 +81,45 @@ jobs:
12081 run : sudo apt install yasm
12182 if : runner.os == 'Linux'
12283 - name : Install build dependencies (Macos)
123- run : brew install yasm automake autoconf
84+ run : brew install nasm automake autoconf
12485 if : runner.os == 'macOS'
86+ - name : Set MSVC developer prompt
87+ 88+ if : runner.os == 'Windows'
89+ - name : Install nasm (Windows)
90+ 91+ if : runner.os == 'Windows'
12592 - name : Run tests
12693 run : tox -e py3
12794 - name : Upload coverage report
12895 uses : codecov/codecov-action@v1
12996
97+ # Test if the python-isal conda package can be build. Which is linked
98+ # dynamically to the conda isa-l package.
13099 test-dynamic :
131100 runs-on : ${{ matrix.os }}
101+ defaults :
102+ run :
103+ # This is needed for miniconda, see:
104+ # https://github.com/marketplace/actions/setup-miniconda#important.
105+ shell : bash -l {0}
132106 needs : lint
133107 strategy :
134108 matrix :
135- python-version :
136- - 3.6
137- os : ["ubuntu-20.04"]
109+ os : ["ubuntu-latest", "macos-latest", "windows-latest"]
138110 steps :
139111140112 with :
141113 submodules : recursive
142- - name : Set up Python ${{ matrix.python-version }}
143- uses : actions /setup-python @v2.2.1
114+ - name : Install miniconda.
115+ uses : conda-incubator /setup-miniconda @v2.0.1 # https://github.com/conda-incubator/setup-miniconda.
144116 with :
145- python-version : ${{ matrix.python-version }}
146- - name : Install isal
147- run : sudo apt-get install libisal-dev
148- - name : Install tox and upgrade setuptools and pip
149- run : pip install --upgrade tox setuptools pip
117+ channels : conda-forge,defaults
118+ - name : Install requirements (universal)
119+ run : conda install isa-l python tox
120+ - name : Set MSVC developer prompt
121+ 122+ if : runner.os == 'Windows'
150123 - name : Run tests (dynamic link)
151124 run : tox -e py3
152125 env :
@@ -155,10 +128,10 @@ jobs:
155128 deploy :
156129 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
157130 runs-on : ${{ matrix.os }}
158- needs : [lint, docs , test-static, test-dynamic, twine_check ]
131+ needs : [lint, package-checks , test-static, test-dynamic]
159132 strategy :
160133 matrix :
161- os : [ "macos-latest", "ubuntu-latest" ]
134+ os : ["macos-latest", "ubuntu-latest", "windows-latest" ]
162135 steps :
163136164137 with :
@@ -168,17 +141,26 @@ jobs:
168141 - name : Install cibuildwheel twine
169142 run : python -m pip install cibuildwheel twine
170143 - name : Install build dependencies (Macos)
171- run : brew install yasm automake autoconf
144+ run : brew install nasm automake autoconf
172145 if : runner.os == 'macOS'
146+ - name : Set MSVC developer prompt
147+ 148+ if : runner.os == 'Windows'
149+ - name : Install nasm (Windows)
150+ 151+ if : runner.os == 'Windows'
152+ - name : Install cibuildwheel twine wheel
153+ run : python -m pip install cibuildwheel twine wheel
173154 - name : Build wheels
174155 run : cibuildwheel --output-dir dist
175156 env :
176157 CIBW_BUILD : " cp3{6,7,8,9}-*"
177158 CIBW_SKIP : " *-win32 *-manylinux_i686" # Skip 32 bit.
178159 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\" )'"
160+ # Fully test the build wheels again.
161+ CIBW_TEST_REQUIRES : " pytest"
162+ # Simple test that requires the project to be build correctly
163+ CIBW_TEST_COMMAND : " pytest {project}/tests/test_igzip.py"
182164 - name : Build sdist
183165 if : " runner.os == 'Linux'"
184166 run : python setup.py sdist
0 commit comments