This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex-mr_series-sherpa-onnx/.github/workflows/linux.yaml
2023-02-24 17:44:36 +08:00

112 lines
2.5 KiB
YAML

name: linux
on:
push:
branches:
- master
paths:
- '.github/workflows/linux.yaml'
- '.github/scripts/test-online-transducer.sh'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'ffmpeg-examples/**'
- 'c-api-examples/**'
pull_request:
branches:
- master
paths:
- '.github/workflows/linux.yaml'
- '.github/scripts/test-online-transducer.sh'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'ffmpeg-examples/**'
concurrency:
group: linux-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install ffmpeg
shell: bash
run: |
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo add-apt-repository ppa:savoury1/ffmpeg5
sudo apt-get install -y libavdevice-dev libavutil-dev ffmpeg
pkg-config --modversion libavutil
ffmpeg -version
- name: Show ffmpeg version
shell: bash
run: |
pkg-config --modversion libavutil
ffmpeg -version
- name: Configure CMake
shell: bash
run: |
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
- name: Build sherpa-onnx for ubuntu
shell: bash
run: |
cd build
make -j2
ls -lh lib
ls -lh bin
cd ../ffmpeg-examples
make
- name: Display dependencies of sherpa-onnx for linux
shell: bash
run: |
file build/bin/sherpa-onnx
readelf -d build/bin/sherpa-onnx
- name: Test sherpa-onnx-ffmpeg
run: |
export PATH=$PWD/ffmpeg-examples:$PATH
export EXE=sherpa-onnx-ffmpeg
.github/scripts/test-online-transducer.sh
- name: Test online transducer
shell: bash
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx
.github/scripts/test-online-transducer.sh
- name: Test online transducer (C API)
shell: bash
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=decode-file-c-api
.github/scripts/test-online-transducer.sh