正在显示
2 个修改的文件
包含
94 行增加
和
1 行删除
release.sh
0 → 100755
| 1 | +#!/usr/bin/env bash | ||
| 2 | +# | ||
| 3 | +# Copyright (c) 2023 Xiaomi Corporation | ||
| 4 | +# | ||
| 5 | +# Please see the end of this file for what files it will generate | ||
| 6 | + | ||
| 7 | +SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 8 | +echo "SHERPA_ONNX_VERSION: ${SHERPA_ONNX_VERSION}" | ||
| 9 | +dst=v${SHERPA_ONNX_VERSION} | ||
| 10 | + | ||
| 11 | +if [ -d $dst ]; then | ||
| 12 | + echo "$dst exists - skipping" | ||
| 13 | + exit 0 | ||
| 14 | +fi | ||
| 15 | + | ||
| 16 | +./build-android-x86-64.sh | ||
| 17 | +./build-android-armv7-eabi.sh | ||
| 18 | +./build-android-x86-64.sh | ||
| 19 | +./build-ios.sh | ||
| 20 | + | ||
| 21 | +mkdir -p $dst/jniLibs/arm64-v8a | ||
| 22 | +cp -v ./build-android-arm64-v8a/install/lib/*.so $dst/jniLibs/arm64-v8a/ | ||
| 23 | + | ||
| 24 | +mkdir -p $dst/jniLibs/armeabi-v7a | ||
| 25 | +cp -v ./build-android-armv7-eabi/install/lib/*.so $dst/jniLibs/armeabi-v7a/ | ||
| 26 | + | ||
| 27 | +mkdir -p $dst/jniLibs/x86_64 | ||
| 28 | +cp -v ./build-android-x86-64/install/lib/*.so $dst/jniLibs/x86_64 | ||
| 29 | + | ||
| 30 | +mkdir -p $dst/build-ios/ | ||
| 31 | +cp -av ./build-ios/sherpa-onnx.xcframework $dst/build-ios/ | ||
| 32 | + | ||
| 33 | +mkdir -p $dst/build-ios/ios-onnxruntime | ||
| 34 | +cp -av ./build-ios/ios-onnxruntime/onnxruntime.xcframework $dst/build-ios/ios-onnxruntime/ | ||
| 35 | + | ||
| 36 | +cd $dst | ||
| 37 | + | ||
| 38 | +tar cjvf sherpa-onnx-v${SHERPA_ONNX_VERSION}-pre-compiled-android-libs.tar.bz2 ./jniLibs | ||
| 39 | + | ||
| 40 | +tar cjvf sherpa-onnx-v${SHERPA_ONNX_VERSION}-pre-compiled-ios-libs.tar.bz2 ./build-ios | ||
| 41 | + | ||
| 42 | +# . | ||
| 43 | +# ├── build-ios | ||
| 44 | +# │ ├── ios-onnxruntime | ||
| 45 | +# │ │ └── onnxruntime.xcframework | ||
| 46 | +# │ │ ├── Headers | ||
| 47 | +# │ │ │ ├── cpu_provider_factory.h | ||
| 48 | +# │ │ │ ├── onnxruntime_c_api.h | ||
| 49 | +# │ │ │ ├── onnxruntime_cxx_api.h | ||
| 50 | +# │ │ │ └── onnxruntime_cxx_inline.h | ||
| 51 | +# │ │ ├── Info.plist | ||
| 52 | +# │ │ ├── ios-arm64 | ||
| 53 | +# │ │ │ ├── libonnxruntime.a -> onnxruntime.a | ||
| 54 | +# │ │ │ └── onnxruntime.a | ||
| 55 | +# │ │ └── ios-arm64_x86_64-simulator | ||
| 56 | +# │ │ ├── libonnxruntime.a -> onnxruntime.a | ||
| 57 | +# │ │ └── onnxruntime.a | ||
| 58 | +# │ └── sherpa-onnx.xcframework | ||
| 59 | +# │ ├── Headers | ||
| 60 | +# │ │ └── sherpa-onnx | ||
| 61 | +# │ │ └── c-api | ||
| 62 | +# │ │ └── c-api.h | ||
| 63 | +# │ ├── Info.plist | ||
| 64 | +# │ ├── ios-arm64 | ||
| 65 | +# │ │ ├── libsherpa-onnx.a -> sherpa-onnx.a | ||
| 66 | +# │ │ └── sherpa-onnx.a | ||
| 67 | +# │ └── ios-arm64_x86_64-simulator | ||
| 68 | +# │ ├── libsherpa-onnx.a -> sherpa-onnx.a | ||
| 69 | +# │ └── sherpa-onnx.a | ||
| 70 | +# ├── jniLibs | ||
| 71 | +# │ ├── arm64-v8a | ||
| 72 | +# │ │ ├── libkaldi-native-fbank-core.so | ||
| 73 | +# │ │ ├── libonnxruntime.so | ||
| 74 | +# │ │ ├── libsherpa-onnx-c-api.so | ||
| 75 | +# │ │ ├── libsherpa-onnx-core.so | ||
| 76 | +# │ │ └── libsherpa-onnx-jni.so | ||
| 77 | +# │ ├── armeabi-v7a | ||
| 78 | +# │ │ ├── libkaldi-native-fbank-core.so | ||
| 79 | +# │ │ ├── libonnxruntime.so | ||
| 80 | +# │ │ ├── libsherpa-onnx-c-api.so | ||
| 81 | +# │ │ ├── libsherpa-onnx-core.so | ||
| 82 | +# │ │ └── libsherpa-onnx-jni.so | ||
| 83 | +# │ └── x86_64 | ||
| 84 | +# │ ├── libkaldi-native-fbank-core.so | ||
| 85 | +# │ ├── libonnxruntime.so | ||
| 86 | +# │ ├── libsherpa-onnx-core.so | ||
| 87 | +# │ └── libsherpa-onnx-jni.so | ||
| 88 | +# ├── sherpa-onnx-v1.4.1-pre-compiled-android-libs.tar.bz2 | ||
| 89 | +# └── sherpa-onnx-v1.4.1-pre-compiled-ios-libs.tar.bz2 | ||
| 90 | +# | ||
| 91 | +# 16 directories, 31 files | ||
| 92 | +# | ||
| 93 | +# 1.4.1 is the current version listed in ./CMakeLists.txt |
-
请 注册 或 登录 后发表评论