about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCarlos O'Ryan <coryan@users.noreply.github.com>2019-10-16T21·26-0400
committerGitHub <noreply@github.com>2019-10-16T21·26-0400
commitc1d1b77f3040dc58cec174b83e57c6ba3078552d (patch)
tree59a0a7cea95747b4f05270bc0265292489976f0a
parent3b7a52d9f799d35244a91aca5b576d20a831b88d (diff)
feat: upgrade googleapis and bigquery protos (#24)
-rw-r--r--CMakeLists.txt45
-rw-r--r--ci/test-install/bigquery/CMakeLists.txt28
-rw-r--r--ci/test-install/bigquery/main.cc22
-rwxr-xr-xci/test-install/compile-test-projects.sh10
-rw-r--r--cmake/config.cmake.in6
5 files changed, 96 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab4ca87a25b0..8b159faa254a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,10 +39,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
 # downloaded from GitHub.
 set(
     GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL
-    "https://github.com/googleapis/googleapis/archive/9c9f778aedde02f9826d2ae5d0f9c96409ba0f25.tar.gz"
+    "https://github.com/googleapis/googleapis/archive/c6e62c7e5e61e6dae7fdc3bc3de81f60e6a9445c.tar.gz"
     )
 set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256
-    "13af135d8cc9b81b47d6fbfc258fe790a151956d06e01fd16671aa49fe536ab1")
+    "33520d6ac51fbb2ca136c06b32b5f5f04f9b5ae8596b161dbe0ae05b1927b4de")
 
 set(GOOGLEAPIS_CPP_SOURCE
     "${CMAKE_BINARY_DIR}/external/googleapis/src/googleapis_download")
