Skip to content

Commit

Permalink
Update versions of dependencies in preparation for release
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 653567769
Change-Id: I0448322da95558ff6a04ab1aeab2b238674b69d1
  • Loading branch information
derekmauro authored and copybara-github committed Jul 18, 2024
1 parent eb85220 commit 7795d08
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 56 deletions.
9 changes: 5 additions & 4 deletions CMake/install_test_project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ set -euox pipefail
absl_dir=/abseil-cpp
absl_build_dir=/buildfs
googletest_builddir=/googletest_builddir
project_dir="${absl_dir}"/CMake/install_test_project
googletest_archive="googletest-${ABSL_GOOGLETEST_VERSION}.tar.gz"
project_dir="${absl_dir}/CMake/install_test_project"
project_build_dir=/buildfs/project-build

build_shared_libs="OFF"
Expand All @@ -33,9 +34,9 @@ fi
# Build and install GoogleTest
mkdir "${googletest_builddir}"
pushd "${googletest_builddir}"
curl -L "${ABSL_GOOGLETEST_DOWNLOAD_URL}" --output "${ABSL_GOOGLETEST_COMMIT}".zip
unzip "${ABSL_GOOGLETEST_COMMIT}".zip
pushd "googletest-${ABSL_GOOGLETEST_COMMIT}"
curl -L "${ABSL_GOOGLETEST_DOWNLOAD_URL}" --output "${googletest_archive}"
tar -xz -f "${googletest_archive}"
pushd "googletest-${ABSL_GOOGLETEST_VERSION}"
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="${build_shared_libs}" ..
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ bazel_dep(name = "google_benchmark",
dev_dependency = True)

bazel_dep(name = "googletest",
version = "1.14.0.bcr.1",
version = "1.15.0",
repo_name = "com_google_googletest")

bazel_dep(name = "platforms",
version = "0.0.8")
version = "0.0.10")
32 changes: 18 additions & 14 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# GoogleTest/GoogleMock framework. Used by most unit-tests.
http_archive(
name = "com_google_googletest",
sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
strip_prefix = "googletest-1.14.0",
# Keep this URL in sync with ABSL_GOOGLETEST_COMMIT in ci/cmake_common.sh and
# ci/windows_msvc_cmake.bat.
urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"],
name = "com_google_googletest",
sha256 = "7315acb6bf10e99f332c8a43f00d5fbb1ee6ca48c52f6b936991b216c586aaad",
strip_prefix = "googletest-1.15.0",
# Keep this URL in sync with the version in ci/cmake_common.sh and
# ci/windows_msvc_cmake.bat.
urls = ["https://github.com/google/googletest/releases/download/v1.15.0/googletest-1.15.0.tar.gz"],
)

# RE2 (the regular expression library used by GoogleTest)
http_archive(
name = "com_googlesource_code_re2",
sha256 = "828341ad08524618a626167bd320b0c2acc97bd1c28eff693a9ea33a7ed2a85f",
strip_prefix = "re2-2023-11-01",
urls = ["https://github.com/google/re2/releases/download/2023-11-01/re2-2023-11-01.zip"],
sha256 = "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b",
strip_prefix = "re2-2024-07-02",
urls = ["https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.tar.gz"],
repo_mapping = {"@abseil-cpp": "@com_google_absl"},
)

# Google benchmark.
Expand All @@ -46,14 +47,17 @@ http_archive(

# Bazel Skylib.
http_archive(
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"],
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"],
)

# Bazel platform rules.
http_archive(
name = "platforms",
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
urls = ["https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz"],
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
)
14 changes: 2 additions & 12 deletions ci/cmake_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.0"

# 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"
2 changes: 1 addition & 1 deletion ci/cmake_install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions ci/linux_docker_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
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: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:20240523_rc1"
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"
4 changes: 1 addition & 3 deletions ci/linux_gcc-floor_libstdcxx_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
5 changes: 0 additions & 5 deletions ci/macos_xcode_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 4 additions & 13 deletions ci/windows_msvc_cmake.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.0
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.
Expand Down

0 comments on commit 7795d08

Please sign in to comment.