Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and publish iOS framework in GitHub release files #3173

Merged
merged 6 commits into from
Jul 22, 2020

Conversation

reuben
Copy link
Contributor

@reuben reuben commented Jul 21, 2020

No description provided.

@reuben reuben force-pushed the ios-framework-publish branch from 386bb80 to 47685f0 Compare July 21, 2020 22:19
@reuben reuben requested a review from lissyx July 22, 2020 08:05

package_libdeepspeech_as_zip "libdeepspeech.zip"

case $arch in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we really need the case here? I feel like we could just have

  ${TAR} -cf - \
         -C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-*/ deepspeech_ios.framework \
         | ${XZ} > "${TASKCLUSTER_ARTIFACTS}/deepspeech_ios.framework.${arch}.tar.xz"

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we could just have the case set a few variables like the SDK variant and have one xcodebuild call after:

  case $arch in
  "--x86_64")
    iosSdk="iphonesimulator"
    ;;
  "--arm64")
    iosSdk="iphoneos"
    ;;
  esac
xcodebuild -workspace deepspeech_ios.xcworkspace -scheme deepspeech_ios_test -configuration Release -arch ${arch} -sdk ${iosSdk} -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

Copy link
Collaborator

@lissyx lissyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, two nits but it's not a big deal we can take care of that later

;;
esac

${TAR} -cf - \
-C ${DS_ROOT_TASK}/DeepSpeech/ds/native_client/swift/DerivedData/Build/Products/Release-iphonesimulator/ deepspeech_ios.framework \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you going to have an issue here with Release-iphonesimulator ? ARM64 builds seems to end up in Release-iphoneos ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh. nice catch

@reuben reuben force-pushed the ios-framework-publish branch from fa1d2f4 to 844b375 Compare July 22, 2020 08:36
@reuben reuben merged commit 38f6afd into master Jul 22, 2020
@reuben reuben deleted the ios-framework-publish branch July 22, 2020 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants