From e46c2d37e3a33bfe65f10fdda1fb37dbe1b0045b Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 22 Dec 2024 12:09:18 +0800 Subject: [PATCH 1/9] fix installing lazarus --- .github/workflows/lazarus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazarus.yaml b/.github/workflows/lazarus.yaml index f327c99e2..8efb1b7b1 100644 --- a/.github/workflows/lazarus.yaml +++ b/.github/workflows/lazarus.yaml @@ -59,7 +59,7 @@ jobs: - uses: gcarreno/setup-lazarus@v3.3.1 with: lazarus-version: "stable" - with-cache: true + with-cache: false - name: Lazarus info shell: bash From c83fd0eebdea89b97fe5919c7684c1c923ebc13c Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 23 Dec 2024 16:15:53 +0800 Subject: [PATCH 2/9] Fix CI --- .github/workflows/lazarus.yaml | 2 +- .github/workflows/test-build-wheel.yaml | 2 +- .github/workflows/test-pip-install.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lazarus.yaml b/.github/workflows/lazarus.yaml index 8efb1b7b1..218bda269 100644 --- a/.github/workflows/lazarus.yaml +++ b/.github/workflows/lazarus.yaml @@ -43,7 +43,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-latest, macos-13, windows-latest] + os: [ubuntu-22.04, macos-latest, macos-13, windows-latest] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test-build-wheel.yaml b/.github/workflows/test-build-wheel.yaml index ff6ad0a2d..82dae4ccc 100644 --- a/.github/workflows/test-build-wheel.yaml +++ b/.github/workflows/test-build-wheel.yaml @@ -139,7 +139,7 @@ jobs: export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH - export PATH=/c/hostedtoolcache/windows/Python/3.12.7/x64/bin:$PATH + export PATH=/c/hostedtoolcache/windows/Python/3.12.8/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.13.0/x64/bin:$PATH which sherpa-onnx diff --git a/.github/workflows/test-pip-install.yaml b/.github/workflows/test-pip-install.yaml index 6d2faa512..b30eb707e 100644 --- a/.github/workflows/test-pip-install.yaml +++ b/.github/workflows/test-pip-install.yaml @@ -110,7 +110,7 @@ jobs: export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH - export PATH=/c/hostedtoolcache/windows/Python/3.12.7/x64/bin:$PATH + export PATH=/c/hostedtoolcache/windows/Python/3.12.8/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.13.0/x64/bin:$PATH sherpa-onnx --help From 8cf87949db1c781c56af0453b873fc382e91f738 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 23 Dec 2024 16:19:07 +0800 Subject: [PATCH 3/9] fix risc-v build --- sherpa-onnx/csrc/symbol-table.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sherpa-onnx/csrc/symbol-table.cc b/sherpa-onnx/csrc/symbol-table.cc index e36bd5e58..8456cf777 100644 --- a/sherpa-onnx/csrc/symbol-table.cc +++ b/sherpa-onnx/csrc/symbol-table.cc @@ -4,6 +4,7 @@ #include "sherpa-onnx/csrc/symbol-table.h" +#include #include #include #include From 909bf4fd98f494538a21bbf25a6083429d385e6a Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 23 Dec 2024 16:26:33 +0800 Subject: [PATCH 4/9] Fix CI --- .github/workflows/aarch64-linux-gnu-static.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/aarch64-linux-gnu-static.yaml b/.github/workflows/aarch64-linux-gnu-static.yaml index 749611e56..b31771666 100644 --- a/.github/workflows/aarch64-linux-gnu-static.yaml +++ b/.github/workflows/aarch64-linux-gnu-static.yaml @@ -61,7 +61,8 @@ jobs: if: steps.cache-qemu.outputs.cache-hit != 'true' run: | sudo apt-get update - sudo apt-get install autoconf automake autotools-dev ninja-build libglib2.0-dev. + # sudo apt-get install autoconf automake autotools-dev ninja-build libglib2.0-dev. + sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev libpython-dev python-pip python-capstone virtualenv - name: checkout-qemu if: steps.cache-qemu.outputs.cache-hit != 'true' From 7c5edc81bf21d8c8af96719babc53c6c0c125099 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 23 Dec 2024 16:28:11 +0800 Subject: [PATCH 5/9] Fix CI --- .github/workflows/aarch64-linux-gnu-static.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aarch64-linux-gnu-static.yaml b/.github/workflows/aarch64-linux-gnu-static.yaml index b31771666..49829e2c8 100644 --- a/.github/workflows/aarch64-linux-gnu-static.yaml +++ b/.github/workflows/aarch64-linux-gnu-static.yaml @@ -62,7 +62,7 @@ jobs: run: | sudo apt-get update # sudo apt-get install autoconf automake autotools-dev ninja-build libglib2.0-dev. - sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev libpython-dev python-pip python-capstone virtualenv + sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev - name: checkout-qemu if: steps.cache-qemu.outputs.cache-hit != 'true' From 7fd08a81522ff77e1555535a092ff39ae96de95f Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Tue, 24 Dec 2024 11:12:04 +0800 Subject: [PATCH 6/9] Fix clang-tidy --- .../csrc/offline-moonshine-greedy-search-decoder.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sherpa-onnx/csrc/offline-moonshine-greedy-search-decoder.cc b/sherpa-onnx/csrc/offline-moonshine-greedy-search-decoder.cc index 603bdd0cf..3e2d77f69 100644 --- a/sherpa-onnx/csrc/offline-moonshine-greedy-search-decoder.cc +++ b/sherpa-onnx/csrc/offline-moonshine-greedy-search-decoder.cc @@ -73,9 +73,15 @@ OfflineMoonshineGreedySearchDecoder::Decode(Ort::Value encoder_out) { seq_len_tensor = Ort::Value::CreateTensor(memory_info, &seq_len, 1, &seq_len_shape, 1); + // To fix the false alarm of clang-tidy + // error: 'states' used after it was moved + // [bugprone-use-after-move,-warnings-as-errors] + // we use a tmp_states here + std::vector tmp_states{std::move(states)}; + std::tie(logits, states) = model_->ForwardCachedDecoder( std::move(token_tensor), std::move(seq_len_tensor), View(&encoder_out), - std::move(states)); + std::move(tmp_states)); } OfflineMoonshineDecoderResult ans; From b8b102b06d15b877e257c86fd6d8181b1378b746 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Tue, 24 Dec 2024 11:14:05 +0800 Subject: [PATCH 7/9] fix CI --- .github/workflows/aarch64-linux-gnu-static.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aarch64-linux-gnu-static.yaml b/.github/workflows/aarch64-linux-gnu-static.yaml index 49829e2c8..ec5f91f71 100644 --- a/.github/workflows/aarch64-linux-gnu-static.yaml +++ b/.github/workflows/aarch64-linux-gnu-static.yaml @@ -62,7 +62,7 @@ jobs: run: | sudo apt-get update # sudo apt-get install autoconf automake autotools-dev ninja-build libglib2.0-dev. - sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev + sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev ninja-build - name: checkout-qemu if: steps.cache-qemu.outputs.cache-hit != 'true' From b443aaef8ea6715bc227c8cbafc393412f5defbd Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Tue, 24 Dec 2024 11:15:30 +0800 Subject: [PATCH 8/9] Fix python tests --- .github/workflows/test-build-wheel.yaml | 2 +- .github/workflows/test-pip-install.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build-wheel.yaml b/.github/workflows/test-build-wheel.yaml index 82dae4ccc..371d0712c 100644 --- a/.github/workflows/test-build-wheel.yaml +++ b/.github/workflows/test-build-wheel.yaml @@ -140,7 +140,7 @@ jobs: export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.12.8/x64/bin:$PATH - export PATH=/c/hostedtoolcache/windows/Python/3.13.0/x64/bin:$PATH + export PATH=/c/hostedtoolcache/windows/Python/3.13.1/x64/bin:$PATH which sherpa-onnx sherpa-onnx --help diff --git a/.github/workflows/test-pip-install.yaml b/.github/workflows/test-pip-install.yaml index b30eb707e..139e09a0e 100644 --- a/.github/workflows/test-pip-install.yaml +++ b/.github/workflows/test-pip-install.yaml @@ -111,7 +111,7 @@ jobs: export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH export PATH=/c/hostedtoolcache/windows/Python/3.12.8/x64/bin:$PATH - export PATH=/c/hostedtoolcache/windows/Python/3.13.0/x64/bin:$PATH + export PATH=/c/hostedtoolcache/windows/Python/3.13.1/x64/bin:$PATH sherpa-onnx --help sherpa-onnx-keyword-spotter --help From fa87cd2516c5c3359dde43139c44bbc7f85fab84 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Tue, 24 Dec 2024 11:23:56 +0800 Subject: [PATCH 9/9] fix lazarus --- .github/workflows/aarch64-linux-gnu-static.yaml | 1 - .github/workflows/lazarus.yaml | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/aarch64-linux-gnu-static.yaml b/.github/workflows/aarch64-linux-gnu-static.yaml index ec5f91f71..ae3b9eef2 100644 --- a/.github/workflows/aarch64-linux-gnu-static.yaml +++ b/.github/workflows/aarch64-linux-gnu-static.yaml @@ -61,7 +61,6 @@ jobs: if: steps.cache-qemu.outputs.cache-hit != 'true' run: | sudo apt-get update - # sudo apt-get install autoconf automake autotools-dev ninja-build libglib2.0-dev. sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev ninja-build - name: checkout-qemu diff --git a/.github/workflows/lazarus.yaml b/.github/workflows/lazarus.yaml index 218bda269..16bfdbba6 100644 --- a/.github/workflows/lazarus.yaml +++ b/.github/workflows/lazarus.yaml @@ -79,14 +79,14 @@ jobs: uname -a - name: Install patchelf for ubuntu - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' shell: bash run: | sudo apt-get update -q sudo apt-get install -q -y patchelf - name: Show Patchelf version (ubuntu) - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' shell: bash run: | patchelf --version @@ -104,7 +104,7 @@ jobs: cd build os=${{ matrix.os }} - if [[ $os == 'windows-latest' || $os == 'ubuntu-20.04' ]]; then + if [[ $os == 'windows-latest' || $os == 'ubuntu-22.04' ]]; then BUILD_SHARED_LIBS=ON else BUILD_SHARED_LIBS=OFF @@ -139,7 +139,7 @@ jobs: lazbuild --verbose --build-mode=Release --widgetset=cocoa ./generate_subtitles.lpi elif [[ $os == macos-latest ]]; then lazbuild --verbose --build-mode=Release --widgetset=cocoa --cpu=aarch64 ./generate_subtitles.lpi - elif [[ $os == 'ubuntu-20.04' ]]; then + elif [[ $os == 'ubuntu-22.04' ]]; then lazbuild --verbose --build-mode=Release-Linux ./generate_subtitles.lpi else lazbuild --verbose --build-mode=Release ./generate_subtitles.lpi @@ -152,7 +152,7 @@ jobs: ls -lh - name: Collect generating subtitles (Ubuntu) - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' shell: bash run: | SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) @@ -223,7 +223,7 @@ jobs: ls -lh /tmp/macos-* - uses: actions/upload-artifact@v4 - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' with: name: linux-x64 path: /tmp/linux-x64