call build_android.sh from pytorch CI build script (#18918)
authorJiakai Liu <liujiakai@fb.com>
Mon, 8 Apr 2019 17:54:59 +0000 (10:54 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 8 Apr 2019 18:03:54 +0000 (11:03 -0700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18918
ghimport-source-id: 98c63da263adbbc6ac74a69ac117740c852833cd

Reviewed By: dreiss

Differential Revision: D14800727

Pulled By: ljk53

fbshipit-source-id: 4d06f845bb34bcdb74b0602404f2a0782f8c8783

.jenkins/pytorch/build.sh

index da974e4..4e412f7 100755 (executable)
@@ -56,6 +56,17 @@ if ! which conda; then
   fi
 fi
 
+# Use special scripts for Android builds
+if [[ "${BUILD_ENVIRONMENT}" == *-android* ]]; then
+  export ANDROID_NDK=/opt/ndk
+  build_args=()
+  build_args+=("-DBUILD_BINARY=ON")
+  build_args+=("-DBUILD_TEST=ON")
+  build_args+=("-DUSE_OBSERVERS=ON")
+  build_args+=("-DUSE_ZSTD=ON")
+  exec ./scripts/build_android.sh "${build_args[@]}" "$@"
+fi
+
 if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
   # When hcc runs out of memory, it silently exits without stopping
   # the build process, leaving undefined symbols in the shared lib