Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
build/
build-perf/
build-main/
build-perf-main/
cmake-out/
cmake-build-debug/
build-out/
Expand Down
36 changes: 36 additions & 0 deletions ci/cloudbuild/builds/integration-production-bq-driver-dm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ io::run cmake -B "$BUILD_DIR" \
"${cmake_args[@]}" \
-DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DODBC_INTEGRATION_TESTING=ON \
-DBQ_DRIVER_INTEGRATION_TESTS=ON \
-DODBC_DEMO_TESTING=ON \
Expand All @@ -81,6 +82,41 @@ io::run cmake -B "$BUILD_DIR" \
-DCLIENT_LIBRARY_INTEGRATION_TESTING=OFF
io::run cmake --build cmake-out

# ---------------------------------------------------------------------------
# Publish Google driver .so for performance benchmarks
# ---------------------------------------------------------------------------

if [[ "${UNIXODBC_INSTALLED}" == "false" ]]; then
DRIVER_SO="cmake-out/google/cloud/odbc/libgoogle_cloud_odbc_bq_driver.so"

if [[ ! -f "$DRIVER_SO" ]]; then
echo "ERROR: Google ODBC driver .so was not found:"
echo " $DRIVER_SO"
exit 1
fi

echo "Google driver found:"
ls -lh "$DRIVER_SO"

# Sanitize branch name for use in GCS path.
SANITIZED_BRANCH=$(
echo "${BRANCH_NAME}" |
sed -E 's/[^a-zA-Z0-9._-]/_/g'
)

PERF_DRIVER_BUCKET="gs://bq-dev-tools-testing-drivers/odbc-perf"

echo "Uploading Google driver artifact..."
echo "Branch: ${SANITIZED_BRANCH}"

gcloud storage cp \
"$DRIVER_SO" \
"${PERF_DRIVER_BUCKET}/${SANITIZED_BRANCH}/linux/libgoogle_cloud_odbc_bq_driver.so"

echo "Google driver benchmark artifact uploaded:"
echo "${PERF_DRIVER_BUCKET}/${SANITIZED_BRANCH}/linux/libgoogle_cloud_odbc_bq_driver.so"
fi

# Copy the roots.pem file to the .so directory to run test cases.
cp /opt/odbc-driver/roots.pem "cmake-out/google/cloud/odbc/roots.pem"
mapfile -t ctest_args < <(ctest::common_args)
Expand Down
Loading
Loading