-
Notifications
You must be signed in to change notification settings - Fork 21
76 lines (64 loc) · 1.92 KB
/
linux-macos.yaml
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
name: linux-macos
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: linux-macos-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux_macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Python dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip numpy
python3 -m pip install wheel twine setuptools
if [[ ${{ matrix.os }} == "ubuntu" ]]; then
python3 -m pip install torch==1.13.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
else
python3 -m pip install torch==1.13.0 -f https://download.pytorch.org/whl/torch_stable.html
fi
- name: Configure Cmake
shell: bash
run: |
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
- name: Build kaldi-native-fbank for ubuntu/macos
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
run: |
cd build
make -j2
ctest --output-on-failure
- name: Run tests for ubuntu/macos
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
run: |
cd build
ctest --output-on-failure
- name: Build Python
shell: bash
run: |
python3 -m pip install --verbose .
- name: Display Python package version
shell: bash
run: |
python3 -c "import kaldi_native_fbank; print(kaldi_native_fbank.__version__)"
python3 -c "import kaldi_native_fbank; print(kaldi_native_fbank.__file__)"