Support clang-tidy (#1034)
This commit is contained in:
57
.github/workflows/clang-tidy.yaml
vendored
Normal file
57
.github/workflows/clang-tidy.yaml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: clang-tidy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- clang-tidy
|
||||
paths:
|
||||
- 'sherpa-onnx/csrc/**'
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'sherpa-onnx/csrc/**'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: clang-tidy-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clang-tidy:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install clang-tidy
|
||||
shell: bash
|
||||
run: |
|
||||
pip install clang-tidy
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DSHERPA_ONNX_ENABLE_PYTHON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
|
||||
|
||||
- name: Check with clang-tidy
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
make check
|
||||
1
.github/workflows/flutter-macos.yaml
vendored
1
.github/workflows/flutter-macos.yaml
vendored
@@ -184,6 +184,7 @@ jobs:
|
||||
path: ./*.tar.bz2
|
||||
|
||||
- name: Publish to huggingface
|
||||
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release'
|
||||
env:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
uses: nick-fields/retry@v3
|
||||
|
||||
2
.github/workflows/flutter-windows-x64.yaml
vendored
2
.github/workflows/flutter-windows-x64.yaml
vendored
@@ -133,6 +133,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
d=$PWD
|
||||
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||
|
||||
pushd sherpa-onnx/flutter
|
||||
dart pub get
|
||||
@@ -159,6 +160,7 @@ jobs:
|
||||
path: ./*.tar.bz2
|
||||
|
||||
- name: Publish to huggingface
|
||||
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release'
|
||||
env:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
uses: nick-fields/retry@v3
|
||||
|
||||
Reference in New Issue
Block a user