Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
360 changes: 24 additions & 336 deletions INSTALL.md

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions ci/etc/kokoro/install/project-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ declare -A ORIGINAL_COPYRIGHT_YEAR=(
[ubuntu-bionic]=2019
)

read_into_variable INSTALL_GOOGLE_CLOUD_CPP_COMMON_FROM_SOURCE <<'_EOF_'
WORKDIR /var/tmp/build
RUN wget -q https://github.com/googleapis/google-cloud-cpp-common/archive/v0.19.0.tar.gz && \
tar -xf v0.19.0.tar.gz && \
cd google-cloud-cpp-common-0.19.0 && \
cmake -H. -Bcmake-out -DBUILD_TESTING=OFF && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
_EOF_

BUILD_AND_TEST_PROJECT_FRAGMENT=$(replace_fragments \
"INSTALL_CPP_CMAKEFILES_FROM_SOURCE" \
"INSTALL_GOOGLETEST_FROM_SOURCE" \
Expand All @@ -39,23 +50,6 @@ BUILD_AND_TEST_PROJECT_FRAGMENT=$(replace_fragments \
@INSTALL_CPP_CMAKEFILES_FROM_SOURCE@
# ```

# #### googletest

# We need a recent version of GoogleTest to compile the unit and integration
# tests.

# ```bash
@INSTALL_GOOGLETEST_FROM_SOURCE@
# ```

# #### benchmark

# We need a recent version of the Google microbenchmark support library.

# ```bash
@INSTALL_GOOGLE_BENCHMARK_FROM_SOURCE@
# ```

# #### google-cloud-cpp-common

# The project also depends on google-cloud-cpp-common, the libraries shared by
Expand All @@ -74,11 +68,9 @@ FROM devtools AS install
# ```bash
WORKDIR /home/build/project
COPY . /home/build/project
RUN cmake -H. -Bcmake-out
RUN cmake -H. -Bcmake-out -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
RUN cmake --build cmake-out -- -j "${NCPU:-4}"
WORKDIR /home/build/project/cmake-out
RUN ctest -LE integration-tests --output-on-failure
RUN cmake --build . --target install
RUN cmake --build cmake-out --target install
# ```

## [END INSTALL.md]
Expand Down
45 changes: 3 additions & 42 deletions ci/kokoro/install/Dockerfile.centos-7
Original file line number Diff line number Diff line change
Expand Up @@ -116,41 +116,6 @@ RUN wget -q https://github.com/googleapis/cpp-cmakefiles/archive/v0.4.1.tar.gz &
ldconfig
# ```

# #### googletest

# We need a recent version of GoogleTest to compile the unit and integration
# tests.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/googletest/archive/release-1.10.0.tar.gz && \
tar -xf release-1.10.0.tar.gz && \
cd googletest-release-1.10.0 && \
cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_SHARED_LIBS=yes -H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### benchmark

# We need a recent version of the Google microbenchmark support library.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/benchmark/archive/v1.5.0.tar.gz && \
tar -xf v1.5.0.tar.gz && \
cd benchmark-1.5.0 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=yes \
-DBENCHMARK_ENABLE_TESTING=OFF \
-H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### google-cloud-cpp-common

# The project also depends on google-cloud-cpp-common, the libraries shared by
Expand All @@ -161,9 +126,7 @@ WORKDIR /var/tmp/build
RUN wget -q https://github.com/googleapis/google-cloud-cpp-common/archive/v0.19.0.tar.gz && \
tar -xf v0.19.0.tar.gz && \
cd google-cloud-cpp-common-0.19.0 && \
cmake -H. -Bcmake-out \
-DBUILD_TESTING=OFF \
-DGOOGLE_CLOUD_CPP_TESTING_UTIL_ENABLE_INSTALL=ON && \
cmake -H. -Bcmake-out -DBUILD_TESTING=OFF && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
Expand All @@ -178,11 +141,9 @@ FROM devtools AS install
# ```bash
WORKDIR /home/build/project
COPY . /home/build/project
RUN cmake -H. -Bcmake-out
RUN cmake -H. -Bcmake-out -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
RUN cmake --build cmake-out -- -j "${NCPU:-4}"
WORKDIR /home/build/project/cmake-out
RUN ctest -LE integration-tests --output-on-failure
RUN cmake --build . --target install
RUN cmake --build cmake-out --target install
# ```

## [END INSTALL.md]
Expand Down
45 changes: 3 additions & 42 deletions ci/kokoro/install/Dockerfile.centos-8
Original file line number Diff line number Diff line change
Expand Up @@ -95,41 +95,6 @@ RUN wget -q https://github.com/googleapis/cpp-cmakefiles/archive/v0.4.1.tar.gz &
ldconfig
# ```

# #### googletest

# We need a recent version of GoogleTest to compile the unit and integration
# tests.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/googletest/archive/release-1.10.0.tar.gz && \
tar -xf release-1.10.0.tar.gz && \
cd googletest-release-1.10.0 && \
cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_SHARED_LIBS=yes -H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### benchmark

# We need a recent version of the Google microbenchmark support library.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/benchmark/archive/v1.5.0.tar.gz && \
tar -xf v1.5.0.tar.gz && \
cd benchmark-1.5.0 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=yes \
-DBENCHMARK_ENABLE_TESTING=OFF \
-H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### google-cloud-cpp-common

# The project also depends on google-cloud-cpp-common, the libraries shared by
Expand All @@ -140,9 +105,7 @@ WORKDIR /var/tmp/build
RUN wget -q https://github.com/googleapis/google-cloud-cpp-common/archive/v0.19.0.tar.gz && \
tar -xf v0.19.0.tar.gz && \
cd google-cloud-cpp-common-0.19.0 && \
cmake -H. -Bcmake-out \
-DBUILD_TESTING=OFF \
-DGOOGLE_CLOUD_CPP_TESTING_UTIL_ENABLE_INSTALL=ON && \
cmake -H. -Bcmake-out -DBUILD_TESTING=OFF && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
Expand All @@ -157,11 +120,9 @@ FROM devtools AS install
# ```bash
WORKDIR /home/build/project
COPY . /home/build/project
RUN cmake -H. -Bcmake-out
RUN cmake -H. -Bcmake-out -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
RUN cmake --build cmake-out -- -j "${NCPU:-4}"
WORKDIR /home/build/project/cmake-out
RUN ctest -LE integration-tests --output-on-failure
RUN cmake --build . --target install
RUN cmake --build cmake-out --target install
# ```

## [END INSTALL.md]
Expand Down
45 changes: 3 additions & 42 deletions ci/kokoro/install/Dockerfile.debian-buster
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,6 @@ RUN wget -q https://github.com/googleapis/cpp-cmakefiles/archive/v0.4.1.tar.gz &
ldconfig
# ```

# #### googletest

# We need a recent version of GoogleTest to compile the unit and integration
# tests.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/googletest/archive/release-1.10.0.tar.gz && \
tar -xf release-1.10.0.tar.gz && \
cd googletest-release-1.10.0 && \
cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_SHARED_LIBS=yes -H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### benchmark

# We need a recent version of the Google microbenchmark support library.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/benchmark/archive/v1.5.0.tar.gz && \
tar -xf v1.5.0.tar.gz && \
cd benchmark-1.5.0 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=yes \
-DBENCHMARK_ENABLE_TESTING=OFF \
-H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### google-cloud-cpp-common

# The project also depends on google-cloud-cpp-common, the libraries shared by
Expand All @@ -101,9 +66,7 @@ WORKDIR /var/tmp/build
RUN wget -q https://github.com/googleapis/google-cloud-cpp-common/archive/v0.19.0.tar.gz && \
tar -xf v0.19.0.tar.gz && \
cd google-cloud-cpp-common-0.19.0 && \
cmake -H. -Bcmake-out \
-DBUILD_TESTING=OFF \
-DGOOGLE_CLOUD_CPP_TESTING_UTIL_ENABLE_INSTALL=ON && \
cmake -H. -Bcmake-out -DBUILD_TESTING=OFF && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
Expand All @@ -118,11 +81,9 @@ FROM devtools AS install
# ```bash
WORKDIR /home/build/project
COPY . /home/build/project
RUN cmake -H. -Bcmake-out
RUN cmake -H. -Bcmake-out -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
RUN cmake --build cmake-out -- -j "${NCPU:-4}"
WORKDIR /home/build/project/cmake-out
RUN ctest -LE integration-tests --output-on-failure
RUN cmake --build . --target install
RUN cmake --build cmake-out --target install
# ```

## [END INSTALL.md]
Expand Down
45 changes: 3 additions & 42 deletions ci/kokoro/install/Dockerfile.debian-stretch
Original file line number Diff line number Diff line change
Expand Up @@ -90,41 +90,6 @@ RUN wget -q https://github.com/googleapis/cpp-cmakefiles/archive/v0.4.1.tar.gz &
ldconfig
# ```

# #### googletest

# We need a recent version of GoogleTest to compile the unit and integration
# tests.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/googletest/archive/release-1.10.0.tar.gz && \
tar -xf release-1.10.0.tar.gz && \
cd googletest-release-1.10.0 && \
cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_SHARED_LIBS=yes -H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### benchmark

# We need a recent version of the Google microbenchmark support library.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/benchmark/archive/v1.5.0.tar.gz && \
tar -xf v1.5.0.tar.gz && \
cd benchmark-1.5.0 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=yes \
-DBENCHMARK_ENABLE_TESTING=OFF \
-H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### google-cloud-cpp-common

# The project also depends on google-cloud-cpp-common, the libraries shared by
Expand All @@ -135,9 +100,7 @@ WORKDIR /var/tmp/build
RUN wget -q https://github.com/googleapis/google-cloud-cpp-common/archive/v0.19.0.tar.gz && \
tar -xf v0.19.0.tar.gz && \
cd google-cloud-cpp-common-0.19.0 && \
cmake -H. -Bcmake-out \
-DBUILD_TESTING=OFF \
-DGOOGLE_CLOUD_CPP_TESTING_UTIL_ENABLE_INSTALL=ON && \
cmake -H. -Bcmake-out -DBUILD_TESTING=OFF && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
Expand All @@ -152,11 +115,9 @@ FROM devtools AS install
# ```bash
WORKDIR /home/build/project
COPY . /home/build/project
RUN cmake -H. -Bcmake-out
RUN cmake -H. -Bcmake-out -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
RUN cmake --build cmake-out -- -j "${NCPU:-4}"
WORKDIR /home/build/project/cmake-out
RUN ctest -LE integration-tests --output-on-failure
RUN cmake --build . --target install
RUN cmake --build cmake-out --target install
# ```

## [END INSTALL.md]
Expand Down
45 changes: 3 additions & 42 deletions ci/kokoro/install/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -64,41 +64,6 @@ RUN wget -q https://github.com/googleapis/cpp-cmakefiles/archive/v0.4.1.tar.gz &
ldconfig
# ```

# #### googletest

# We need a recent version of GoogleTest to compile the unit and integration
# tests.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/googletest/archive/release-1.10.0.tar.gz && \
tar -xf release-1.10.0.tar.gz && \
cd googletest-release-1.10.0 && \
cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_SHARED_LIBS=yes -H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### benchmark

# We need a recent version of the Google microbenchmark support library.

# ```bash
WORKDIR /var/tmp/build
RUN wget -q https://github.com/google/benchmark/archive/v1.5.0.tar.gz && \
tar -xf v1.5.0.tar.gz && \
cd benchmark-1.5.0 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=yes \
-DBENCHMARK_ENABLE_TESTING=OFF \
-H. -Bcmake-out && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
# ```

# #### google-cloud-cpp-common

# The project also depends on google-cloud-cpp-common, the libraries shared by
Expand All @@ -109,9 +74,7 @@ WORKDIR /var/tmp/build
RUN wget -q https://github.com/googleapis/google-cloud-cpp-common/archive/v0.19.0.tar.gz && \
tar -xf v0.19.0.tar.gz && \
cd google-cloud-cpp-common-0.19.0 && \
cmake -H. -Bcmake-out \
-DBUILD_TESTING=OFF \
-DGOOGLE_CLOUD_CPP_TESTING_UTIL_ENABLE_INSTALL=ON && \
cmake -H. -Bcmake-out -DBUILD_TESTING=OFF && \
cmake --build cmake-out -- -j ${NCPU:-4} && \
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
ldconfig
Expand All @@ -126,11 +89,9 @@ FROM devtools AS install
# ```bash
WORKDIR /home/build/project
COPY . /home/build/project
RUN cmake -H. -Bcmake-out
RUN cmake -H. -Bcmake-out -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
RUN cmake --build cmake-out -- -j "${NCPU:-4}"
WORKDIR /home/build/project/cmake-out
RUN ctest -LE integration-tests --output-on-failure
RUN cmake --build . --target install
RUN cmake --build cmake-out --target install
# ```

## [END INSTALL.md]
Expand Down
Loading