@@ -6,36 +6,20 @@ dir=build-ios
6
6
mkdir -p $dir
7
7
cd $dir
8
8
onnxruntime_version=1.16.3
9
-
10
- if [ ! -f ios-onnxruntime/$onnxruntime_version /onnxruntime.xcframework/ios-arm64/onnxruntime.a ]; then
11
- if [ ! -d ios-onnxruntime ]; then
12
- GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/ios-onnxruntime
13
- fi
14
-
15
- pushd ios-onnxruntime
16
- git pull
17
-
9
+ onnxruntime_dir=ios-onnxruntime/$onnxruntime_version
10
+
11
+ if [ ! -f $onnxruntime_dir /onnxruntime.xcframework/ios-arm64/onnxruntime.a ]; then
12
+ mkdir -p $onnxruntime_dir
13
+ pushd $onnxruntime_dir
14
+ rm -f onnxruntime.xcframework-${onnxruntime_version} .tar.bz2
15
+ wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${onnxruntime_version} /onnxruntime.xcframework-${onnxruntime_version} .tar.bz2
16
+ tar xvf onnxruntime.xcframework-${onnxruntime_version} .tar.bz2
17
+ rm onnxruntime.xcframework-${onnxruntime_version} .tar.bz2
18
+ cd ..
18
19
ln -sf $onnxruntime_version /onnxruntime.xcframework .
19
- git lfs pull --include $onnxruntime_version /onnxruntime.xcframework/ios-arm64/onnxruntime.a
20
- git lfs pull --include $onnxruntime_version /onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a
21
20
popd
22
21
fi
23
22
24
- # check filesize
25
- filesize=$( ls -l ./ios-onnxruntime/$onnxruntime_version /onnxruntime.xcframework/ios-arm64/onnxruntime.a | tr -s " " " " | cut -d " " -f 5)
26
- if (( $filesize < 1000 )) ; then
27
- ls -lh ./ios-onnxruntime/onnxruntime.xcframework/ios-arm64/onnxruntime.a
28
- echo " Please use: git lfs pull to download ./ios-onnxruntime/$onnxruntime_version /onnxruntime.xcframework/ios-arm64/onnxruntime.a"
29
- exit 1
30
- fi
31
-
32
- filesize=$( ls -l ./ios-onnxruntime/$onnxruntime_version /onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a | tr -s " " " " | cut -d " " -f 5)
33
- if (( $filesize < 1000 )) ; then
34
- ls -lh ./ios-onnxruntime/$onnxruntime_version /onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a
35
- echo " Please use: git lfs pull to download ./ios-onnxruntime/$onnxruntime_version /onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a"
36
- exit 1
37
- fi
38
-
39
23
# First, for simulator
40
24
echo " Building for simulator (x86_64)"
41
25
0 commit comments