From 9bdce0a30584fa1a3c66260d251a042243976541 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 21 Jul 2020 19:09:04 +0200 Subject: [PATCH 1/6] Move deepspeech_ios_test projects to same level as deepspeech_ios --- .../swift/deepspeech_ios.xcworkspace/contents.xcworkspacedata | 2 +- .../deepspeech_ios_test.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/xcschemes/deepspeech_ios_test.xcscheme | 0 .../{deepspeech_ios_test => }/AppDelegate.swift | 0 .../Assets.xcassets/AppIcon.appiconset/Contents.json | 0 .../{deepspeech_ios_test => }/Assets.xcassets/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../{deepspeech_ios_test => }/ContentView.swift | 0 .../deepspeech_ios_test/{deepspeech_ios_test => }/Info.plist | 0 .../Preview Content/Preview Assets.xcassets/Contents.json | 0 .../{deepspeech_ios_test => }/SceneDelegate.swift | 0 .../deepspeech_ios_testTests/Info.plist | 0 .../deepspeech_ios_testTests/deepspeech_ios_testTests.swift | 0 .../deepspeech_ios_testUITests/Info.plist | 0 .../deepspeech_ios_testUITests/deepspeech_ios_testUITests.swift | 0 17 files changed, 1 insertion(+), 1 deletion(-) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_test.xcodeproj/project.pbxproj (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_test.xcodeproj/xcshareddata/xcschemes/deepspeech_ios_test.xcscheme (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/AppDelegate.swift (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/Assets.xcassets/Contents.json (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/Base.lproj/LaunchScreen.storyboard (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/ContentView.swift (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/Info.plist (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/Preview Content/Preview Assets.xcassets/Contents.json (100%) rename native_client/swift/deepspeech_ios_test/{deepspeech_ios_test => }/SceneDelegate.swift (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_testTests/Info.plist (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_testTests/deepspeech_ios_testTests.swift (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_testUITests/Info.plist (100%) rename native_client/swift/{deepspeech_ios_test => }/deepspeech_ios_testUITests/deepspeech_ios_testUITests.swift (100%) diff --git a/native_client/swift/deepspeech_ios.xcworkspace/contents.xcworkspacedata b/native_client/swift/deepspeech_ios.xcworkspace/contents.xcworkspacedata index 73975e36..8aec54f0 100644 --- a/native_client/swift/deepspeech_ios.xcworkspace/contents.xcworkspacedata +++ b/native_client/swift/deepspeech_ios.xcworkspace/contents.xcworkspacedata @@ -5,6 +5,6 @@ location = "group:deepspeech_ios.xcodeproj"> + location = "group:deepspeech_ios_test.xcodeproj"> diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/project.pbxproj b/native_client/swift/deepspeech_ios_test.xcodeproj/project.pbxproj similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/project.pbxproj rename to native_client/swift/deepspeech_ios_test.xcodeproj/project.pbxproj diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/native_client/swift/deepspeech_ios_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to native_client/swift/deepspeech_ios_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/native_client/swift/deepspeech_ios_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to native_client/swift/deepspeech_ios_test.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/xcshareddata/xcschemes/deepspeech_ios_test.xcscheme b/native_client/swift/deepspeech_ios_test.xcodeproj/xcshareddata/xcschemes/deepspeech_ios_test.xcscheme similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test.xcodeproj/xcshareddata/xcschemes/deepspeech_ios_test.xcscheme rename to native_client/swift/deepspeech_ios_test.xcodeproj/xcshareddata/xcschemes/deepspeech_ios_test.xcscheme diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/AppDelegate.swift b/native_client/swift/deepspeech_ios_test/AppDelegate.swift similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/AppDelegate.swift rename to native_client/swift/deepspeech_ios_test/AppDelegate.swift diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Assets.xcassets/AppIcon.appiconset/Contents.json b/native_client/swift/deepspeech_ios_test/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Assets.xcassets/AppIcon.appiconset/Contents.json rename to native_client/swift/deepspeech_ios_test/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Assets.xcassets/Contents.json b/native_client/swift/deepspeech_ios_test/Assets.xcassets/Contents.json similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Assets.xcassets/Contents.json rename to native_client/swift/deepspeech_ios_test/Assets.xcassets/Contents.json diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Base.lproj/LaunchScreen.storyboard b/native_client/swift/deepspeech_ios_test/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Base.lproj/LaunchScreen.storyboard rename to native_client/swift/deepspeech_ios_test/Base.lproj/LaunchScreen.storyboard diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/ContentView.swift b/native_client/swift/deepspeech_ios_test/ContentView.swift similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/ContentView.swift rename to native_client/swift/deepspeech_ios_test/ContentView.swift diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Info.plist b/native_client/swift/deepspeech_ios_test/Info.plist similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Info.plist rename to native_client/swift/deepspeech_ios_test/Info.plist diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Preview Content/Preview Assets.xcassets/Contents.json b/native_client/swift/deepspeech_ios_test/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/Preview Content/Preview Assets.xcassets/Contents.json rename to native_client/swift/deepspeech_ios_test/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_test/SceneDelegate.swift b/native_client/swift/deepspeech_ios_test/SceneDelegate.swift similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_test/SceneDelegate.swift rename to native_client/swift/deepspeech_ios_test/SceneDelegate.swift diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_testTests/Info.plist b/native_client/swift/deepspeech_ios_testTests/Info.plist similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_testTests/Info.plist rename to native_client/swift/deepspeech_ios_testTests/Info.plist diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_testTests/deepspeech_ios_testTests.swift b/native_client/swift/deepspeech_ios_testTests/deepspeech_ios_testTests.swift similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_testTests/deepspeech_ios_testTests.swift rename to native_client/swift/deepspeech_ios_testTests/deepspeech_ios_testTests.swift diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_testUITests/Info.plist b/native_client/swift/deepspeech_ios_testUITests/Info.plist similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_testUITests/Info.plist rename to native_client/swift/deepspeech_ios_testUITests/Info.plist diff --git a/native_client/swift/deepspeech_ios_test/deepspeech_ios_testUITests/deepspeech_ios_testUITests.swift b/native_client/swift/deepspeech_ios_testUITests/deepspeech_ios_testUITests.swift similarity index 100% rename from native_client/swift/deepspeech_ios_test/deepspeech_ios_testUITests/deepspeech_ios_testUITests.swift rename to native_client/swift/deepspeech_ios_testUITests/deepspeech_ios_testUITests.swift From ce0ef4fd1ed7da9fe45169cfc83698de8b3e1d7c Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 21 Jul 2020 19:57:07 +0200 Subject: [PATCH 2/6] Build and publish deepspeech_ios.framework --- taskcluster/ios-arm64-tflite-opt.yml | 2 +- taskcluster/ios-build.sh | 6 +++-- taskcluster/ios-package.sh | 28 ++++++++++++++++++++++++ taskcluster/ios-x86_64-tflite-opt.yml | 2 +- taskcluster/scriptworker-task-github.yml | 5 +++++ taskcluster/tc-build-utils.sh | 15 +++++++++++++ 6 files changed, 54 insertions(+), 4 deletions(-) create mode 100755 taskcluster/ios-package.sh diff --git a/taskcluster/ios-arm64-tflite-opt.yml b/taskcluster/ios-arm64-tflite-opt.yml index cd85ca7f..0d8da19b 100644 --- a/taskcluster/ios-arm64-tflite-opt.yml +++ b/taskcluster/ios-arm64-tflite-opt.yml @@ -13,7 +13,7 @@ build: tensorflow: ${system.tensorflow.ios_arm64.url} scripts: build: "taskcluster/ios-build.sh --arm64" - package: "taskcluster/package.sh" + package: "taskcluster/ios-package.sh --arm64" nc_asset_name: "native_client.arm64.tflite.ios.tar.xz" maxRunTime: 14400 metadata: diff --git a/taskcluster/ios-build.sh b/taskcluster/ios-build.sh index ed99cb60..282f8c32 100755 --- a/taskcluster/ios-build.sh +++ b/taskcluster/ios-build.sh @@ -2,7 +2,7 @@ set -xe -platform=$1 +arch=$1 source $(dirname "$0")/tc-tests-utils.sh @@ -12,7 +12,7 @@ BAZEL_TARGETS=" //native_client:libdeepspeech.so " -if [ "${platform}" = "--arm64" ]; then +if [ "${arch}" = "--arm64" ]; then BAZEL_BUILD_FLAGS="${BAZEL_IOS_ARM64_FLAGS}" else BAZEL_BUILD_FLAGS="${BAZEL_IOS_X86_64_FLAGS}" @@ -21,3 +21,5 @@ fi BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" do_bazel_build + +do_deepspeech_ios_framework_build "${arch}" diff --git a/taskcluster/ios-package.sh b/taskcluster/ios-package.sh new file mode 100755 index 00000000..eb608054 --- /dev/null +++ b/taskcluster/ios-package.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -xe + +arch=$1 + +source $(dirname "$0")/tc-tests-utils.sh + +mkdir -p ${TASKCLUSTER_ARTIFACTS} || true + +cp ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel*.log ${TASKCLUSTER_ARTIFACTS}/ + +package_native_client "native_client.tar.xz" + +package_libdeepspeech_as_zip "libdeepspeech.zip" + +case $arch in +"--x86_64") + ${TAR} -cf - \ + -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphonesimulator/deepspeech_ios.framework \ + | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/ deepspeech_ios.framework.x86_64.tar.xz" + ;; +"--arm64") + ${TAR} -cf - \ + -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphoneos/deepspeech_ios.framework \ + | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/ deepspeech_ios.framework.arm64.tar.xz" +;; +esac diff --git a/taskcluster/ios-x86_64-tflite-opt.yml b/taskcluster/ios-x86_64-tflite-opt.yml index b55cebe7..22acb435 100644 --- a/taskcluster/ios-x86_64-tflite-opt.yml +++ b/taskcluster/ios-x86_64-tflite-opt.yml @@ -13,7 +13,7 @@ build: tensorflow: ${system.tensorflow.ios_x86_64.url} scripts: build: "taskcluster/ios-build.sh --x86_64" - package: "taskcluster/package.sh" + package: "taskcluster/ios-package.sh --x86_64" nc_asset_name: "native_client.x86_64.tflite.ios.tar.xz" maxRunTime: 14400 metadata: diff --git a/taskcluster/scriptworker-task-github.yml b/taskcluster/scriptworker-task-github.yml index 3003baad..f740a39d 100644 --- a/taskcluster/scriptworker-task-github.yml +++ b/taskcluster/scriptworker-task-github.yml @@ -20,6 +20,8 @@ build: - "win-amd64-cpu-opt" - "win-amd64-gpu-opt" - "win-amd64-ctc-opt" + - "ios-x86_64-tflite-opt" + - "ios-arm64-tflite-opt" allowed: - "tag" ref_match: "refs/tags/" @@ -66,6 +68,9 @@ build: - "win-amd64-cpu-opt" - "win-amd64-gpu-opt" - "win-amd64-tflite-opt" + ios: + - "ios-x86_64-tflite-opt" + - "ios-arm64-tflite-opt" metadata: name: "DeepSpeech GitHub Packages" description: "Trigger Uploading of DeepSpeech Packages to GitHub release page" diff --git a/taskcluster/tc-build-utils.sh b/taskcluster/tc-build-utils.sh index 75645582..349205f5 100755 --- a/taskcluster/tc-build-utils.sh +++ b/taskcluster/tc-build-utils.sh @@ -315,3 +315,18 @@ do_nuget_build() nuget pack nupkg/deepspeech.nuspec } + +do_deepspeech_ios_framework_build() +{ + arch=$1 + cp ${DS_TFDIR}/bazel-bin/native_client/libdeepspeech.so ${DS_DSDIR}/native_client/swift/libdeepspeech.so + cd ${DS_DSDIR}/native_client/swift + case $arch in + "--x86_64") + xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch x86_64 -sdk "iphonesimulator" -derivedDataPath DerivedData + ;; + "--arm64") + xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch arm64 -sdk "iphoneos" -derivedDataPath DerivedData + ;; + esac +} From 2fd1474e6992a873aa72856ca606913dbe765581 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 21 Jul 2020 20:12:17 +0200 Subject: [PATCH 3/6] Fix deepspeech_ios_project reference after folder move --- .../swift/deepspeech_ios_test.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native_client/swift/deepspeech_ios_test.xcodeproj/project.pbxproj b/native_client/swift/deepspeech_ios_test.xcodeproj/project.pbxproj index e9a7d0a2..eadc4fae 100644 --- a/native_client/swift/deepspeech_ios_test.xcodeproj/project.pbxproj +++ b/native_client/swift/deepspeech_ios_test.xcodeproj/project.pbxproj @@ -53,7 +53,7 @@ /* Begin PBXFileReference section */ 507CD3A024B61FE400409BBB /* deepspeech_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = deepspeech_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 507CD3A224B61FEA00409BBB /* libdeepspeech.so */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libdeepspeech.so; path = ../libdeepspeech.so; sourceTree = ""; }; + 507CD3A224B61FEA00409BBB /* libdeepspeech.so */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libdeepspeech.so; path = libdeepspeech.so; sourceTree = ""; }; 50F787EF2497683900D52237 /* deepspeech_ios_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = deepspeech_ios_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50F787F22497683900D52237 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 50F787F42497683900D52237 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; From 47685f059f8d81fc0e44ecfd8409b5683b109813 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 21 Jul 2020 23:52:29 +0200 Subject: [PATCH 4/6] Disable code signing in CI builds --- taskcluster/tc-build-utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskcluster/tc-build-utils.sh b/taskcluster/tc-build-utils.sh index 349205f5..ac0bd39e 100755 --- a/taskcluster/tc-build-utils.sh +++ b/taskcluster/tc-build-utils.sh @@ -323,10 +323,10 @@ do_deepspeech_ios_framework_build() cd ${DS_DSDIR}/native_client/swift case $arch in "--x86_64") - xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch x86_64 -sdk "iphonesimulator" -derivedDataPath DerivedData + xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch x86_64 -sdk "iphonesimulator" -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO ;; "--arm64") - xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch arm64 -sdk "iphoneos" -derivedDataPath DerivedData + xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch arm64 -sdk "iphoneos" -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO ;; esac } From 509d06d474c9c1f55ea7335bbf0223b38bf52996 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Wed, 22 Jul 2020 09:49:19 +0200 Subject: [PATCH 5/6] Fix typo in ios-package.sh --- taskcluster/ios-package.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/taskcluster/ios-package.sh b/taskcluster/ios-package.sh index eb608054..21f59de1 100755 --- a/taskcluster/ios-package.sh +++ b/taskcluster/ios-package.sh @@ -17,12 +17,12 @@ package_libdeepspeech_as_zip "libdeepspeech.zip" case $arch in "--x86_64") ${TAR} -cf - \ - -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphonesimulator/deepspeech_ios.framework \ - | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/ deepspeech_ios.framework.x86_64.tar.xz" + -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphonesimulator/ deepspeech_ios.framework \ + | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/deepspeech_ios.framework.x86_64.tar.xz" ;; "--arm64") ${TAR} -cf - \ - -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphoneos/deepspeech_ios.framework \ - | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/ deepspeech_ios.framework.arm64.tar.xz" + -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphoneos/ deepspeech_ios.framework \ + | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/deepspeech_ios.framework.arm64.tar.xz" ;; esac From 844b375e7d6af74223017392c697f917526e1e40 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Wed, 22 Jul 2020 10:23:35 +0200 Subject: [PATCH 6/6] Address review comments --- taskcluster/ios-package.sh | 14 ++++++++------ taskcluster/tc-build-utils.sh | 7 +++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/taskcluster/ios-package.sh b/taskcluster/ios-package.sh index 21f59de1..16cc9f96 100755 --- a/taskcluster/ios-package.sh +++ b/taskcluster/ios-package.sh @@ -16,13 +16,15 @@ package_libdeepspeech_as_zip "libdeepspeech.zip" case $arch in "--x86_64") - ${TAR} -cf - \ - -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphonesimulator/ deepspeech_ios.framework \ - | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/deepspeech_ios.framework.x86_64.tar.xz" + release_folder="Release-iphonesimulator" + artifact_name="deepspeech_ios.framework.x86_64.tar.xz" ;; "--arm64") - ${TAR} -cf - \ - -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphoneos/ deepspeech_ios.framework \ - | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/deepspeech_ios.framework.arm64.tar.xz" + release_folder="Release-iphoneos" + artifact_name="deepspeech_ios.framework.arm64.tar.xz" ;; esac + +${TAR} -cf - \ + -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/${release_folder}/ deepspeech_ios.framework \ + | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/${artifact_name}" \ No newline at end of file diff --git a/taskcluster/tc-build-utils.sh b/taskcluster/tc-build-utils.sh index ac0bd39e..d4386ff5 100755 --- a/taskcluster/tc-build-utils.sh +++ b/taskcluster/tc-build-utils.sh @@ -323,10 +323,13 @@ do_deepspeech_ios_framework_build() cd ${DS_DSDIR}/native_client/swift case $arch in "--x86_64") - xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch x86_64 -sdk "iphonesimulator" -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + iosSDK="iphonesimulator" + xcodeArch="x86_64" ;; "--arm64") - xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch arm64 -sdk "iphoneos" -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + iosSDK="iphoneos" + xcodeArch="arm64" ;; esac + xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch "${xcodeArch}" -sdk "${iosSDK}" -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO }