Skip to content

Commit

Permalink
ci: update cmake quickstart handling for storage grpc (#14856)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthart authored Nov 22, 2024
1 parent bb5800b commit 77cbe79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
12 changes: 2 additions & 10 deletions ci/cloudbuild/builds/cmake-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,25 +213,17 @@ io::log_h1 "Build and run quickstarts"
# Tests the installed artifacts by building and running the quickstarts.
# shellcheck disable=SC2046
feature_list="$(printf "%s;" $(features::libraries))"
# GCS+gRPC and OpenTelemetry also have quickstarts.
# OpenTelemetry also has a quickstart.
feature_list="${feature_list}opentelemetry"

io::log_h2 "Most features"
io::log_h2 "All features"
cmake -G Ninja \
-S "${PROJECT_ROOT}/ci/verify_quickstart" \
-B "${PROJECT_ROOT}/cmake-out/quickstart" \
"-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX}" \
"-DFEATURES=${feature_list}"
cmake --build "${PROJECT_ROOT}/cmake-out/quickstart"

io::log_h2 "GCS+gRPC"
cmake -G Ninja \
-S "${PROJECT_ROOT}/ci/verify_quickstart" \
-B "${PROJECT_ROOT}/cmake-out/quickstart" \
"-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX}" \
"-DFEATURES=storage_grpc"
cmake --build "${PROJECT_ROOT}/cmake-out/quickstart"

io::log_h2 "Delete installed artifacts and run compiled quickstarts"
# Deletes all the installed artifacts, and installs only the runtime components
# to verify that we can still execute the compiled quickstart programs.
Expand Down
6 changes: 5 additions & 1 deletion ci/verify_quickstart/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ function (add_make_quickstart_target feature library target)
endfunction ()

foreach (feature IN LISTS FEATURES)
if ("${feature}" STREQUAL "storage_grpc")
# Regardless of whether "-" or "_" is used for storage+grpc, its quickstart
# does not follow the usual convention for feature to quickstart naming nor
# location.
if ("${feature}" STREQUAL "storage-grpc" OR "${feature}" STREQUAL
"storage_grpc")
add_cmake_quickstart_target("${feature}" storage quickstart_grpc)
add_make_quickstart_target("${feature}" storage quickstart_grpc)
continue()
Expand Down

0 comments on commit 77cbe79

Please sign in to comment.