Add Python API (#31)
This commit is contained in:
62
.github/workflows/run-python-test.yaml
vendored
Normal file
62
.github/workflows/run-python-test.yaml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: run-python-test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/run-python-test.yaml'
|
||||
- '.github/scripts/test-python.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/run-python-test.yaml'
|
||||
- '.github/scripts/test-python.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
|
||||
concurrency:
|
||||
group: run-python-test-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
run-python-test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install Python dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip numpy
|
||||
|
||||
- name: Install sherpa-onnx
|
||||
shell: bash
|
||||
run: |
|
||||
python3 setup.py install
|
||||
|
||||
- name: Test sherpa-onnx
|
||||
shell: bash
|
||||
run: |
|
||||
.github/scripts/test-python.sh
|
||||
Reference in New Issue
Block a user