9
9
tags :
10
10
- " *"
11
11
12
+ defaults :
13
+ run :
14
+ # This is needed for miniconda, see:
15
+ # https://github.com/marketplace/actions/setup-miniconda#important.
16
+ shell : bash -l {0}
12
17
13
18
jobs :
14
19
lint :
@@ -25,26 +30,14 @@ jobs:
25
30
run : pip install tox
26
31
- name : Lint
27
32
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 :
33
+
34
+ package-checks :
35
+ strategy :
36
+ matrix :
37
+ tox_env :
38
+ - docs
39
+ - mypy
40
+ - twine_check
48
41
needs : lint
49
42
runs-on : ubuntu-20.04
50
43
steps :
@@ -59,38 +52,10 @@ jobs:
59
52
run : sudo apt-get install libisal-dev
60
53
- name : Install tox and upgrade setuptools and pip
61
54
run : pip install --upgrade tox setuptools pip
62
- - name : Mypy checks
63
- run : tox -e mypy
55
+ - name : Run tox -e ${{ matrix.tox_env }}
56
+ run : tox -e ${{ matrix.tox_env }}
64
57
env :
65
58
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
59
95
60
test-static :
96
61
needs : lint
@@ -105,48 +70,55 @@ jobs:
105
70
os : ["ubuntu-latest"]
106
71
include :
107
72
- os : " macos-latest"
108
- python-version : 3.8
73
+ python-version : 3.6
74
+ - os : " windows-latest"
75
+ python-version : 3.6
109
76
steps :
110
77
111
78
with :
112
79
submodules : recursive
113
- - name : Set up Python ${{ matrix.python-version }}
114
- uses : actions /setup-python @v2.2.1
80
+ - name : Install miniconda.
81
+ uses : conda-incubator /setup-miniconda @v2.0.1 # https://github.com/conda-incubator/setup-miniconda.
115
82
with :
116
- python-version : ${{ matrix.python-version }}
117
- - name : Install tox and upgrade setuptools
118
- run : pip install --upgrade tox setuptools
119
- - name : Install build dependencies (Linux) # Yasm in pypa/manylinux images.
120
- run : sudo apt install yasm
121
- if : runner.os == 'Linux'
122
- - name : Install build dependencies (Macos)
123
- run : brew install yasm automake autoconf
83
+ channels : conda-forge,defaults
84
+ - name : Install requirements (MacOS)
85
+ run : conda install python=${{ matrix.python-version }} tox make automake autoconf libtool nasm
124
86
if : runner.os == 'macOS'
87
+ - name : Install requirements (Linux)
88
+ run : conda install python=${{ matrix.python-version }} tox make automake autoconf libtool yasm # Yasm in pypa/manylinux images.
89
+ if : runner.os == 'Linux'
90
+ - name : install requirements (Windows)
91
+ run : conda install python=${{ matrix.python-version }} tox nasm
92
+ if : runner.os == 'Windows'
93
+ - name : Set MSVC developer prompt
94
+
95
+ if : runner.os == 'Windows'
125
96
- name : Run tests
126
97
run : tox -e py3
127
98
- name : Upload coverage report
128
99
uses : codecov/codecov-action@v1
129
100
101
+ # Test if the python-isal conda package can be build. Which is linked
102
+ # dynamically to the conda isa-l package.
130
103
test-dynamic :
131
104
runs-on : ${{ matrix.os }}
132
105
needs : lint
133
106
strategy :
134
107
matrix :
135
- python-version :
136
- - 3.6
137
- os : ["ubuntu-20.04"]
108
+ os : ["ubuntu-latest", "macos-latest", "windows-latest"]
138
109
steps :
139
110
140
111
with :
141
112
submodules : recursive
142
- - name : Set up Python ${{ matrix.python-version }}
143
- uses : actions /setup-python @v2.2.1
113
+ - name : Install miniconda.
114
+ uses : conda-incubator /setup-miniconda @v2.0.1 # https://github.com/conda-incubator/setup-miniconda.
144
115
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
116
+ channels : conda-forge,defaults
117
+ - name : Install requirements (universal)
118
+ run : conda install isa-l python tox
119
+ - name : Set MSVC developer prompt
120
+
121
+ if : runner.os == 'Windows'
150
122
- name : Run tests (dynamic link)
151
123
run : tox -e py3
152
124
env :
@@ -155,21 +127,29 @@ jobs:
155
127
deploy :
156
128
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
157
129
runs-on : ${{ matrix.os }}
158
- needs : [lint, docs , test-static, test-dynamic, twine_check ]
130
+ needs : [lint, package-checks , test-static, test-dynamic]
159
131
strategy :
160
132
matrix :
161
- os : [ "macos-latest", "ubuntu-latest" ]
133
+ os : ["macos-latest", "ubuntu-latest", "windows-latest" ]
162
134
steps :
163
135
164
136
with :
165
137
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
138
+ - name : Install miniconda.
139
+ uses : conda-incubator/[email protected] # https://github.com/conda-incubator/setup-miniconda.
140
+ with :
141
+ channels : conda-forge,defaults
170
142
- name : Install build dependencies (Macos)
171
- run : brew install yasm automake autoconf
143
+ run : conda install nasm automake autoconf python
172
144
if : runner.os == 'macOS'
145
+ - name : Install build dependencies (Windows)
146
+ run : conda install nasm python
147
+ if : runner.os == 'Windows'
148
+ - name : Set MSVC developer prompt
149
+
150
+ if : runner.os == 'Windows'
151
+ - name : Install cibuildwheel twine
152
+ run : python -m pip install cibuildwheel twine
173
153
- name : Build wheels
174
154
run : cibuildwheel --output-dir dist
175
155
env :
0 commit comments