Skip to content

Commit e23bcd2

Browse files
authored
ci: build demo builds in debug mode (#15988)
1 parent c8a2a88 commit e23bcd2

10 files changed

Lines changed: 94 additions & 81 deletions

ci/cloudbuild/builds/demo-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fi
4747
PREFIX="${HOME}/google-cloud-cpp-installed"
4848
cmake -S . -B cmake-out \
4949
"${cmake_config_testing_details[@]}" \
50-
-DCMAKE_BUILD_TYPE=Release \
50+
-DCMAKE_BUILD_TYPE=Debug \
5151
-DCMAKE_CXX_STANDARD=17 \
5252
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
5353
-DBUILD_TESTING=OFF \

ci/cloudbuild/builds/grpc-at-head.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ source "$(dirname "$0")/../../lib/init.sh"
2020
source module ci/cloudbuild/builds/lib/bazel.sh
2121
source module ci/cloudbuild/builds/lib/cloudcxxrc.sh
2222
source module ci/cloudbuild/builds/lib/integration.sh
23+
source module ci/etc/quickstart-config.sh
2324

2425
rm -fr /h/grpc && git -C /h clone -q --depth 1 https://github.com/grpc/grpc.git
2526
rm -fr /h/protobuf && mkdir -p /h/protobuf &&
26-
curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v25.0.tar.gz |
27+
curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v31.1.tar.gz |
2728
tar -C /h/protobuf -xzf - --strip-components=1
2829

2930
mapfile -t args < <(bazel::common_args)
@@ -35,3 +36,9 @@ bazel test "${args[@]}" --test_tag_filters=-integration-test "${BAZEL_TARGETS[@]
3536

3637
mapfile -t integration_args < <(integration::bazel_args)
3738
integration::bazel_with_emulators test "${args[@]}" "${integration_args[@]}"
39+
40+
for lib in $(quickstart::libraries); do
41+
io::log_h2 "Building Bazel quickstart for ${lib} using MODULE"
42+
USE_BAZEL_VERSION=8.5.1 io::run env -C "${PROJECT_ROOT}/google/cloud/${lib}/quickstart" \
43+
bazel build --noenable_workspace --enable_bzlmod "${args[@]}" :quickstart
44+
done

ci/cloudbuild/builds/lib/quickstart.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function cleanup() {
3838
io::log_h2 "cleanup on EXIT with exit_status=${exit_status}"
3939
if ((exit_status != 0)); then
4040
io::run find . -name 'core'
41-
gdb --exec="${quickstart_program}" --core=./core --eval-command="bt full"
41+
io::run gdb --exec="${quickstart_program}" --core=./core --eval-command="thread apply all bt"
4242
fi
4343
}
4444

ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ARG NCPU=4
2323
RUN apt-get update && \
2424
apt-get --no-install-recommends install -y apt-transport-https apt-utils \
2525
automake build-essential ca-certificates cmake curl git \
26-
gcc g++ m4 make ninja-build pkg-config tar wget zlib1g-dev
26+
gcc g++ m4 make ninja-build pkg-config tar wget zlib1g-dev libc6-dbg
2727
# ```
2828

2929
# Install the development packages for direct `google-cloud-cpp` dependencies:
@@ -62,7 +62,7 @@ WORKDIR /var/tmp/build/abseil-cpp
6262
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
6363
tar -xzf - --strip-components=1 && \
6464
cmake \
65-
-DCMAKE_BUILD_TYPE=Release \
65+
-DCMAKE_BUILD_TYPE=Debug \
6666
-DCMAKE_CXX_STANDARD=17 \
6767
-DABSL_BUILD_TESTING=OFF \
6868
-DBUILD_SHARED_LIBS=yes \
@@ -79,7 +79,7 @@ WORKDIR /var/tmp/build/protobuf
7979
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \
8080
tar -xzf - --strip-components=1 && \
8181
cmake \
82-
-DCMAKE_BUILD_TYPE=Release \
82+
-DCMAKE_BUILD_TYPE=Debug \
8383
-DCMAKE_CXX_STANDARD=17 \
8484
-DBUILD_SHARED_LIBS=yes \
8585
-Dprotobuf_BUILD_TESTS=OFF \
@@ -97,7 +97,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp
9797
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
9898
tar -xzf - --strip-components=1 && \
9999
cmake \
100-
-DCMAKE_BUILD_TYPE=Release \
100+
-DCMAKE_BUILD_TYPE=Debug \
101101
-DCMAKE_CXX_STANDARD=17 \
102102
-DBUILD_SHARED_LIBS=yes \
103103
-DWITH_EXAMPLES=OFF \
@@ -117,7 +117,7 @@ WORKDIR /var/tmp/build/c-ares
117117
RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \
118118
tar -xzf - --strip-components=1 && \
119119
cmake \
120-
-DCMAKE_BUILD_TYPE=Release \
120+
-DCMAKE_BUILD_TYPE=Debug \
121121
-DBUILD_SHARED_LIBS=yes \
122122
-S . -B cmake-out && \
123123
cmake --build cmake-out --target install && \
@@ -130,7 +130,7 @@ RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.t
130130
WORKDIR /var/tmp/build/re2
131131
RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \
132132
tar -xzf - --strip-components=1 && \
133-
cmake -DCMAKE_BUILD_TYPE=Release \
133+
cmake -DCMAKE_BUILD_TYPE=Debug \
134134
-DBUILD_SHARED_LIBS=ON \
135135
-DRE2_BUILD_TESTING=OFF \
136136
-S . -B cmake-out && \
@@ -145,7 +145,7 @@ WORKDIR /var/tmp/build/grpc
145145
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
146146
tar -xzf - --strip-components=1 && \
147147
cmake \
148-
-DCMAKE_BUILD_TYPE=Release \
148+
-DCMAKE_BUILD_TYPE=Debug \
149149
-DCMAKE_CXX_STANDARD=17 \
150150
-DBUILD_SHARED_LIBS=yes \
151151
-DgRPC_INSTALL=ON \

ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN apt-get update && \
2424
apt-get --no-install-recommends install -y apt-transport-https apt-utils \
2525
automake build-essential ca-certificates curl git \
2626
gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev \
27-
libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev
27+
libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev libc6-dbg
2828
# ```
2929

3030
# #### Install CMake v3.22
@@ -40,7 +40,7 @@ WORKDIR /var/tmp/build/abseil-cpp
4040
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
4141
tar -xzf - --strip-components=1 && \
4242
cmake \
43-
-DCMAKE_BUILD_TYPE=Release \
43+
-DCMAKE_BUILD_TYPE=Debug \
4444
-DCMAKE_CXX_STANDARD=17 \
4545
-DABSL_BUILD_TESTING=OFF \
4646
-DBUILD_SHARED_LIBS=yes \
@@ -71,7 +71,7 @@ WORKDIR /var/tmp/build/protobuf
7171
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \
7272
tar -xzf - --strip-components=1 && \
7373
cmake \
74-
-DCMAKE_BUILD_TYPE=Release \
74+
-DCMAKE_BUILD_TYPE=Debug \
7575
-DCMAKE_CXX_STANDARD=17 \
7676
-DBUILD_SHARED_LIBS=yes \
7777
-Dprotobuf_BUILD_TESTS=OFF \
@@ -91,7 +91,7 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz
9191
WORKDIR /var/tmp/build/re2
9292
RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \
9393
tar -xzf - --strip-components=1 && \
94-
cmake -DCMAKE_BUILD_TYPE=Release \
94+
cmake -DCMAKE_BUILD_TYPE=Debug \
9595
-DBUILD_SHARED_LIBS=ON \
9696
-DRE2_BUILD_TESTING=OFF \
9797
-S . -B cmake-out && \
@@ -107,7 +107,7 @@ WORKDIR /var/tmp/build/grpc
107107
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
108108
tar -xzf - --strip-components=1 && \
109109
cmake \
110-
-DCMAKE_BUILD_TYPE=Release \
110+
-DCMAKE_BUILD_TYPE=Debug \
111111
-DCMAKE_CXX_STANDARD=17 \
112112
-DBUILD_SHARED_LIBS=yes \
113113
-DgRPC_INSTALL=ON \
@@ -130,7 +130,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp
130130
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
131131
tar -xzf - --strip-components=1 && \
132132
cmake \
133-
-DCMAKE_BUILD_TYPE=Release \
133+
-DCMAKE_BUILD_TYPE=Debug \
134134
-DCMAKE_CXX_STANDARD=17 \
135135
-DBUILD_SHARED_LIBS=yes \
136136
-DWITH_EXAMPLES=OFF \

ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ ARG NCPU=4
2222
# ```bash
2323
RUN dnf makecache && \
2424
dnf install -y cmake curl findutils gcc-c++ git make ninja-build \
25-
patch unzip tar wget zip
25+
patch unzip tar wget zip dnf-utils
26+
RUN dnf makecache && dnf debuginfo-install -y glibc
2627
# ```
2728

2829
# Fedora:40 includes packages, with recent enough versions, for most of the

ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ RUN dnf makecache && \
2727
dnf makecache && \
2828
dnf install -y cmake findutils gcc-c++ git make openssl-devel \
2929
patch zlib-devel libcurl-devel c-ares-devel tar wget which \
30-
autoconf automake libtool binutils
30+
autoconf automake libtool binutils dnf-utils
31+
RUN dnf makecache && dnf debuginfo-install -y glibc
32+
3133
# ```
3234

3335
# Set some useful environment variables.
@@ -73,7 +75,7 @@ WORKDIR /var/tmp/build/abseil-cpp
7375
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
7476
tar -xzf - --strip-components=1 && \
7577
cmake \
76-
-DCMAKE_BUILD_TYPE=Release \
78+
-DCMAKE_BUILD_TYPE=Debug \
7779
-DCMAKE_CXX_STANDARD=17 \
7880
-DABSL_BUILD_TESTING=OFF \
7981
-DBUILD_SHARED_LIBS=yes \
@@ -94,7 +96,7 @@ WORKDIR /var/tmp/build/protobuf
9496
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \
9597
tar -xzf - --strip-components=1 && \
9698
cmake \
97-
-DCMAKE_BUILD_TYPE=Release \
99+
-DCMAKE_BUILD_TYPE=Debug \
98100
-DCMAKE_CXX_STANDARD=17 \
99101
-DBUILD_SHARED_LIBS=yes \
100102
-Dprotobuf_BUILD_TESTS=OFF \
@@ -115,7 +117,7 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz
115117
WORKDIR /var/tmp/build/re2
116118
RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \
117119
tar -xzf - --strip-components=1 && \
118-
cmake -DCMAKE_BUILD_TYPE=Release \
120+
cmake -DCMAKE_BUILD_TYPE=Debug \
119121
-DBUILD_SHARED_LIBS=ON \
120122
-DRE2_BUILD_TESTING=OFF \
121123
-S . -B cmake-out && \
@@ -137,7 +139,7 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
137139
tar -xzf - --strip-components=1 && \
138140
cmake \
139141
-DCMAKE_CXX_STANDARD=17 \
140-
-DCMAKE_BUILD_TYPE=Release \
142+
-DCMAKE_BUILD_TYPE=Debug \
141143
-DBUILD_SHARED_LIBS=yes \
142144
-DgRPC_INSTALL=ON \
143145
-DgRPC_BUILD_TESTS=OFF \
@@ -165,7 +167,7 @@ WORKDIR /var/tmp/build/json
165167
RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \
166168
tar -xzf - --strip-components=1 && \
167169
cmake \
168-
-DCMAKE_BUILD_TYPE=Release \
170+
-DCMAKE_BUILD_TYPE=Debug \
169171
-DBUILD_SHARED_LIBS=yes \
170172
-DBUILD_TESTING=OFF \
171173
-DJSON_BuildTests=OFF \
@@ -181,8 +183,8 @@ WORKDIR /var/tmp/build/opentelemetry-cpp
181183
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
182184
tar -xzf - --strip-components=1 && \
183185
cmake \
184-
-DCMAKE_BUILD_TYPE=Release \
185-
-DCMAKE_CXX_STANDARD=17 \
186+
-DCMAKE_BUILD_TYPE=Debug \
187+
-DCMAKE_CXX_STANDARD=17 \
186188
-DBUILD_SHARED_LIBS=yes \
187189
-DWITH_EXAMPLES=OFF \
188190
-DWITH_STL=CXX17 \

ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ARG NCPU=4
2323
ENV DEBIAN_FRONTEND=noninteractive
2424
RUN apt-get update && \
2525
apt-get --no-install-recommends install -y apt-transport-https apt-utils \
26-
cmake ca-certificates curl git gcc g++ m4 make tar
26+
cmake ca-certificates curl git gcc g++ m4 make tar libc6-dbg
2727
# ```
2828

2929
# Ubuntu:24 includes packages for most of the direct dependencies of
@@ -66,7 +66,7 @@ WORKDIR /var/tmp/build/abseil-cpp
6666
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
6767
tar -xzf - --strip-components=1 && \
6868
cmake \
69-
-DCMAKE_BUILD_TYPE=Release \
69+
-DCMAKE_BUILD_TYPE=Debug \
7070
-DABSL_BUILD_TESTING=OFF \
7171
-DBUILD_SHARED_LIBS=yes \
7272
-S . -B cmake-out && \
@@ -81,7 +81,7 @@ WORKDIR /var/tmp/build/protobuf
8181
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \
8282
tar -xzf - --strip-components=1 && \
8383
cmake \
84-
-DCMAKE_BUILD_TYPE=Release \
84+
-DCMAKE_BUILD_TYPE=Debug \
8585
-DCMAKE_CXX_STANDARD=17 \
8686
-DBUILD_SHARED_LIBS=yes \
8787
-Dprotobuf_BUILD_TESTS=OFF \
@@ -98,7 +98,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp
9898
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
9999
tar -xzf - --strip-components=1 && \
100100
cmake \
101-
-DCMAKE_BUILD_TYPE=Release \
101+
-DCMAKE_BUILD_TYPE=Debug \
102102
-DBUILD_SHARED_LIBS=yes \
103103
-DWITH_EXAMPLES=OFF \
104104
-DWITH_STL=CXX17 \
@@ -117,7 +117,7 @@ WORKDIR /var/tmp/build/c-ares
117117
RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \
118118
tar -xzf - --strip-components=1 && \
119119
cmake \
120-
-DCMAKE_BUILD_TYPE=Release \
120+
-DCMAKE_BUILD_TYPE=Debug \
121121
-DBUILD_SHARED_LIBS=yes \
122122
-S . -B cmake-out && \
123123
cmake --build cmake-out --target install && \
@@ -130,7 +130,7 @@ RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.t
130130
WORKDIR /var/tmp/build/re2
131131
RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \
132132
tar -xzf - --strip-components=1 && \
133-
cmake -DCMAKE_BUILD_TYPE=Release \
133+
cmake -DCMAKE_BUILD_TYPE=Debug \
134134
-DBUILD_SHARED_LIBS=ON \
135135
-DRE2_BUILD_TESTING=OFF \
136136
-S . -B cmake-out && \
@@ -145,7 +145,7 @@ WORKDIR /var/tmp/build/grpc
145145
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
146146
tar -xzf - --strip-components=1 && \
147147
cmake \
148-
-DCMAKE_BUILD_TYPE=Release \
148+
-DCMAKE_BUILD_TYPE=Debug \
149149
-DCMAKE_CXX_STANDARD=17 \
150150
-DBUILD_SHARED_LIBS=ON \
151151
-DgRPC_INSTALL=ON \

ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN apt-get update && \
2525
apt-get --no-install-recommends install -y apt-transport-https apt-utils \
2626
automake build-essential cmake ca-certificates curl git \
2727
gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev libre2-dev \
28-
libssl-dev m4 make pkg-config tar wget zlib1g-dev
28+
libssl-dev m4 make pkg-config tar wget zlib1g-dev libc6-dbg
2929
# ```
3030

3131
# #### Abseil
@@ -35,7 +35,7 @@ WORKDIR /var/tmp/build/abseil-cpp
3535
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
3636
tar -xzf - --strip-components=1 && \
3737
cmake \
38-
-DCMAKE_BUILD_TYPE=Release \
38+
-DCMAKE_BUILD_TYPE=Debug \
3939
-DCMAKE_CXX_STANDARD=17 \
4040
-DABSL_BUILD_TESTING=OFF \
4141
-DBUILD_SHARED_LIBS=yes \
@@ -55,7 +55,7 @@ WORKDIR /var/tmp/build/protobuf
5555
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \
5656
tar -xzf - --strip-components=1 && \
5757
cmake \
58-
-DCMAKE_BUILD_TYPE=Release \
58+
-DCMAKE_BUILD_TYPE=Debug \
5959
-DCMAKE_CXX_STANDARD=17 \
6060
-DBUILD_SHARED_LIBS=yes \
6161
-Dprotobuf_BUILD_TESTS=OFF \
@@ -76,7 +76,7 @@ WORKDIR /var/tmp/build/grpc
7676
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
7777
tar -xzf - --strip-components=1 && \
7878
cmake \
79-
-DCMAKE_BUILD_TYPE=Release \
79+
-DCMAKE_BUILD_TYPE=Debug \
8080
-DCMAKE_CXX_STANDARD=17 \
8181
-DBUILD_SHARED_LIBS=yes \
8282
-DgRPC_INSTALL=ON \
@@ -105,7 +105,7 @@ WORKDIR /var/tmp/build/json
105105
RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \
106106
tar -xzf - --strip-components=1 && \
107107
cmake \
108-
-DCMAKE_BUILD_TYPE=Release \
108+
-DCMAKE_BUILD_TYPE=Debug \
109109
-DBUILD_SHARED_LIBS=yes \
110110
-DBUILD_TESTING=OFF \
111111
-DJSON_BuildTests=OFF \
@@ -121,7 +121,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp
121121
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
122122
tar -xzf - --strip-components=1 && \
123123
cmake \
124-
-DCMAKE_BUILD_TYPE=Release \
124+
-DCMAKE_BUILD_TYPE=Debug \
125125
-DCMAKE_CXX_STANDARD=17 \
126126
-DBUILD_SHARED_LIBS=yes \
127127
-DWITH_EXAMPLES=OFF \

0 commit comments

Comments
 (0)