Skip to content
Merged
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
7 changes: 6 additions & 1 deletion ci/cloudbuild/builds/lib/quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function quickstart::build_one_quickstart() {
"-S" "${src_dir}"
"-B" "${cmake_bin_dir}"
-DCMAKE_CXX_STANDARD=17
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_PREFIX_PATH="${prefix}"
)
if command -v /usr/local/bin/sccache >/dev/null 2>&1; then
Expand Down Expand Up @@ -120,7 +121,11 @@ function quickstart::run_one_quickstart() {

io::log "[ CMake ]"
local cmake_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/cmake-${bin_dir_suffix}"
io::run "${cmake_bin_dir}/quickstart" "${run_args[@]}"
if command -v /usr/bin/valgrind >/dev/null 2>&1; then
io::run valgrind --leak-check=full "${cmake_bin_dir}/quickstart" "${run_args[@]}"
else
io::run env MALLOC_CHECK_=3 "${cmake_bin_dir}/quickstart" "${run_args[@]}"
fi

# echo
# io::log "[ Make ]"
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

# ```bash
RUN apk update && \
apk add abseil-cpp-dev crc32c-dev c-ares-dev curl-dev grpc-dev \
apk add abseil-cpp-dev c-ares-dev curl-dev grpc-dev \
protobuf-dev nlohmann-json openssl-dev re2-dev
# ```

Expand Down
4 changes: 2 additions & 2 deletions ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig

# #### abseil
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
Expand Down
29 changes: 1 addition & 28 deletions ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,48 +29,21 @@ RUN apt-get update && \

# #### Abseil

# Debian 11 ships with Abseil==20200923.3. Unfortunately, the current gRPC
# version needs Abseil >= 20210324. Enabling `ABSL_PROPAGATE_CXX_STD`
# propagates the version of C++ used to compile Abseil to anything that depends
# on Abseil.

# ```bash
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### crc32c

# The project depends on the Crc32c library, we need to compile this from
# source:

# ```bash
WORKDIR /var/tmp/build/crc32c
RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### nlohmann_json library

# Debian 11 also ships with nlohmann-json==3.9.1, which is recent enough for our needs:
Expand Down
10 changes: 1 addition & 9 deletions ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN dnf makecache && \
# ```bash
RUN dnf makecache && \
dnf install -y protobuf-compiler protobuf-devel grpc-cpp grpc-devel \
json-devel libcurl-devel google-crc32c-devel openssl-devel
json-devel libcurl-devel openssl-devel
# ```

# #### Patching pkg-config
Expand All @@ -54,14 +54,6 @@ RUN curl -fsSL https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz | \
ldconfig && cd /var/tmp && rm -fr build
# ```

# Older versions of Fedora hard-code RE2 to use C++11. It was fixed starting
# with Fedora:38. If you using Fedora >= 38 or you are not planning to use
# `pkg-config(1)` you can ignore this step. Alternatively, you can install RE2
# and gRPC from source.
# ```
# sed -i 's/-std=c\+\+11 //' /usr/lib64/pkgconfig/re2.pc
# ```

# The following steps will install libraries and tools in `/usr/local`. By
# default, pkgconf does not search in these directories. We need to explicitly
# set the search path.
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN zypper refresh && \
# ```bash
RUN zypper refresh && \
zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \
libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \
libcurl-devel libopenssl-devel nlohmann_json-devel \
grpc-devel libprotobuf-devel
# ```

Expand Down
29 changes: 1 addition & 28 deletions ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,14 @@ ENV PATH=/usr/local/bin:${PATH}

# #### Abseil

# Rocky Linux 9 includes a package for Abseil, unfortunately, this package is
# incomplete, as it lacks the CMake support files for it. We need to compile
# Abseiil from source. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the version
# of C++ used to compile Abseil to anything that depends on Abseil.

# ```bash
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
Expand Down Expand Up @@ -159,27 +153,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \
ldconfig
# ```

# #### crc32c

# The project depends on the Crc32c library, we need to compile this from
# source:

# ```bash
WORKDIR /var/tmp/build/crc32c
RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### nlohmann_json library

# The project depends on the nlohmann_json library. We use CMake to
Expand Down
3 changes: 1 addition & 2 deletions ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ RUN ln -s /usr/bin/pkgconf /usr/bin/pkg-config

# #### abseil
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
Expand Down
28 changes: 1 addition & 27 deletions ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,14 @@ RUN apt-get update && \

# #### Abseil

# We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD`
# propagates the version of C++ used to compile Abseil to anything that depends
# on Abseil.

# ```bash
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
Expand Down Expand Up @@ -117,27 +112,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \
ldconfig
# ```

# #### crc32c

# The project depends on the Crc32c library, we need to compile this from
# source:

# ```bash
WORKDIR /var/tmp/build/crc32c
RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### nlohmann_json library

# The project depends on the nlohmann_json library. We use CMake to
Expand Down
28 changes: 1 addition & 27 deletions ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,14 @@ RUN apt-get update && \

# #### Abseil

# We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD`
# propagates the version of C++ used to compile Abseil to anything that depends
# on Abseil.

# ```bash
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
Expand Down Expand Up @@ -98,27 +93,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \
ldconfig
# ```

# #### crc32c

# The project depends on the Crc32c library, we need to compile this from
# source:

# ```bash
WORKDIR /var/tmp/build/crc32c
RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-S . -B cmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### nlohmann_json library

# The project depends on the nlohmann_json library. We use CMake to
Expand Down
17 changes: 3 additions & 14 deletions ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ RUN dnf makecache && dnf debuginfo-install -y libstdc++
# These are used by the docfx tool.
RUN dnf makecache && dnf install -y pugixml-devel yaml-cpp-devel

RUN dnf install -y valgrind

# Sets root's password to the empty string to enable users to get a root shell
# inside the container with `su -` and no password. Sudo would not work because
# we run these containers as the invoking user's uid, which does not exist in
Expand Down Expand Up @@ -70,7 +72,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib
# We disable the inline namespace because otherwise Abseil LTS updates break our
# `check-api` build.
WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
Expand Down Expand Up @@ -102,19 +104,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \
cmake --build cmake-out --target install && \
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-GNinja -S . -B cmake-out && \
cmake --build cmake-out --target install && \
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \
tar -xzf - --strip-components=1 && \
Expand Down
18 changes: 1 addition & 17 deletions ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib
# with fewer layers).

WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_BUILD_TYPE=Release \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-GNinja -S . -B cmake-out && \
cmake --build cmake-out && cmake --install cmake-out && \
Expand Down Expand Up @@ -111,21 +110,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \
ldconfig && \
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-GNinja -S . -B cmake-out && \
cmake --build cmake-out && cmake --install cmake-out && \
ldconfig && \
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \
tar -xzf - --strip-components=1 && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ RUN dnf makecache && \
dnf install -y \
gmock-devel \
google-benchmark-devel \
google-crc32c-devel \
grpc-devel \
gtest-devel \
json-devel \
Expand Down
1 change: 0 additions & 1 deletion ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ RUN dnf makecache && \
glibc-devel.i686 \
gmock-devel.i686 \
google-benchmark-devel.i686 \
google-crc32c-devel.i686 \
grpc-devel.i686 \
gtest-devel.i686 \
libcurl-devel.i686 \
Expand Down
1 change: 0 additions & 1 deletion ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz |
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DBUILD_SHARED_LIBS=yes \
-GNinja -S . -B cmake-out && \
cmake --build cmake-out && cmake --install cmake-out && \
Expand Down
Loading