Fix CI tests (#1061)
This commit is contained in:
@@ -134,6 +134,7 @@ def main():
|
||||
process_linux(s)
|
||||
process_windows(s, "x64")
|
||||
process_windows(s, "x86")
|
||||
process_windows(s, "arm64")
|
||||
|
||||
s = read_proj_file("./sherpa-onnx.csproj.in")
|
||||
d = get_dict()
|
||||
|
||||
@@ -24,7 +24,7 @@ export src_dir
|
||||
mkdir -p $src_dir
|
||||
pushd $src_dir
|
||||
|
||||
mkdir -p linux macos-x64 macos-arm64 windows-x64 windows-x86
|
||||
mkdir -p linux macos-x64 macos-arm64 windows-x64 windows-x86 windows-arm64
|
||||
|
||||
linux_wheel_filename=sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
||||
linux_wheel=$src_dir/$linux_wheel_filename
|
||||
@@ -41,6 +41,9 @@ windows_x64_wheel=$src_dir/$windows_x64_wheel_filename
|
||||
windows_x86_wheel_filename=sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win32.whl
|
||||
windows_x86_wheel=$src_dir/$windows_x86_wheel_filename
|
||||
|
||||
windows_arm64_wheel_filename=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-arm64.tar.bz2
|
||||
windows_arm64_wheel=$src_dir/$windows_arm64_wheel_filename
|
||||
|
||||
if [ ! -f $src_dir/linux/libsherpa-onnx-core.so ]; then
|
||||
echo "---linux x86_64---"
|
||||
cd linux
|
||||
@@ -54,9 +57,9 @@ if [ ! -f $src_dir/linux/libsherpa-onnx-core.so ]; then
|
||||
unzip $linux_wheel_filename
|
||||
cp -v sherpa_onnx/lib/*.so* ../
|
||||
cd ..
|
||||
rm -v libpiper_phonemize.so libpiper_phonemize.so.1.2.0
|
||||
rm -v libonnxruntime.so
|
||||
rm -v libcargs.so
|
||||
rm -fv libpiper_phonemize.so libpiper_phonemize.so.1.2.0
|
||||
rm -fv libonnxruntime.so
|
||||
rm -fv libcargs.so
|
||||
rm -rf wheel
|
||||
ls -lh
|
||||
cd ..
|
||||
@@ -77,9 +80,9 @@ if [ ! -f $src_dir/macos-x64/libsherpa-onnx-core.dylib ]; then
|
||||
|
||||
cd ..
|
||||
|
||||
rm -v libcargs.dylib
|
||||
rm -v libonnxruntime.dylib
|
||||
rm -v libpiper_phonemize.1.2.0.dylib libpiper_phonemize.dylib
|
||||
rm -fv libcargs.dylib
|
||||
rm -fv libonnxruntime.dylib
|
||||
rm -fv libpiper_phonemize.1.2.0.dylib libpiper_phonemize.dylib
|
||||
rm -rf wheel
|
||||
ls -lh
|
||||
cd ..
|
||||
@@ -100,9 +103,9 @@ if [ ! -f $src_dir/macos-arm64/libsherpa-onnx-core.dylib ]; then
|
||||
|
||||
cd ..
|
||||
|
||||
rm -v libcargs.dylib
|
||||
rm -v libonnxruntime.dylib
|
||||
rm -v libpiper_phonemize.1.2.0.dylib libpiper_phonemize.dylib
|
||||
rm -fv libcargs.dylib
|
||||
rm -fv libonnxruntime.dylib
|
||||
rm -fv libpiper_phonemize.1.2.0.dylib libpiper_phonemize.dylib
|
||||
rm -rf wheel
|
||||
ls -lh
|
||||
cd ..
|
||||
@@ -146,9 +149,28 @@ if [ ! -f $src_dir/windows-x86/sherpa-onnx-core.dll ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
if [ ! -f $src_dir/windows-arm64/sherpa-onnx-core.dll ]; then
|
||||
echo "---windows arm64---"
|
||||
cd windows-arm64
|
||||
mkdir -p wheel
|
||||
cd wheel
|
||||
if [ -f $windows_arm64_wheel ]; then
|
||||
cp -v $windows_arm64_wheel .
|
||||
else
|
||||
curl -OL https://$HF_MIRROR/csukuangfj/sherpa-onnx-libs/resolve/main/windows-for-dotnet/$windows_arm64_wheel_filename
|
||||
fi
|
||||
unzip $windows_arm64_wheel_filename
|
||||
cp -v sherpa-onnx-${SHERPA_ONNX_VERSION}-win-arm64/*dll ../
|
||||
cd ..
|
||||
|
||||
rm -rf wheel
|
||||
ls -lh
|
||||
cd ..
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
mkdir -p macos-x64 macos-arm64 linux windows-x64 windows-x86 all
|
||||
mkdir -p macos-x64 macos-arm64 linux windows-x64 windows-x86 windows-arm64 all
|
||||
|
||||
cp ./*.cs all
|
||||
|
||||
@@ -179,6 +201,11 @@ dotnet build -c Release
|
||||
dotnet pack -c Release -o ../packages
|
||||
popd
|
||||
|
||||
pushd windows-arm64
|
||||
dotnet build -c Release
|
||||
dotnet pack -c Release -o ../packages
|
||||
popd
|
||||
|
||||
pushd all
|
||||
dotnet build -c Release
|
||||
dotnet pack -c Release -o ../packages
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>linux-x64;osx-x64;osx-arm64;win-x64;win-x86</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>linux-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyName>sherpa-onnx</AssemblyName>
|
||||
<Version>{{ version }}</Version>
|
||||
@@ -53,6 +53,7 @@
|
||||
<PackageReference Include="org.k2fsa.sherpa.onnx.runtime.osx-arm64" Version="{{ version }}" />
|
||||
<PackageReference Include="org.k2fsa.sherpa.onnx.runtime.win-x64" Version="{{ version }}" />
|
||||
<PackageReference Include="org.k2fsa.sherpa.onnx.runtime.win-x86" Version="{{ version }}" />
|
||||
<PackageReference Include="org.k2fsa.sherpa.onnx.runtime.win-arm64" Version="{{ version }}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user