forked from espnet/espnet
-
Notifications
You must be signed in to change notification settings - Fork 0
362 lines (338 loc) · 11 KB
/
ci_on_ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
name: ci on ubuntu
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
process_labels:
runs-on: ubuntu-latest
outputs:
is_docker: ${{ steps.step1.outputs.is_docker }}
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
- name: Check whether PR is related to only docker
id: step1
run: |
if [ -z "$GITHUB_PR_LABEL_ESPNET1" ] && [ -z "$GITHUB_PR_LABEL_ESPNET2" ] && [ -n "$GITHUB_PR_LABEL_DOCKER" ]; then
echo "is_docker=true" >> "$GITHUB_OUTPUT"
else
echo "is_docker=false" >> "$GITHUB_OUTPUT"
fi
unit_test_espnet1_and_integration_test_espnet1:
runs-on: ${{ matrix.os }}
needs: process_labels
# Outputs from Previous jobs are strings. Take care in case of using True/False.
if: |
github.event.pull_request.draft == false
strategy:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
pytorch-version: [2.1.2]
chainer-version: [6.0.0]
use-conda: [false]
include:
- os: ubuntu-latest
python-version: "3.10"
pytorch-version: 1.13.1
chainer-verssion: 6.0.0
use-conda: false
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: install dependencies
run: |
sudo apt-get update -qq
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg
- name: install espnet
env:
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }}
TH_VERSION: ${{ matrix.pytorch-version }}
CHAINER_VERSION: ${{ matrix.chainer-version }}
USE_CONDA: ${{ matrix.use-conda }}
run: |
./ci/install.sh
- name: test shell
run: |
./ci/test_shell_espnet1.sh
- name: test python
run: ./ci/test_python_espnet1.sh
- uses: codecov/codecov-action@v2
with:
flags: test_python_espnet1
- name: coverage erase
continue-on-error: true
run: |
source tools/activate_python.sh
coverage erase
- name: install kaldi
run: |
./ci/install_kaldi.sh
- name: test integration
run: ./ci/test_integration_espnet1.sh
- uses: codecov/codecov-action@v2
with:
flags: test_integration_espnet1
unit_test_espnet2_and_integration_test_espnet2:
runs-on: ${{ matrix.os }}
needs: process_labels
if: |
github.event.pull_request.draft == false
strategy:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
pytorch-version: [2.0.1, 2.1.2, 2.2.2, 2.3.1, 2.4.0]
chainer-version: [6.0.0]
use-conda: [false]
include:
- os: ubuntu-latest
python-version: "3.10"
pytorch-version: 1.13.1
chainer-verssion: 6.0.0
use-conda: false
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: install dependencies
run: |
sudo apt-get update -qq
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
- name: install espnet
env:
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }}
TH_VERSION: ${{ matrix.pytorch-version }}
CHAINER_VERSION: ${{ matrix.chainer-version }}
USE_CONDA: ${{ matrix.use-conda }}
run: |
./ci/install.sh
- name: test shell
run: |
./ci/test_shell_espnet2.sh
- name: test python
run: ./ci/test_python_espnet2.sh
- uses: codecov/codecov-action@v2
with:
flags: test_python_espnet2
- name: coverage erase
continue-on-error: true
run: |
source tools/activate_python.sh
coverage erase
- name: install kaldi
run: |
./ci/install_kaldi.sh
- name: test utils
run: ./ci/test_utils.sh
- uses: codecov/codecov-action@v2
with:
flags: test_utils
- name: coverage erase
continue-on-error: true
run: |
source tools/activate_python.sh
coverage erase
- name: test espnet2 integration
run: ./ci/test_integration_espnet2.sh
- uses: codecov/codecov-action@v2
with:
flags: test_integration_espnet2
test_configuration_espnet2:
runs-on: ${{ matrix.os }}
needs: process_labels
if: |
github.event.pull_request.draft == false
strategy:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
pytorch-version: ["1.13.1"]
chainer-version: ["6.0.0"]
use-conda: [false]
include:
- os: ubuntu-latest
python-version: "3.11"
pytorch-version: 2.4.0
chainer-verssion: 6.0.0
use-conda: false
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: install dependencies
run: |
sudo apt-get update -qq
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg
- name: install espnet
env:
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }}
TH_VERSION: ${{ matrix.pytorch-version }}
CHAINER_VERSION: ${{ matrix.chainer-version }}
USE_CONDA: ${{ matrix.use-conda }}
run: |
./ci/install.sh
- name: test configuration
run: ./ci/test_configuration_espnet2.sh
- uses: codecov/codecov-action@v2
with:
flags: test_configuration_espnet2
unit_test_espnetez_and_integration_test_espnetez:
runs-on: ${{ matrix.os }}
needs: process_labels
if: |
github.event.pull_request.draft == false
strategy:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
pytorch-version: [2.0.1, 2.1.2, 2.2.2, 2.3.1, 2.4.0]
chainer-version: [6.0.0]
use-conda: [false]
include:
- os: ubuntu-latest
python-version: "3.10"
pytorch-version: 1.13.1
chainer-verssion: 6.0.0
use-conda: false
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: install dependencies
run: |
sudo apt-get update -qq
# NOTE(kamo): g++-7 doesn't exist in ubuntu-latest
sudo apt-get install -qq -y cmake libsndfile1-dev bc sox ffmpeg
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
- name: install espnet
env:
ESPNET_PYTHON_VERSION: ${{ matrix.python-version }}
TH_VERSION: ${{ matrix.pytorch-version }}
CHAINER_VERSION: ${{ matrix.chainer-version }}
USE_CONDA: ${{ matrix.use-conda }}
run: |
./ci/install.sh
- name: test python
run: ./ci/test_python_espnetez.sh
- uses: codecov/codecov-action@v2
with:
flags: test_python_espnetez
- name: coverage erase
continue-on-error: true
run: |
source tools/activate_python.sh
coverage erase
- name: install kaldi
run: |
./ci/install_kaldi.sh
- name: test utils
run: ./ci/test_utils.sh
- uses: codecov/codecov-action@v2
with:
flags: test_utils
- name: coverage erase
continue-on-error: true
run: |
source tools/activate_python.sh
coverage erase
- name: test espnetez integration
run: ./ci/test_integration_espnetez.sh
- uses: codecov/codecov-action@v2
with:
flags: test_integration_espnetez
test_import:
runs-on: ${{ matrix.os }}
needs: process_labels
if: |
github.event.pull_request.draft == false
strategy:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
pytorch-version: [2.4.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install -qq -y libsndfile1-dev
python3 -m pip install --upgrade pip setuptools wheel
- name: Install espnet with the least requirement
env:
TH_VERSION: ${{ matrix.pytorch-version }}
run: |
python3 -m pip install -U numba
./tools/installers/install_torch.sh false ${TH_VERSION} CPU
./tools/installers/install_chainer.sh CPU
python3 setup.py bdist_wheel
python3 -m pip install dist/espnet-*.whl
# log
python3 -m pip freeze
- name: Import all modules (Try1)
run: |
python3 ./ci/test_import_all.py
- name: Install espnet with the full requirement
env:
TH_VERSION: ${{ matrix.pytorch-version }}
run: |
python3 -m pip install "$(ls dist/espnet-*.whl)[all]"
# log
python3 -m pip freeze
- name: Import all modules (Try2)
run: |
python3 -q -X faulthandler ./ci/test_import_all.py
check_kaldi_symlinks:
runs-on: ubuntu-latest
needs: process_labels
if: |
github.event.pull_request.draft == false
steps:
- uses: actions/checkout@master
- run: ci/check_kaldi_symlinks.sh