@@ -52,6 +52,7 @@ set(GOOGLEAPIS_CPP_PROTO_FILES
     "google/api/annotations.proto"
     "google/api/auth.proto"
     "google/api/client.proto"
+    "google/api/field_behavior.proto"
     "google/api/label.proto"
     "google/api/launch_stage.proto"
     "google/api/metric.proto"
@@ -73,14 +74,20 @@ set(GOOGLEAPIS_CPP_PROTO_FILES
     "google/bigtable/admin/v2/table.proto"
     "google/bigtable/v2/bigtable.proto"
     "google/bigtable/v2/data.proto"
-    "google/cloud/bigquery/v2/model_reference.proto"
-    "google/cloud/bigquery/v2/standard_sql.proto"
-    "google/cloud/bigquery/v2/model.proto"
+    "google/cloud/bigquery/connection/v1beta1/connection.proto"
+    "google/cloud/bigquery/datatransfer/v1/datasource.proto"
+    "google/cloud/bigquery/datatransfer/v1/datatransfer.proto"
+    "google/cloud/bigquery/datatransfer/v1/transfer.proto"
+    "google/cloud/bigquery/logging/v1/audit_data.proto"
+    "google/cloud/bigquery/storage/v1beta1/arrow.proto"
+    "google/cloud/bigquery/storage/v1beta1/avro.proto"
     "google/cloud/bigquery/storage/v1beta1/read_options.proto"
     "google/cloud/bigquery/storage/v1beta1/storage.proto"
-    "google/cloud/bigquery/storage/v1beta1/avro.proto"
     "google/cloud/bigquery/storage/v1beta1/table_reference.proto"
-    "google/cloud/bigquery/storage/v1beta1/arrow.proto"
+    "google/cloud/bigquery/v2/encryption_config.proto"
+    "google/cloud/bigquery/v2/model.proto"
+    "google/cloud/bigquery/v2/model_reference.proto"
+    "google/cloud/bigquery/v2/standard_sql.proto"
     "google/spanner/admin/database/v1/spanner_database_admin.proto"
     "google/spanner/admin/instance/v1/spanner_instance_admin.proto"
     "google/spanner/v1/keys.proto"
@@ -189,6 +196,7 @@ googleapis_cpp_add_library("google/api/http.proto")
 googleapis_cpp_add_library("google/api/annotations.proto" api_http_protos)
 googleapis_cpp_add_library("google/api/auth.proto" api_annotations_protos)
 googleapis_cpp_add_library("google/api/client.proto")
+googleapis_cpp_add_library("google/api/field_behavior.proto")
 googleapis_cpp_add_library("google/api/label.proto")
 googleapis_cpp_add_library("google/api/launch_stage.proto")
 googleapis_cpp_add_library("google/api/metric.proto" api_launch_stage_protos
@@ -211,6 +219,7 @@ googleapis_cpp_add_library("google/iam/v1/policy.proto"
 googleapis_cpp_add_library("google/iam/v1/iam_policy.proto"
                            api_annotations_protos
                            api_client_protos
+                           api_field_behavior_protos
                            iam_v1_options_protos
                            iam_v1_policy_protos)
 
@@ -226,14 +235,20 @@ googleapis_cpp_add_library("google/devtools/cloudtrace/v2/tracing.proto"
 
 google_cloud_cpp_grpcpp_library(
     googleapis_cpp_cloud_bigquery_protos
-    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model_reference.proto"
-    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/standard_sql.proto"
-    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/connection/v1beta1/connection.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/datatransfer/v1/datasource.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/datatransfer/v1/datatransfer.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/datatransfer/v1/transfer.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/logging/v1/audit_data.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/arrow.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/avro.proto"
     "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/read_options.proto"
     "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/storage.proto"
-    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/avro.proto"
     "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/table_reference.proto"
-    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/storage/v1beta1/arrow.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/encryption_config.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/model_reference.proto"
+    "${GOOGLEAPIS_CPP_SOURCE}/google/cloud/bigquery/v2/standard_sql.proto"
     PROTO_PATH_DIRECTORIES
     "${GOOGLEAPIS_CPP_SOURCE}"
     "${PROTO_INCLUDE_DIR}")
@@ -241,7 +256,10 @@ googleapis_cpp_set_version_and_alias(cloud_bigquery_protos)
 target_link_libraries(googleapis_cpp_cloud_bigquery_protos
                       PUBLIC googleapis-c++::api_annotations_protos
                              googleapis-c++::api_http_protos
+                             googleapis-c++::api_field_behavior_protos
                              googleapis-c++::api_client_protos
+                             googleapis-c++::iam_v1_iam_policy_protos
+                             googleapis-c++::rpc_status_protos
                       PRIVATE googleapis_cpp_common_flags)
 
 google_cloud_cpp_grpcpp_library(
@@ -300,6 +318,7 @@ set(googleapis_cpp_installed_libraries_list
     googleapis_cpp_api_annotations_protos
     googleapis_cpp_api_auth_protos
     googleapis_cpp_api_client_protos
+    googleapis_cpp_api_field_behavior_protos
     googleapis_cpp_api_resource_protos
     googleapis_cpp_devtools_cloudtrace_v2_trace_protos
     googleapis_cpp_devtools_cloudtrace_v2_tracing_protos
@@ -396,6 +415,8 @@ string(CONCAT GOOGLE_CLOUD_CPP_PC_REQUIRES
               " googleapis_cpp_longrunning_operations_protos"
               " googleapis_cpp_api_auth_protos"
               " googleapis_cpp_api_annotations_protos"
+              " googleapis_cpp_api_client_protos"
+              " googleapis_cpp_api_field_behavior_protos"
               " googleapis_cpp_api_http_protos"
               " googleapis_cpp_rpc_status_protos"
               " googleapis_cpp_rpc_error_details_protos"
diff --git a/ci/test-install/bigquery/CMakeLists.txt b/ci/test-install/bigquery/CMakeLists.txt
new file mode 100644
index 000000000000..3086ef4617f4
--- /dev/null
+++ b/ci/test-install/bigquery/CMakeLists.txt
@@ -0,0 +1,28 @@
+# ~~~
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ~~~
+
+cmake_minimum_required(VERSION 3.5)
+
+project(utilize-googleapis CXX C)
+
+# Configure the compiler options, we will be using C++11 features.
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+find_package(googleapis REQUIRED)
+
+add_executable(utilize-googleapis main.cc)
+target_link_libraries(utilize-googleapis googleapis-c++::cloud_bigquery_protos)
diff --git a/ci/test-install/bigquery/main.cc b/ci/test-install/bigquery/main.cc
new file mode 100644
index 000000000000..bd00013eddb8
--- /dev/null
+++ b/ci/test-install/bigquery/main.cc
@@ -0,0 +1,22 @@
+// Copyright 2019 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <google/cloud/bigquery/storage/v1beta1/storage.grpc.pb.h>
+#include <grpcpp/grpcpp.h>
+
+int main() {
+  auto creds = grpc::InsecureChannelCredentials();
+  auto channel = grpc::CreateChannel("localhost:12345", creds);
+  auto stub = google::cloud::bigquery::storage::v1beta1::BigQueryStorage::NewStub(channel);
+}
diff --git a/ci/test-install/compile-test-projects.sh b/ci/test-install/compile-test-projects.sh
index 12487ef54862..47d612833eda 100755
--- a/ci/test-install/compile-test-projects.sh
+++ b/ci/test-install/compile-test-projects.sh
@@ -19,7 +19,15 @@
 
 set -eu
 
-# For bigtable protos
+# For BigQuery protos
+cp -R /home/build/cpp-cmakefiles/ci/test-install/bigquery \
+  /home/build/test-install-bigquery
+cd /home/build/test-install-bigquery
+cmake -H. -Bcmake-out
+cmake --build cmake-out -- -j "$(nproc)"
+cmake-out/utilize-googleapis
+
+# For Bigtable protos
 cp -R /home/build/cpp-cmakefiles/ci/test-install/bigtable \
   /home/build/test-install-bigtable
 cd /home/build/test-install-bigtable
diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in
index 295501e569b9..90c3d46489af 100644
--- a/cmake/config.cmake.in
+++ b/cmake/config.cmake.in
@@ -23,11 +23,13 @@ foreach (_target
          api_annotations
          api_auth
          api_client
+         api_field_behavior
          api_http
          api_resource
          bigtable
-	 devtools_cloudtrace_v2_trace
-	 devtools_cloudtrace_v2_tracing
+         cloud_bigquery
+         devtools_cloudtrace_v2_trace
+         devtools_cloudtrace_v2_tracing
          iam_v1_iam_policy
          iam_v1_options
          iam_v1_policy