9
9
tags :
10
10
- " *"
11
11
12
-
13
12
jobs :
14
13
lint :
15
14
runs-on : ubuntu-20.04
@@ -25,26 +24,14 @@ jobs:
25
24
run : pip install tox
26
25
- name : Lint
27
26
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
48
35
needs : lint
49
36
runs-on : ubuntu-20.04
50
37
steps :
@@ -59,38 +46,10 @@ jobs:
59
46
run : sudo apt-get install libisal-dev
60
47
- name : Install tox and upgrade setuptools and pip
61
48
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 }}
64
51
env :
65
52
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
53
95
54
test-static :
96
55
needs : lint
105
64
os : ["ubuntu-latest"]
106
65
include :
107
66
- os : " macos-latest"
108
- python-version : 3.8
67
+ python-version : 3.6
68
+ - os : " windows-latest"
69
+ python-version : 3.6
109
70
steps :
110
71
111
72
with :
@@ -120,33 +81,45 @@ jobs:
120
81
run : sudo apt install yasm
121
82
if : runner.os == 'Linux'
122
83
- name : Install build dependencies (Macos)
123
- run : brew install yasm automake autoconf
84
+ run : brew install nasm automake autoconf
124
85
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'
125
92
- name : Run tests
126
93
run : tox -e py3
127
94
- name : Upload coverage report
128
95
uses : codecov/codecov-action@v1
129
96
97
+ # Test if the python-isal conda package can be build. Which is linked
98
+ # dynamically to the conda isa-l package.
130
99
test-dynamic :
131
100
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}
132
106
needs : lint
133
107
strategy :
134
108
matrix :
135
- python-version :
136
- - 3.6
137
- os : ["ubuntu-20.04"]
109
+ os : ["ubuntu-latest", "macos-latest", "windows-latest"]
138
110
steps :
139
111
140
112
with :
141
113
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.
144
116
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'
150
123
- name : Run tests (dynamic link)
151
124
run : tox -e py3
152
125
env :
@@ -155,10 +128,10 @@ jobs:
155
128
deploy :
156
129
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
157
130
runs-on : ${{ matrix.os }}
158
- needs : [lint, docs , test-static, test-dynamic, twine_check ]
131
+ needs : [lint, package-checks , test-static, test-dynamic]
159
132
strategy :
160
133
matrix :
161
- os : [ "macos-latest", "ubuntu-latest" ]
134
+ os : ["macos-latest", "ubuntu-latest", "windows-latest" ]
162
135
steps :
163
136
164
137
with :
@@ -168,17 +141,26 @@ jobs:
168
141
- name : Install cibuildwheel twine
169
142
run : python -m pip install cibuildwheel twine
170
143
- name : Install build dependencies (Macos)
171
- run : brew install yasm automake autoconf
144
+ run : brew install nasm automake autoconf
172
145
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
173
154
- name : Build wheels
174
155
run : cibuildwheel --output-dir dist
175
156
env :
176
157
CIBW_BUILD : " cp3{6,7,8,9}-*"
177
158
CIBW_SKIP : " *-win32 *-manylinux_i686" # Skip 32 bit.
178
159
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"
182
164
- name : Build sdist
183
165
if : " runner.os == 'Linux'"
184
166
run : python setup.py sdist
0 commit comments