File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ set -eu
1818
1919source " $( dirname " $0 " ) /../../lib/init.sh"
2020source module ci/cloudbuild/builds/lib/cmake.sh
21+ source module ci/etc/quickstart-config.sh
22+ source module ci/lib/io.sh
2123
2224export CC=clang
2325export CXX=clang++
@@ -141,4 +143,28 @@ while IFS= read -r -d '' f; do
141143 fi
142144done < <( find " ${INSTALL_PREFIX} " -type f -print0)
143145
146+ # Verify that our installed artifacts are usable by compiling our quickstart
147+ # binaries against our installed artifacts.
148+ for lib in $( quickstart::libraries) ; do
149+ mapfile -t run_args < <( quickstart::arguments " ${lib} " )
150+ io::log_h2 " Building quickstart: ${lib} "
151+ if [[ " ${PROJECT_ID:- } " != " cloud-cpp-testing-resources" ]]; then
152+ run_args=() # Empties these args so we don't execute quickstarts below
153+ io::log_yellow " Not executing quickstarts," \
154+ " which can only run in GCB project 'cloud-cpp-testing-resources'"
155+ fi
156+
157+ io::log " [ CMake ]"
158+ src_dir=" ${PROJECT_ROOT} /google/cloud/${lib} /quickstart"
159+ bin_dir=" ${PROJECT_ROOT} /cmake-out/quickstart-${lib} "
160+ cmake -H" ${src_dir} " -B" ${bin_dir} " " -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} "
161+ cmake --build " ${bin_dir} "
162+ test " ${# run_args[@]} " -ne 0 && " ${bin_dir} /quickstart" " ${run_args[@]} "
163+
164+ echo
165+ io::log " [ Make ]"
166+ make -C " ${src_dir} "
167+ test " ${# run_args[@]} " -ne 0 && " ${src_dir} /quickstart" " ${run_args[@]} "
168+ done
169+
144170exit " ${exit_code} "
Original file line number Diff line number Diff line change @@ -153,3 +153,7 @@ RUN dnf makecache && dnf install -y java-latest-openjdk-devel
153153
154154# Install Bazel because some of the builds need it.
155155RUN /var/tmp/ci/install-bazel.sh
156+
157+ # Some of the above libraries may have installed in /usr/local, so make sure
158+ # those library directories will be found.
159+ RUN ldconfig /usr/local/lib*
You can’t perform that action at this time.
0 commit comments