You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

lite_release_package.sh 2.7 kB

5 years ago
4 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/bash
  2. # Copyright 2020-2021 Huawei Technologies Co., Ltd
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # ============================================================================
  16. set -e
  17. function android_release_package()
  18. {
  19. arch=$1
  20. device=$2
  21. pkg_name="mindspore-lite-${version}-android-${arch}"
  22. rm -rf ${pkg_name}
  23. tar -xzf ${input_path}/android_${arch}/${device}/${pkg_name}.tar.gz
  24. # Copy java runtime to Android package
  25. cp ${input_path}/aar/mindspore-lite-*maven*.zip ${pkg_name}
  26. mkdir -p ${output_path}/release/android/${device}/
  27. tar -czf ${output_path}/release/android/${device}/${pkg_name}.tar.gz ${pkg_name}
  28. rm -rf ${pkg_name}
  29. cd ${output_path}/release/android/${device}/
  30. sha256sum ${pkg_name}.tar.gz > ${pkg_name}.tar.gz.sha256
  31. }
  32. function ios_release_package()
  33. {
  34. mkdir -p ${output_path}/release/ios/
  35. cp ${input_path}/ios_aarch64/*.tar.gz* ${output_path}/release/ios/
  36. cp ${input_path}/ios_aarch32/*.tar.gz* ${output_path}/release/ios/
  37. }
  38. function linux_release_package()
  39. {
  40. mkdir -p ${output_path}/release/linux/nnie/
  41. cp ${input_path}/ubuntu_x86/avx/*.tar.gz* ${output_path}/release/linux/
  42. cp ${input_path}/linux_aarch32/*.tar.gz* ${output_path}/release/linux/
  43. cp ${input_path}/ubuntu_x86/nnie/3516D/*.tar.gz* ${output_path}/release/linux/nnie/
  44. }
  45. function windows_release_package()
  46. {
  47. mkdir -p ${output_path}/release/windows/
  48. cp ${input_path}/windows_x64/avx/*.zip* ${output_path}/release/windows/
  49. cp ${input_path}/windows_x32/sse/*.zip* ${output_path}/release/windows/
  50. }
  51. echo "============================== begin =============================="
  52. echo "Usage: bash lite_release_package.sh input_path output_path"
  53. input_path=$1
  54. output_path=$2
  55. version=`ls ${input_path}/android_aarch64/npu/mindspore-lite-*-*.tar.gz | awk -F'/' '{print $NF}' | cut -d"-" -f3`
  56. android_release_package aarch32 npu
  57. android_release_package aarch32 cpu
  58. android_release_package aarch64 npu
  59. android_release_package aarch64 gpu
  60. ios_release_package
  61. linux_release_package
  62. windows_release_package
  63. echo "Create release package success!"
  64. echo "=============================== end ==============================="