Skip to content

Commit c6afeb6

Browse files
committed
impl(v3): update cmake-oldest-deps build
1 parent 54b6476 commit c6afeb6

6 files changed

Lines changed: 93 additions & 18 deletions

File tree

ci/cloudbuild/builds/cmake-oldest-deps.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ io::log_h2 "Testing"
5050
mapfile -t ctest_args < <(ctest::common_args)
5151
env -C cmake-out/build ctest "${ctest_args[@]}" -LE "integration-test"
5252

53-
integration::ctest_with_emulators "cmake-out/build"
53+
# TODO(#15947): Passing spanner here skips its test execution.
54+
integration::ctest_with_emulators "cmake-out/build" "spanner"

ci/cloudbuild/builds/lib/integration.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ function integration::ctest_with_emulators() {
308308
fi
309309

310310
local cmake_out="$1"
311+
local skip_args=("${@:2}")
312+
311313
mapfile -t ctest_args < <(ctest::common_args)
312314
# Integration tests are inherently flaky. Make up to three attempts to get the
313315
# test passing.
@@ -321,9 +323,11 @@ function integration::ctest_with_emulators() {
321323
"${PROJECT_ROOT}/google/cloud/storage/ci/${EMULATOR_SCRIPT}" \
322324
"${cmake_out}" "${ctest_args[@]}" -L integration-test-emulator
323325

324-
io::log_h2 "Running Spanner integration tests (with emulator)"
325-
"${PROJECT_ROOT}/google/cloud/spanner/ci/${EMULATOR_SCRIPT}" \
326-
"${cmake_out}" "${ctest_args[@]}" -L integration-test-emulator
326+
if ! [[ "${skip_args[*]}" =~ "spanner" ]]; then
327+
io::log_h2 "Running Spanner integration tests (with emulator)"
328+
"${PROJECT_ROOT}/google/cloud/spanner/ci/${EMULATOR_SCRIPT}" \
329+
"${cmake_out}" "${ctest_args[@]}" -L integration-test-emulator
330+
fi
327331

328332
io::log_h2 "Running Bigtable integration tests (with emulator)"
329333
"google/cloud/bigtable/ci/${EMULATOR_SCRIPT}" \
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM ubuntu:22.04
16+
17+
ENV DEBIAN_FRONTEND=noninteractive
18+
RUN apt-get update && \
19+
apt-get --no-install-recommends install -y \
20+
automake \
21+
build-essential \
22+
clang \
23+
cmake \
24+
curl \
25+
gawk \
26+
git \
27+
gcc \
28+
g++ \
29+
cmake \
30+
libcurl4-openssl-dev \
31+
libssl-dev \
32+
libtool \
33+
lsb-release \
34+
make \
35+
ninja-build \
36+
patch \
37+
pkg-config \
38+
python3 \
39+
python3-dev \
40+
python3-pip \
41+
tar \
42+
unzip \
43+
zip \
44+
wget \
45+
zlib1g-dev \
46+
apt-utils \
47+
ca-certificates \
48+
apt-transport-https
49+
50+
# Install Python packages used in the integration tests.
51+
RUN update-alternatives --install /usr/bin/python python $(which python3) 10
52+
RUN pip3 install setuptools wheel
53+
# The Cloud Pub/Sub emulator needs Java :shrug:
54+
RUN apt update && (apt install -y openjdk-11-jre || apt install -y openjdk-9-jre)
55+
56+
# Install the Cloud SDK and some of the emulators. We use the emulators to run
57+
# integration tests for the client libraries.
58+
COPY . /var/tmp/ci
59+
WORKDIR /var/tmp/downloads
60+
RUN /var/tmp/ci/install-cloud-sdk.sh
61+
ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk
62+
ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH}
63+
64+
RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${ARCH}" && \
65+
chmod +x /usr/bin/bazelisk && \
66+
ln -s /usr/bin/bazelisk /usr/bin/bazel

ci/cloudbuild/triggers/cmake-oldest-deps-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
2222
name: prepare-for-v3-0-0-cmake-oldest-deps-ci
2323
substitutions:
2424
_BUILD_NAME: cmake-oldest-deps
25-
_DISTRO: ubuntu-focal
25+
_DISTRO: ubuntu-22.04
2626
_TRIGGER_TYPE: ci
2727
tags:
2828
- ci

ci/cloudbuild/triggers/cmake-oldest-deps-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
2323
name: prepare-for-v3-0-0-cmake-oldest-deps-pr
2424
substitutions:
2525
_BUILD_NAME: cmake-oldest-deps
26-
_DISTRO: ubuntu-focal
26+
_DISTRO: ubuntu-22.04
2727
_TRIGGER_TYPE: pr
2828
tags:
2929
- pr

ci/etc/oldest-deps/vcpkg.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-cloud-cpp",
3-
"version": "2.17.0",
3+
"version": "3.0.0",
44
"description": "C++ Client Libraries for Google Cloud Platform APIs.",
55
"homepage": "https://github.com/googleapis/google-cloud-cpp",
66
"license": "Apache-2.0",
@@ -9,7 +9,6 @@
99
"builtin-baseline": "6d9ed568117dd958c543b3ab8d3ed692965cac34",
1010
"dependencies": [
1111
{"name": "abseil", "version>=": "20250127.1"},
12-
{"name": "crc32c", "version>=": "1.1.1"},
1312
{
1413
"name": "curl",
1514
"features": [
@@ -18,28 +17,33 @@
1817
},
1918
{
2019
"name": "grpc",
21-
"version>=": "1.33.1",
20+
"version>=": "1.71.0",
2221
"host": true
2322
},
2423
{
2524
"name": "protobuf",
26-
"version>=": "3.15.8",
25+
"version>=": "5.29.5",
2726
"host": true
2827
},
29-
{"name": "grpc", "version>=": "1.33.1"},
30-
{"name": "opentelemetry-cpp", "version>=": "1.20.0"},
31-
{"name": "protobuf", "version>=": "3.15.8"},
28+
{"name": "grpc", "version>=": "1.71.0"},
29+
{"name": "opentelemetry-cpp", "version>=": "1.22.0"},
30+
{"name": "protobuf", "version>=": "5.29.5"},
3231
{"name": "nlohmann-json", "version>=": "3.9.1"},
3332
"benchmark",
34-
{"name": "gtest", "version>=": "1.11.0", "host": true}
33+
{"name": "gtest", "version>=": "1.17.0", "host": true},
34+
"utf8-range",
35+
"re2"
3536
],
3637
"overrides": [
3738
{ "name": "abseil", "version": "20250127.1"},
38-
{ "name": "opentelemetry-cpp", "version": "1.20.0"},
39-
{ "name": "protobuf", "version": "3.15.8" },
40-
{ "name": "grpc", "version": "1.36.4" },
39+
{ "name": "opentelemetry-cpp", "version": "1.22.0"},
40+
{ "name": "protobuf", "version": "5.29.5" },
41+
{ "name": "utf8-range", "version": "5.29.5" },
42+
{ "name": "grpc", "version": "1.71.0" },
4143
{ "name": "upb", "version": "2020-12-19" },
42-
{ "name": "gtest", "version": "1.12.0" }
44+
{ "name": "benchmark", "version": "1.9.4" },
45+
{ "name": "re2", "version": "2025-08-12" },
46+
{ "name": "gtest", "version": "1.17.0" }
4347
],
4448
"configuration": {
4549
"overlay-ports" : [ "overlay-ports"]

0 commit comments

Comments
 (0)