janitor

janitor
git clone https://git.prime8.dev/janitor.git
Log | Files | Refs | README | LICENSE

linux-macos.yaml (1967B)


      1 name: linux-macos
      2 
      3 on:
      4   push:
      5     branches:
      6       - master
      7   pull_request:
      8     branches:
      9       - master
     10 
     11 concurrency:
     12   group: linux-macos-${{ github.ref }}
     13   cancel-in-progress: true
     14 
     15 permissions:
     16   contents: read
     17 
     18 jobs:
     19   linux_macos:
     20     runs-on: ${{ matrix.os }}
     21     strategy:
     22       fail-fast: false
     23       matrix:
     24         os: [ubuntu-latest, macos-latest]
     25 
     26     steps:
     27       - uses: actions/checkout@v2
     28         with:
     29           fetch-depth: 0
     30 
     31       - name: Setup Python
     32         uses: actions/setup-python@v4
     33         with:
     34           python-version: "3.8"
     35 
     36       - name: Install Python dependencies
     37         shell: bash
     38         run: |
     39           python3 -m pip install --upgrade pip numpy
     40           python3 -m pip install wheel twine setuptools
     41           if [[ ${{ matrix.os }} == "ubuntu" ]]; then
     42             python3 -m pip install torch==1.13.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
     43           else
     44             python3 -m pip install torch==1.13.0 -f https://download.pytorch.org/whl/torch_stable.html
     45           fi
     46 
     47       - name: Configure Cmake
     48         shell: bash
     49         run: |
     50           mkdir build
     51           cd build
     52           cmake -D CMAKE_BUILD_TYPE=Release ..
     53 
     54       - name: Build kaldi-native-fbank for ubuntu/macos
     55         if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
     56         run: |
     57           cd build
     58           make -j2
     59           ctest --output-on-failure
     60 
     61       - name: Run tests for ubuntu/macos
     62         if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
     63         run: |
     64           cd build
     65           ctest --output-on-failure
     66 
     67       - name: Build Python
     68         shell: bash
     69         run: |
     70           python3 -m pip install --verbose .
     71 
     72       - name: Display Python package version
     73         shell: bash
     74         run: |
     75           python3 -c "import kaldi_native_fbank; print(kaldi_native_fbank.__version__)"
     76           python3 -c "import kaldi_native_fbank; print(kaldi_native_fbank.__file__)"