Skip to content

Commit b9c983a

Browse files
authored
ci: workaround windows-bazel libcurl option issue (#15194)
1 parent efea210 commit b9c983a

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.github/workflows/windows-bazel.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ jobs:
8888
- name: Pre Build Disk Space
8989
shell: bash
9090
run: df -m
91+
- name: Check installed curl version
92+
shell: bash
93+
run: curl --version
9194
- name: Build google-cloud-cpp
9295
shell: bash
9396
run: |

ci/gha/builds/windows-bazel.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ mapfile -t args < <(bazel::common_args)
2828
mapfile -t test_args < <(bazel::test_args)
2929
mapfile -t msvc_args < <(bazel::msvc_args)
3030
test_args+=("${msvc_args[@]}")
31+
# TODO(15193): remove this workaround once the libcurl option issue is resolved.
32+
test_args+=("--copt=-DGOOGLE_CLOUD_CPP_WINDOWS_BAZEL_CI_WORKAROUND")
3133
if [[ $# -gt 1 ]]; then
3234
test_args+=("--compilation_mode=${1}")
3335
shift
@@ -60,3 +62,10 @@ if [[ "${EXECUTE_INTEGRATION_TESTS}" == "true" ]]; then
6062
}
6163
fi
6264
fi
65+
66+
io::log_h1 "Starting Clean Build of include tests"
67+
TIMEFORMAT="==> 🕑 bazel test done in %R seconds"
68+
time {
69+
io::run bazelisk clean --expunge
70+
io::run bazelisk "${args[@]}" test "${test_args[@]}" --cache_test_results=no -- //google/cloud/storage/tests:storage_include_test-default //google/cloud/storage/tests:storage_include_test-grpc-metadata
71+
}

google/cloud/internal/curl_impl.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,11 @@ Status CurlImpl::MakeRequest(HttpMethod method, RestContext& context,
370370
if (!status.ok()) return OnTransferError(context, std::move(status));
371371
}
372372

373+
#ifndef GOOGLE_CLOUD_CPP_WINDOWS_BAZEL_CI_WORKAROUND
373374
#if CURL_AT_LEAST_VERSION(7, 19, 4)
374375
status = handle_.SetOption(CURLOPT_NOPROXY, "metadata.google.internal");
375376
if (!status.ok()) return OnTransferError(context, std::move(status));
377+
#endif
376378
#endif
377379

378380
if (interface_) {

0 commit comments

Comments
 (0)