Fix GitHub actions. (#1642)
This commit is contained in:
@@ -61,7 +61,7 @@ jobs:
|
|||||||
if: steps.cache-qemu.outputs.cache-hit != 'true'
|
if: steps.cache-qemu.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- name: checkout-qemu
|
||||||
if: steps.cache-qemu.outputs.cache-hit != 'true'
|
if: steps.cache-qemu.outputs.cache-hit != 'true'
|
||||||
|
|||||||
16
.github/workflows/lazarus.yaml
vendored
16
.github/workflows/lazarus.yaml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-latest, macos-13, windows-latest]
|
os: [ubuntu-22.04, macos-latest, macos-13, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
- uses: gcarreno/setup-lazarus@v3.3.1
|
- uses: gcarreno/setup-lazarus@v3.3.1
|
||||||
with:
|
with:
|
||||||
lazarus-version: "stable"
|
lazarus-version: "stable"
|
||||||
with-cache: true
|
with-cache: false
|
||||||
|
|
||||||
- name: Lazarus info
|
- name: Lazarus info
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -79,14 +79,14 @@ jobs:
|
|||||||
uname -a
|
uname -a
|
||||||
|
|
||||||
- name: Install patchelf for ubuntu
|
- name: Install patchelf for ubuntu
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -q
|
sudo apt-get update -q
|
||||||
sudo apt-get install -q -y patchelf
|
sudo apt-get install -q -y patchelf
|
||||||
|
|
||||||
- name: Show Patchelf version (ubuntu)
|
- name: Show Patchelf version (ubuntu)
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
patchelf --version
|
patchelf --version
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
cd build
|
cd build
|
||||||
os=${{ matrix.os }}
|
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
|
BUILD_SHARED_LIBS=ON
|
||||||
else
|
else
|
||||||
BUILD_SHARED_LIBS=OFF
|
BUILD_SHARED_LIBS=OFF
|
||||||
@@ -139,7 +139,7 @@ jobs:
|
|||||||
lazbuild --verbose --build-mode=Release --widgetset=cocoa ./generate_subtitles.lpi
|
lazbuild --verbose --build-mode=Release --widgetset=cocoa ./generate_subtitles.lpi
|
||||||
elif [[ $os == macos-latest ]]; then
|
elif [[ $os == macos-latest ]]; then
|
||||||
lazbuild --verbose --build-mode=Release --widgetset=cocoa --cpu=aarch64 ./generate_subtitles.lpi
|
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
|
lazbuild --verbose --build-mode=Release-Linux ./generate_subtitles.lpi
|
||||||
else
|
else
|
||||||
lazbuild --verbose --build-mode=Release ./generate_subtitles.lpi
|
lazbuild --verbose --build-mode=Release ./generate_subtitles.lpi
|
||||||
@@ -152,7 +152,7 @@ jobs:
|
|||||||
ls -lh
|
ls -lh
|
||||||
|
|
||||||
- name: Collect generating subtitles (Ubuntu)
|
- name: Collect generating subtitles (Ubuntu)
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
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-*
|
ls -lh /tmp/macos-*
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
with:
|
with:
|
||||||
name: linux-x64
|
name: linux-x64
|
||||||
path: /tmp/linux-x64
|
path: /tmp/linux-x64
|
||||||
|
|||||||
4
.github/workflows/test-build-wheel.yaml
vendored
4
.github/workflows/test-build-wheel.yaml
vendored
@@ -139,8 +139,8 @@ jobs:
|
|||||||
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
|
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.10.11/x64/bin:$PATH
|
||||||
export PATH=/c/hostedtoolcache/windows/Python/3.11.9/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
|
export PATH=/c/hostedtoolcache/windows/Python/3.13.1/x64/bin:$PATH
|
||||||
|
|
||||||
which sherpa-onnx
|
which sherpa-onnx
|
||||||
sherpa-onnx --help
|
sherpa-onnx --help
|
||||||
|
|||||||
4
.github/workflows/test-pip-install.yaml
vendored
4
.github/workflows/test-pip-install.yaml
vendored
@@ -110,8 +110,8 @@ jobs:
|
|||||||
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
|
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.10.11/x64/bin:$PATH
|
||||||
export PATH=/c/hostedtoolcache/windows/Python/3.11.9/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
|
export PATH=/c/hostedtoolcache/windows/Python/3.13.1/x64/bin:$PATH
|
||||||
|
|
||||||
sherpa-onnx --help
|
sherpa-onnx --help
|
||||||
sherpa-onnx-keyword-spotter --help
|
sherpa-onnx-keyword-spotter --help
|
||||||
|
|||||||
@@ -73,9 +73,15 @@ OfflineMoonshineGreedySearchDecoder::Decode(Ort::Value encoder_out) {
|
|||||||
seq_len_tensor =
|
seq_len_tensor =
|
||||||
Ort::Value::CreateTensor(memory_info, &seq_len, 1, &seq_len_shape, 1);
|
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<Ort::Value> tmp_states{std::move(states)};
|
||||||
|
|
||||||
std::tie(logits, states) = model_->ForwardCachedDecoder(
|
std::tie(logits, states) = model_->ForwardCachedDecoder(
|
||||||
std::move(token_tensor), std::move(seq_len_tensor), View(&encoder_out),
|
std::move(token_tensor), std::move(seq_len_tensor), View(&encoder_out),
|
||||||
std::move(states));
|
std::move(tmp_states));
|
||||||
}
|
}
|
||||||
|
|
||||||
OfflineMoonshineDecoderResult ans;
|
OfflineMoonshineDecoderResult ans;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "sherpa-onnx/csrc/symbol-table.h"
|
#include "sherpa-onnx/csrc/symbol-table.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|||||||
Reference in New Issue
Block a user