Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2024-10-29 12:26:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-10-29 12:26:26 +0800
Commit
356da3b54cc06d605fba7bc07a2705335ffde36e
356da3b5
1 parent
72dc68c8
Publish pre-built macos xcframework (#1490)
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
35 行增加
和
1 行删除
.github/workflows/swift.yaml
build-swift-macos.sh
sherpa-onnx/c-api/cxx-api.h
.github/workflows/swift.yaml
查看文件 @
356da3b
...
...
@@ -4,6 +4,8 @@ on:
push
:
branches
:
-
master
tags
:
-
'
v[0-9]+.[0-9]+.[0-9]+*'
paths
:
-
'
./build-swift-macos.sh'
-
'
.github/workflows/swift.yaml'
...
...
@@ -65,6 +67,30 @@ jobs:
./build-swift-macos.sh
-
name
:
Copy files
if
:
matrix.os == 'macos-13' && (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-macos-xcframework-static
mkdir $dst
mv -v build-swift-macos/sherpa-onnx.xcframework $dst
brew install tree
tree $dst
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for macOS
if
:
matrix.os == 'macos-13' && (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
overwrite
:
true
file
:
sherpa-onnx-*macos-xcframework-static.tar.bz2
-
name
:
test
shell
:
bash
run
:
|
...
...
build-swift-macos.sh
查看文件 @
356da3b
...
...
@@ -7,6 +7,9 @@ mkdir -p $dir
cd
$dir
cmake
\
-DSHERPA_ONNX_ENABLE_BINARY
=
OFF
\
-DSHERPA_ONNX_BUILD_C_API_EXAMPLES
=
OFF
\
-DCMAKE_OSX_ARCHITECTURES
=
"arm64;x86_64"
\
-DCMAKE_INSTALL_PREFIX
=
./install
\
-DCMAKE_BUILD_TYPE
=
Release
\
-DBUILD_SHARED_LIBS
=
OFF
\
...
...
@@ -21,6 +24,7 @@ cmake \
make
VERBOSE
=
1 -j4
make install
rm -fv ./install/include/cargs.h
libtool -static -o ./install/lib/libsherpa-onnx.a
\
./install/lib/libsherpa-onnx-c-api.a
\
...
...
@@ -34,3 +38,8 @@ libtool -static -o ./install/lib/libsherpa-onnx.a \
./install/lib/libpiper_phonemize.a
\
./install/lib/libespeak-ng.a
\
./install/lib/libssentencepiece_core.a
xcodebuild -create-xcframework
\
-library install/lib/libsherpa-onnx.a
\
-headers install/include
\
-output sherpa-onnx.xcframework
...
...
sherpa-onnx/c-api/cxx-api.h
查看文件 @
356da3b
...
...
@@ -315,4 +315,3 @@ class SHERPA_ONNX_API OfflineRecognizer
}
// namespace sherpa_onnx::cxx
#endif // SHERPA_ONNX_C_API_CXX_API_H_
//
...
...
请
注册
或
登录
后发表评论