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: 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: 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
|
python3 -m pip install wheel twine setuptools
|
|
- name: Build Python
|
shell: bash
|
run: |
|
python3 setup.py install
|
|
- name: Display Python package version
|
shell: bash
|
run: |
|
python3 -c "import kaldi_native_fbank; print(kaldi_native_fbank.__version__)"
|