Setup nightly releases for TensorFlowLiteSwift and TensorFlowLiteObjC pods
Nightly build is only released when there is code change in the corresponding source files.
PiperOrigin-RevId: 309751282
Change-Id: I760dce08545b1bca0c96b9d3a2fd3a4801fdb135
diff --git a/tensorflow/lite/experimental/objc/TensorFlowLiteObjC.podspec.template b/tensorflow/lite/experimental/objc/TensorFlowLiteObjC.podspec.template
new file mode 100644
index 0000000..963aa10
--- /dev/null
+++ b/tensorflow/lite/experimental/objc/TensorFlowLiteObjC.podspec.template
@@ -0,0 +1,46 @@
+Pod::Spec.new do |s|
+ s.name = 'TensorFlowLiteObjC'
+ s.version = '${TFL_BUILD_VERSION}'
+ s.authors = 'Google Inc.'
+ s.license = { :type => 'Apache' }
+ s.homepage = 'https://github.com/tensorflow/tensorflow'
+ s.source = { :git => 'https://github.com/tensorflow/tensorflow.git', :commit => '${SOURCE_COMMIT}' }
+ s.summary = 'TensorFlow Lite for Objective-C'
+ s.description = <<-DESC
+
+ TensorFlow Lite is TensorFlow's lightweight solution for Objective-C
+ developers. It enables low-latency inference of on-device machine learning
+ models with a small binary size and fast performance supporting hardware
+ acceleration.
+ DESC
+
+ s.ios.deployment_target = '9.0'
+
+ s.module_name = 'TFLTensorFlowLite'
+ s.static_framework = true
+
+ tfl_dir = 'tensorflow/lite/'
+ objc_dir = tfl_dir + 'experimental/objc/'
+ s.public_header_files = objc_dir + 'apis/*.h'
+ s.source_files = [
+ objc_dir + '{apis,sources}/*.{h,m,mm}',
+ tfl_dir + 'experimental/c/c_api.h',
+ tfl_dir + 'experimental/c/c_api_types.h',
+ ]
+ s.module_map = objc_dir + 'apis/framework.modulemap'
+ s.dependency 'TensorFlowLiteC', '~> 0.0.1-nightly'
+ s.pod_target_xcconfig = {
+ 'HEADER_SEARCH_PATHS' =>
+ '"${PODS_TARGET_SRCROOT}" ' +
+ '"${PODS_TARGET_SRCROOT}/' + objc_dir + 'apis"',
+ 'VALID_ARCHS' => 'x86_64 armv7 arm64',
+ }
+
+ s.test_spec 'Tests' do |ts|
+ ts.source_files = objc_dir + 'tests/*.m'
+ ts.resources = [
+ tfl_dir + 'testdata/add.bin',
+ tfl_dir + 'testdata/add_quantized.bin',
+ ]
+ end
+end
diff --git a/tensorflow/lite/experimental/swift/TensorFlowLiteSwift.podspec.template b/tensorflow/lite/experimental/swift/TensorFlowLiteSwift.podspec.template
new file mode 100644
index 0000000..9e875b4
--- /dev/null
+++ b/tensorflow/lite/experimental/swift/TensorFlowLiteSwift.podspec.template
@@ -0,0 +1,33 @@
+Pod::Spec.new do |s|
+ s.name = 'TensorFlowLiteSwift'
+ s.version = '${TFL_BUILD_VERSION}'
+ s.authors = 'Google Inc.'
+ s.license = { :type => 'Apache' }
+ s.homepage = 'https://github.com/tensorflow/tensorflow'
+ s.source = { :git => 'https://github.com/tensorflow/tensorflow.git', :commit => '${SOURCE_COMMIT}' }
+ s.summary = 'TensorFlow Lite for Swift'
+ s.description = <<-DESC
+
+ TensorFlow Lite is TensorFlow's lightweight solution for Swift developers. It
+ enables low-latency inference of on-device machine learning models with a
+ small binary size and fast performance supporting hardware acceleration.
+ DESC
+
+ s.ios.deployment_target = '9.0'
+
+ s.module_name = 'TensorFlowLite'
+ s.static_framework = true
+
+ tfl_dir = 'tensorflow/lite/'
+ swift_dir = tfl_dir + 'experimental/swift/'
+ s.source_files = swift_dir + 'Sources/*.swift'
+ s.dependency 'TensorFlowLiteC', '~> 0.0.1-nightly'
+
+ s.test_spec 'Tests' do |ts|
+ ts.source_files = swift_dir + 'Tests/*.swift'
+ ts.resources = [
+ tfl_dir + 'testdata/add.bin',
+ tfl_dir + 'testdata/add_quantized.bin',
+ ]
+ end
+end