|
|
|
@ -15,10 +15,6 @@ |
|
|
|
|
|
|
|
|
|
set -ex |
|
|
|
|
|
|
|
|
|
# Install packages which were not preinstalled yet. |
|
|
|
|
# Protobuf needs autoconf & automake to build |
|
|
|
|
sudo apt-get install -y autoconf automake |
|
|
|
|
|
|
|
|
|
# Accept the Android SDK licences. |
|
|
|
|
yes | /opt/android-sdk/current/tools/bin/sdkmanager --licenses |
|
|
|
|
|
|
|
|
@ -30,17 +26,24 @@ REPO_ROOT="$(pwd)" |
|
|
|
|
git submodule update --init |
|
|
|
|
|
|
|
|
|
# Build protoc and grpc_cpp_plugin. Codegen is not cross-compiled to Android |
|
|
|
|
make HAS_SYSTEM_PROTOBUF=false |
|
|
|
|
mkdir -p cmake/build |
|
|
|
|
pushd cmake/build |
|
|
|
|
cmake -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../.. |
|
|
|
|
make protoc grpc_cpp_plugin -j2 |
|
|
|
|
popd |
|
|
|
|
|
|
|
|
|
PROTOC=${REPO_ROOT}/cmake/build/third_party/protobuf/protoc |
|
|
|
|
PLUGIN=${REPO_ROOT}/cmake/build/grpc_cpp_plugin |
|
|
|
|
|
|
|
|
|
# Build and run interop instrumentation tests on Firebase Test Lab |
|
|
|
|
|
|
|
|
|
cd "${REPO_ROOT}/src/android/test/interop/" |
|
|
|
|
./gradlew assembleDebug \ |
|
|
|
|
"-Pprotoc=${REPO_ROOT}/third_party/protobuf/src/protoc" \ |
|
|
|
|
"-Pgrpc_cpp_plugin=${REPO_ROOT}/bins/opt/grpc_cpp_plugin" |
|
|
|
|
"-Pprotoc=${PROTOC}" \ |
|
|
|
|
"-Pgrpc_cpp_plugin=${PLUGIN}" |
|
|
|
|
./gradlew assembleDebugAndroidTest \ |
|
|
|
|
"-Pprotoc=${REPO_ROOT}/third_party/protobuf/src/protoc" \ |
|
|
|
|
"-Pgrpc_cpp_plugin=${REPO_ROOT}/bins/opt/grpc_cpp_plugin" |
|
|
|
|
"-Pprotoc=${PROTOC}" \ |
|
|
|
|
"-Pgrpc_cpp_plugin=${PLUGIN}" |
|
|
|
|
gcloud firebase test android run \ |
|
|
|
|
--type instrumentation \ |
|
|
|
|
--app app/build/outputs/apk/debug/app-debug.apk \ |
|
|
|
@ -59,5 +62,5 @@ gcloud firebase test android run \ |
|
|
|
|
|
|
|
|
|
cd "${REPO_ROOT}/examples/android/helloworld" |
|
|
|
|
./gradlew build \ |
|
|
|
|
"-Pprotoc=${REPO_ROOT}/third_party/protobuf/src/protoc" \ |
|
|
|
|
"-Pgrpc_cpp_plugin=${REPO_ROOT}/bins/opt/grpc_cpp_plugin" |
|
|
|
|
"-Pprotoc=${PROTOC}" \ |
|
|
|
|
"-Pgrpc_cpp_plugin=${PLUGIN}" |
|
|
|
|