aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rw-r--r--ci/cmake_common.sh14
-rwxr-xr-xci/cmake_install_test.sh2
-rw-r--r--ci/linux_docker_containers.sh6
-rwxr-xr-xci/linux_gcc-floor_libstdcxx_bazel.sh4
-rwxr-xr-xci/linux_gcc-latest_libstdcxx_cmake.sh55
-rwxr-xr-xci/linux_gcc_alpine_cmake.sh54
-rwxr-xr-xci/macos_xcode_cmake.sh48
-rwxr-xr-xci/windows_clangcl_bazel.bat4
-rwxr-xr-xci/windows_msvc_cmake.bat18
9 files changed, 109 insertions, 96 deletions
diff --git a/ci/cmake_common.sh b/ci/cmake_common.sh
index 784b3815..c8a5b857 100644
--- a/ci/cmake_common.sh
+++ b/ci/cmake_common.sh
@@ -14,16 +14,6 @@
# The commit of GoogleTest to be used in the CMake tests in this directory.
# Keep this in sync with the commit in the WORKSPACE file.
-# TODO(dmauro): After the next GoogleTest release, use the stable file required
-# by Bzlmod. This means downloading a copy of the file and reuploading it to
-# avoid changing checksums if the compression is changed by GitHub. It also
-# means stop referring to it as a commit and instead use the uploaded filename.
-readonly ABSL_GOOGLETEST_COMMIT="f8d7d77c06936315286eb55f8de22cd23c188571"
+readonly ABSL_GOOGLETEST_VERSION="1.15.2"
-# Avoid depending on GitHub by looking for a cached copy of the commit first.
-if [[ -r "${KOKORO_GFILE_DIR:-}/distdir/${ABSL_GOOGLETEST_COMMIT}.zip" ]]; then
- DOCKER_EXTRA_ARGS="--mount type=bind,source=${KOKORO_GFILE_DIR}/distdir,target=/distdir,readonly ${DOCKER_EXTRA_ARGS:-}"
- ABSL_GOOGLETEST_DOWNLOAD_URL="file:///distdir/${ABSL_GOOGLETEST_COMMIT}.zip"
-else
- ABSL_GOOGLETEST_DOWNLOAD_URL="https://github.com/google/googletest/archive/${ABSL_GOOGLETEST_COMMIT}.zip"
-fi
+readonly ABSL_GOOGLETEST_DOWNLOAD_URL="https://github.com/google/googletest/releases/download/v${ABSL_GOOGLETEST_VERSION}/googletest-${ABSL_GOOGLETEST_VERSION}.tar.gz"
diff --git a/ci/cmake_install_test.sh b/ci/cmake_install_test.sh
index ab3b86f0..871490ff 100755
--- a/ci/cmake_install_test.sh
+++ b/ci/cmake_install_test.sh
@@ -48,7 +48,7 @@ for link_type in ${LINK_TYPE}; do
--tmpfs=/abseil-cpp:exec \
--workdir=/abseil-cpp \
--cap-add=SYS_PTRACE \
- -e "ABSL_GOOGLETEST_COMMIT=${ABSL_GOOGLETEST_COMMIT}" \
+ -e "ABSL_GOOGLETEST_VERSION=${ABSL_GOOGLETEST_VERSION}" \
-e "ABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL}" \
-e "LINK_TYPE=${link_type}" \
--rm \
diff --git a/ci/linux_docker_containers.sh b/ci/linux_docker_containers.sh
index 232233d1..fefef928 100644
--- a/ci/linux_docker_containers.sh
+++ b/ci/linux_docker_containers.sh
@@ -16,7 +16,7 @@
# Test scripts should source this file to get the identifiers.
readonly LINUX_ALPINE_CONTAINER="gcr.io/google.com/absl-177019/alpine:20230612"
-readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20231218"
+readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20240523"
readonly LINUX_ARM_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_arm_hybrid-latest:20231219"
-readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20231218"
-readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20230120"
+readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20240523"
+readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20240717"
diff --git a/ci/linux_gcc-floor_libstdcxx_bazel.sh b/ci/linux_gcc-floor_libstdcxx_bazel.sh
index 5bd1dbf8..b2d8c1da 100755
--- a/ci/linux_gcc-floor_libstdcxx_bazel.sh
+++ b/ci/linux_gcc-floor_libstdcxx_bazel.sh
@@ -59,9 +59,6 @@ if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -d "${KOKORO_GFILE_DIR}/distdir" ]]; then
BAZEL_EXTRA_ARGS="--distdir=/distdir ${BAZEL_EXTRA_ARGS:-}"
fi
-# TODO(absl-team): This currently uses Bazel 5. When upgrading to a version
-# of Bazel that supports Bzlmod, add --enable_bzlmod=false to keep test
-# coverage for the old WORKSPACE dependency management.
for std in ${STD}; do
for compilation_mode in ${COMPILATION_MODE}; do
for exceptions_mode in ${EXCEPTIONS_MODE}; do
@@ -82,6 +79,7 @@ for std in ${STD}; do
--copt=-Werror \
--define="absl=1" \
--distdir="/bazel-distdir" \
+ --enable_bzlmod=false \
--features=external_include_paths \
--keep_going \
--show_timestamps \
diff --git a/ci/linux_gcc-latest_libstdcxx_cmake.sh b/ci/linux_gcc-latest_libstdcxx_cmake.sh
index 1f721236..243901c2 100755
--- a/ci/linux_gcc-latest_libstdcxx_cmake.sh
+++ b/ci/linux_gcc-latest_libstdcxx_cmake.sh
@@ -34,33 +34,46 @@ if [[ -z ${ABSL_CMAKE_BUILD_SHARED:-} ]]; then
ABSL_CMAKE_BUILD_SHARED="OFF ON"
fi
+if [[ -z ${ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS:-} ]]; then
+ ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS="OFF ON"
+fi
+
source "${ABSEIL_ROOT}/ci/linux_docker_containers.sh"
readonly DOCKER_CONTAINER=${LINUX_GCC_LATEST_CONTAINER}
for std in ${ABSL_CMAKE_CXX_STANDARDS}; do
for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do
- time docker run \
- --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
- --tmpfs=/buildfs:exec \
- --workdir=/buildfs \
- --cap-add=SYS_PTRACE \
- --rm \
- -e CFLAGS="-Werror" \
- -e CXXFLAGS="-Werror" \
- ${DOCKER_EXTRA_ARGS:-} \
- "${DOCKER_CONTAINER}" \
- /bin/bash -c "
- cmake /abseil-cpp \
- -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
- -DBUILD_SHARED_LIBS=${build_shared} \
- -DABSL_BUILD_TESTING=ON \
- -DCMAKE_BUILD_TYPE=${compilation_mode} \
- -DCMAKE_CXX_STANDARD=${std} \
- -DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \
- make -j$(nproc) && \
- TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo \
- ctest -j$(nproc) --output-on-failure"
+ if [[ $build_shared == "OFF" ]]; then
+ monolithic_shared_options="OFF"
+ else
+ monolithic_shared_options="$ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS"
+ fi
+
+ for monolithic_shared in $monolithic_shared_options; do
+ time docker run \
+ --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
+ --tmpfs=/buildfs:exec \
+ --workdir=/buildfs \
+ --cap-add=SYS_PTRACE \
+ --rm \
+ -e CFLAGS="-Werror" \
+ -e CXXFLAGS="-Werror" \
+ ${DOCKER_EXTRA_ARGS:-} \
+ "${DOCKER_CONTAINER}" \
+ /bin/bash -c "
+ cmake /abseil-cpp \
+ -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
+ -DBUILD_SHARED_LIBS=${build_shared} \
+ -DABSL_BUILD_TESTING=ON \
+ -DCMAKE_BUILD_TYPE=${compilation_mode} \
+ -DCMAKE_CXX_STANDARD=${std} \
+ -DABSL_BUILD_MONOLITHIC_SHARED_LIBS=${monolithic_shared} \
+ -DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \
+ make -j$(nproc) && \
+ TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo \
+ ctest -j$(nproc) --output-on-failure"
+ done
done
done
done
diff --git a/ci/linux_gcc_alpine_cmake.sh b/ci/linux_gcc_alpine_cmake.sh
index b784456f..f19954f5 100755
--- a/ci/linux_gcc_alpine_cmake.sh
+++ b/ci/linux_gcc_alpine_cmake.sh
@@ -34,32 +34,46 @@ if [[ -z ${ABSL_CMAKE_BUILD_SHARED:-} ]]; then
ABSL_CMAKE_BUILD_SHARED="OFF ON"
fi
+if [[ -z ${ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS:-} ]]; then
+ ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS="OFF ON"
+fi
+
source "${ABSEIL_ROOT}/ci/linux_docker_containers.sh"
readonly DOCKER_CONTAINER=${LINUX_ALPINE_CONTAINER}
for std in ${ABSL_CMAKE_CXX_STANDARDS}; do
for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do
- time docker run \
- --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
- --tmpfs=/buildfs:exec \
- --workdir=/buildfs \
- --cap-add=SYS_PTRACE \
- --rm \
- -e CFLAGS="-Werror" \
- -e CXXFLAGS="-Werror" \
- ${DOCKER_EXTRA_ARGS:-} \
- "${DOCKER_CONTAINER}" \
- /bin/sh -c "
- cmake /abseil-cpp \
- -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
- -DABSL_BUILD_TESTING=ON \
- -DCMAKE_BUILD_TYPE=${compilation_mode} \
- -DCMAKE_CXX_STANDARD=${std} \
- -DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \
- make -j$(nproc) && \
- TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo \
- ctest -j$(nproc) --output-on-failure"
+ if [[ $build_shared == "OFF" ]]; then
+ monolithic_shared_options="OFF"
+ else
+ monolithic_shared_options="$ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS"
+ fi
+
+ for monolithic_shared in $monolithic_shared_options; do
+ time docker run \
+ --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
+ --tmpfs=/buildfs:exec \
+ --workdir=/buildfs \
+ --cap-add=SYS_PTRACE \
+ --rm \
+ -e CFLAGS="-Werror" \
+ -e CXXFLAGS="-Werror" \
+ ${DOCKER_EXTRA_ARGS:-} \
+ "${DOCKER_CONTAINER}" \
+ /bin/sh -c "
+ cmake /abseil-cpp \
+ -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
+ -DBUILD_SHARED_LIBS=${build_shared} \
+ -DABSL_BUILD_TESTING=ON \
+ -DCMAKE_BUILD_TYPE=${compilation_mode} \
+ -DCMAKE_CXX_STANDARD=${std} \
+ -DABSL_BUILD_MONOLITHIC_SHARED_LIBS=${monolithic_shared} \
+ -DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \
+ make -j$(nproc) && \
+ TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo \
+ ctest -j$(nproc) --output-on-failure"
+ done
done
done
done
diff --git a/ci/macos_xcode_cmake.sh b/ci/macos_xcode_cmake.sh
index 690f86b8..eba2fb5e 100755
--- a/ci/macos_xcode_cmake.sh
+++ b/ci/macos_xcode_cmake.sh
@@ -23,11 +23,6 @@ ABSEIL_ROOT=$(realpath ${ABSEIL_ROOT})
source "${ABSEIL_ROOT}/ci/cmake_common.sh"
-# The MacOS build doesn't run in a docker container, so we have to override ABSL_GOOGLETEST_DOWNLOAD_URL.
-if [[ -r "${KOKORO_GFILE_DIR}/distdir/${ABSL_GOOGLETEST_COMMIT}.zip" ]]; then
- ABSL_GOOGLETEST_DOWNLOAD_URL="file://${KOKORO_GFILE_DIR}/distdir/${ABSL_GOOGLETEST_COMMIT}.zip"
-fi
-
if [[ -z ${ABSL_CMAKE_BUILD_TYPES:-} ]]; then
ABSL_CMAKE_BUILD_TYPES="Debug"
fi
@@ -36,22 +31,35 @@ if [[ -z ${ABSL_CMAKE_BUILD_SHARED:-} ]]; then
ABSL_CMAKE_BUILD_SHARED="OFF ON"
fi
+if [[ -z ${ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS:-} ]]; then
+ ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS="OFF ON"
+fi
+
for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do
- BUILD_DIR=$(mktemp -d ${compilation_mode}.XXXXXXXX)
- cd ${BUILD_DIR}
-
- # TODO(absl-team): Enable -Werror once all warnings are fixed.
- time cmake ${ABSEIL_ROOT} \
- -GXcode \
- -DBUILD_SHARED_LIBS=${build_shared} \
- -DABSL_BUILD_TESTING=ON \
- -DCMAKE_BUILD_TYPE=${compilation_mode} \
- -DCMAKE_CXX_STANDARD=14 \
- -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined" \
- -DABSL_GOOGLETEST_DOWNLOAD_URL="${ABSL_GOOGLETEST_DOWNLOAD_URL}"
- time cmake --build .
- time TZDIR=${ABSEIL_ROOT}/absl/time/internal/cctz/testdata/zoneinfo \
- ctest -C ${compilation_mode} --output-on-failure
+ if [[ $build_shared == "OFF" ]]; then
+ monolithic_shared_options="OFF"
+ else
+ monolithic_shared_options="$ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS"
+ fi
+
+ for monolithic_shared in $monolithic_shared_options; do
+ BUILD_DIR=$(mktemp -d ${compilation_mode}.XXXXXXXX)
+ cd ${BUILD_DIR}
+
+ # TODO(absl-team): Enable -Werror once all warnings are fixed.
+ time cmake ${ABSEIL_ROOT} \
+ -GXcode \
+ -DBUILD_SHARED_LIBS=${build_shared} \
+ -DABSL_BUILD_TESTING=ON \
+ -DCMAKE_BUILD_TYPE=${compilation_mode} \
+ -DCMAKE_CXX_STANDARD=14 \
+ -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined" \
+ -DABSL_BUILD_MONOLITHIC_SHARED_LIBS=${monolithic_shared} \
+ -DABSL_GOOGLETEST_DOWNLOAD_URL="${ABSL_GOOGLETEST_DOWNLOAD_URL}"
+ time cmake --build .
+ time TZDIR=${ABSEIL_ROOT}/absl/time/internal/cctz/testdata/zoneinfo \
+ ctest -C ${compilation_mode} --output-on-failure
+ done
done
done
diff --git a/ci/windows_clangcl_bazel.bat b/ci/windows_clangcl_bazel.bat
index 5162628b..b031c30d 100755
--- a/ci/windows_clangcl_bazel.bat
+++ b/ci/windows_clangcl_bazel.bat
@@ -43,13 +43,13 @@ IF NOT "%ALTERNATE_OPTIONS%"=="" copy %ALTERNATE_OPTIONS% absl\base\options.h
test ... ^
--compilation_mode=%COMPILATION_MODE% ^
--compiler=clang-cl ^
- --copt=/std:%STD% ^
--copt=/WX ^
--copt=-Wno-microsoft-cast ^
+ --cxxopt=/std:%STD% ^
--define=absl=1 ^
--distdir=%KOKORO_GFILE_DIR%\distdir ^
--enable_bzlmod=true ^
- --extra_execution_platforms=//absl:x64_windows-clang-cl ^
+ --extra_execution_platforms=//:x64_windows-clang-cl ^
--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl ^
--keep_going ^
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" ^
diff --git a/ci/windows_msvc_cmake.bat b/ci/windows_msvc_cmake.bat
index c0f1ac94..c9aee785 100755
--- a/ci/windows_msvc_cmake.bat
+++ b/ci/windows_msvc_cmake.bat
@@ -14,19 +14,10 @@
SETLOCAL ENABLEDELAYEDEXPANSION
-:: The commit of GoogleTest to be used in the CMake tests in this directory.
-:: Keep this in sync with the commit in the WORKSPACE file.
-:: TODO(dmauro): After the next GoogleTest release, use the stable file required
-:: by Bzlmod. This means downloading a copy of the file and reuploading it to
-:: avoid changing checksums if the compression is changed by GitHub. It also
-:: means stop referring to it as a commit and instead use the uploaded filename.
-SET ABSL_GOOGLETEST_COMMIT=f8d7d77c06936315286eb55f8de22cd23c188571
-
-IF EXIST %KOKORO_GFILE_DIR%\distdir\%ABSL_GOOGLETEST_COMMIT%.zip (
- SET ABSL_GOOGLETEST_DOWNLOAD_URL=file://%KOKORO_GFILE_DIR%\distdir\%ABSL_GOOGLETEST_COMMIT%.zip
-) ELSE (
- SET ABSL_GOOGLETEST_DOWNLOAD_URL=https://github.com/google/googletest/archive/%ABSL_GOOGLETEST_COMMIT%.zip
-)
+:: The version of GoogleTest to be used in the CMake tests in this directory.
+:: Keep this in sync with the version in the WORKSPACE file.
+SET ABSL_GOOGLETEST_VERSION=1.15.2
+SET ABSL_GOOGLETEST_DOWNLOAD_URL=https://github.com/google/googletest/releases/download/v%ABSL_GOOGLETEST_VERSION%/googletest-%ABSL_GOOGLETEST_VERSION%.tar.gz
:: Replace '\' with '/' in Windows paths for CMake.
:: Note that this cannot go inside the IF block above, because BAT files are weird.
@@ -56,7 +47,6 @@ CD "build"
SET CXXFLAGS="/WX"
%CMAKE_BIN% ^
- -DABSL_BUILD_TEST_HELPERS=ON ^
-DABSL_BUILD_TESTING=ON ^
-DABSL_GOOGLETEST_DOWNLOAD_URL=%ABSL_GOOGLETEST_DOWNLOAD_URL% ^
-DBUILD_SHARED_LIBS=%ABSL_CMAKE_BUILD_SHARED% ^