diff --git a/VERSION.txt b/VERSION.txt index 3a651c03a..a5589f37e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.20261013.0 +1.20261014.0 diff --git a/extern/README.md b/extern/README.md index 196bf26f7..fb1c5e82e 100644 --- a/extern/README.md +++ b/extern/README.md @@ -1,5 +1,5 @@ [libOpenCOR](https://opencor.ws/libopencor/index.html) relies on the following external projects: -- [GoogleTest](https://github.com/google/googletest) [1.17.0](https://github.com/google/googletest/releases/tag/v1.17.0) +- [GoogleTest](https://github.com/google/googletest) [1.18.0](https://github.com/google/googletest/releases/tag/v1.18.0) - [modp_b64](https://chromium.googlesource.com/chromium/src/third_party/modp_b64/) at commit [5068510](https://chromium.googlesource.com/chromium/src/third_party/modp_b64/+/50685101d51ef9aabbd60c94f52d9e026d39c509) -- [nanobind](https://github.com/wjakob/nanobind) [2.13.0](https://github.com/wjakob/nanobind/releases/tag/v2.13.0) +- [nanobind](https://github.com/wjakob/nanobind) [3.1.0](https://github.com/wjakob/nanobind/releases/tag/v3.1.0) diff --git a/extern/googletest/BUILD.bazel b/extern/googletest/BUILD.bazel index 53501454c..03392c6b4 100644 --- a/extern/googletest/BUILD.bazel +++ b/extern/googletest/BUILD.bazel @@ -30,6 +30,8 @@ # # Bazel Build for Google C++ Testing Framework(Google Test) +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) @@ -151,10 +153,7 @@ cc_library( "@abseil-cpp//absl/flags:reflection", "@abseil-cpp//absl/flags:usage", "@abseil-cpp//absl/strings", - "@abseil-cpp//absl/types:any", - "@abseil-cpp//absl/types:optional", - "@abseil-cpp//absl/types:variant", - "@re2//:re2", + "@re2", ], "//conditions:default": [], }) + select({ @@ -164,7 +163,6 @@ cc_library( # Otherwise, builds targeting Fuchsia would fail to compile. ":fuchsia": [ "@fuchsia_sdk//pkg/fdio", - "@fuchsia_sdk//pkg/syslog", "@fuchsia_sdk//pkg/zx", ], "//conditions:default": [], @@ -174,8 +172,8 @@ cc_library( # `gtest`, but testonly. See guidance on `gtest` for when to use this. alias( name = "gtest_for_library", - actual = ":gtest", testonly = True, + actual = ":gtest", ) # Implements main() for tests using gtest. Prefer to depend on `gtest` as well @@ -189,6 +187,7 @@ cc_library( "//conditions:default": [], }), deps = [":gtest"], + alwayslink = True, ) # The following rules build samples of how to use gTest. diff --git a/extern/googletest/CMakeLists.txt b/extern/googletest/CMakeLists.txt index 0567ae7da..793c8d3cd 100644 --- a/extern/googletest/CMakeLists.txt +++ b/extern/googletest/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.16) project(googletest-distribution) -set(GOOGLETEST_VERSION 1.17.0) +set(GOOGLETEST_VERSION 1.18.0) if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/extern/googletest/MODULE.bazel b/extern/googletest/MODULE.bazel index 5cb0b156f..badf0de66 100644 --- a/extern/googletest/MODULE.bazel +++ b/extern/googletest/MODULE.bazel @@ -32,7 +32,7 @@ module( name = "googletest", - version = "1.17.0", + version = "1.18.0", compatibility_level = 1, ) @@ -41,20 +41,24 @@ module( bazel_dep( name = "abseil-cpp", - version = "20250127.1", + version = "20260526.0", ) bazel_dep( name = "platforms", - version = "0.0.11", + version = "1.1.0", ) bazel_dep( name = "re2", - version = "2024-07-02.bcr.1", + version = "2025-11-05.bcr.1", +) +bazel_dep( + name = "rules_cc", + version = "0.2.22", ) bazel_dep( name = "rules_python", - version = "1.3.0", + version = "2.2.0", dev_dependency = True, ) @@ -67,7 +71,7 @@ python = use_extension( python.toolchain( ignore_root_user_error = True, is_default = True, - python_version = "3.12", + python_version = "3.13", ) # See fake_fuchsia_sdk.bzl for instructions on how to override this with a real SDK, if needed. diff --git a/extern/googletest/README.md b/extern/googletest/README.md index 598cf3124..b4e9b434f 100644 --- a/extern/googletest/README.md +++ b/extern/googletest/README.md @@ -8,12 +8,13 @@ Our documentation is now live on GitHub Pages at https://google.github.io/googletest/. We recommend browsing the documentation on GitHub Pages rather than directly in the repository. -#### Release 1.17.0 +#### Release 1.18.0 -[Release 1.17.0](https://github.com/google/googletest/releases/tag/v1.17.0) is +[Release 1.18.0](https://github.com/google/googletest/releases/tag/v1.18.0) is now available. -The 1.17.x branch [requires at least C++17]((https://opensource.google/documentation/policies/cplusplus-support#c_language_standard). +The 1.18.x branch +[requires at least C++17](https://opensource.google/documentation/policies/cplusplus-support#c_language_standard). #### Continuous Integration @@ -43,35 +44,35 @@ More information about building GoogleTest can be found at * xUnit test framework: \ Googletest is based on the [xUnit](https://en.wikipedia.org/wiki/XUnit) - testing framework, a popular architecture for unit testing + testing framework, a popular architecture for unit testing. * Test discovery: \ Googletest automatically discovers and runs your tests, eliminating the need - to manually register your tests + to manually register your tests. * Rich set of assertions: \ Googletest provides a variety of assertions, such as equality, inequality, - exceptions, and more, making it easy to test your code + exceptions, and more, making it easy to test your code. * User-defined assertions: \ You can define your own assertions with Googletest, making it simple to - write tests that are specific to your code + write tests that are specific to your code. * Death tests: \ Googletest supports death tests, which verify that your code exits in a - certain way, making it useful for testing error-handling code + certain way, making it useful for testing error-handling code. * Fatal and non-fatal failures: \ You can specify whether a test failure should be treated as fatal or non-fatal with Googletest, allowing tests to continue running even if a - failure occurs + failure occurs. * Value-parameterized tests: \ Googletest supports value-parameterized tests, which run multiple times with different input values, making it useful for testing functions that take - different inputs + different inputs. * Type-parameterized tests: \ Googletest also supports type-parameterized tests, which run with different data types, making it useful for testing functions that work with different - data types + data types. * Various options for running tests: \ Googletest provides many options for running tests including running individual tests, running tests in a specific order and running tests in - parallel + parallel. ## Supported Platforms diff --git a/extern/googletest/WORKSPACE b/extern/googletest/WORKSPACE index 0ae5dee92..b6635f6cd 100644 --- a/extern/googletest/WORKSPACE +++ b/extern/googletest/WORKSPACE @@ -31,31 +31,36 @@ workspace(name = "googletest") load("//:googletest_deps.bzl", "googletest_deps") + googletest_deps() load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_python", - sha256 = "2cc26bbd53854ceb76dd42a834b1002cd4ba7f8df35440cf03482e045affc244", - strip_prefix = "rules_python-1.3.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/1.3.0/rules_python-1.3.0.tar.gz", + sha256 = "e11d2e1efce1589e5bdfa93986712c74fc7467a0f093143d489d2ef5ebb1ed2a", + strip_prefix = "rules_python-2.2.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/2.2.0/rules_python-2.2.0.tar.gz", ) + # https://github.com/bazelbuild/rules_python/releases/tag/1.1.0 load("@rules_python//python:repositories.bzl", "py_repositories") -py_repositories() -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"], -) +py_repositories() http_archive( name = "platforms", + sha256 = "dbad4a23abcca6171e47b79edc53bd6a41067a3b75f9e8b104656b459ff25046", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.11/platforms-0.0.11.tar.gz", - "https://github.com/bazelbuild/platforms/releases/download/0.0.11/platforms-0.0.11.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/1.1.0/platforms-1.1.0.tar.gz", + "https://github.com/bazelbuild/platforms/releases/download/1.1.0/platforms-1.1.0.tar.gz", ], - sha256 = "29742e87275809b5e598dc2f04d86960cc7a55b3067d97221c9abbc9926bff0f", ) + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() diff --git a/extern/googletest/ci/linux-presubmit.sh b/extern/googletest/ci/linux-presubmit.sh index 6491e7984..26d2e7a13 100644 --- a/extern/googletest/ci/linux-presubmit.sh +++ b/extern/googletest/ci/linux-presubmit.sh @@ -31,15 +31,22 @@ set -euox pipefail -readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20241218" -readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20250205" +readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest@sha256:baa99e65a3cc837bab8e5246f1870d25c76d0adf2b1d598ee5a3ec77fd2e19bd" if [[ -z ${GTEST_ROOT:-} ]]; then GTEST_ROOT="$(realpath $(dirname ${0})/..)" fi +# Use Bazel Vendor mode to reduce reliance on external dependencies. +# See https://bazel.build/external/vendor and the Dockerfile for +# an explaination of how this works. +if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" ]]; then + DOCKER_EXTRA_ARGS="--mount type=bind,source=${KOKORO_GFILE_DIR}/distdir,target=/distdir,readonly --env=BAZEL_VENDOR_ARCHIVE=/distdir/googletest_vendor.tar.gz ${DOCKER_EXTRA_ARGS:-}" + BAZEL_EXTRA_ARGS="--vendor_dir=/googletest_vendor ${BAZEL_EXTRA_ARGS:-}" +fi + if [[ -z ${STD:-} ]]; then - STD="c++17 c++20" + STD="c++17 c++20 c++23" fi # Test CMake + GCC @@ -71,7 +78,7 @@ for cmake_off_on in OFF ON; do --tmpfs="/build:exec" \ --workdir="/build" \ --rm \ - --env="CC=/opt/llvm/clang/bin/clang" \ + --env="CC=/opt/llvm/bin/clang" \ --env=CXXFLAGS="-Werror -Wdeprecated --gcc-toolchain=/usr/local" \ ${LINUX_LATEST_CONTAINER} \ /bin/bash -c " @@ -91,20 +98,27 @@ time docker run \ --volume="${GTEST_ROOT}:/src:ro" \ --workdir="/src" \ --rm \ - --env="CC=/usr/local/bin/gcc" \ + --env="CC=/opt/gcc-10/bin/gcc" \ --env="BAZEL_CXXOPTS=-std=c++17" \ - ${LINUX_GCC_FLOOR_CONTAINER} \ + --env="BAZEL_LINKOPTS=-L/opt/gcc-10/lib64:-Wl,-rpath=/opt/gcc-10/lib64" \ + --env="USE_BAZEL_VERSION=8.5.1" \ + ${DOCKER_EXTRA_ARGS:-} \ + ${LINUX_LATEST_CONTAINER} \ + /bin/bash --login -c " /usr/local/bin/bazel test ... \ - --copt="-Wall" \ - --copt="-Werror" \ - --copt="-Wuninitialized" \ - --copt="-Wundef" \ - --copt="-Wno-error=pragmas" \ + --copt=\"-Wall\" \ + --copt=\"-Werror\" \ + --copt=\"-Wuninitialized\" \ + --copt=\"-Wundef\" \ + --copt=\"-Wno-error=pragmas\" \ --enable_bzlmod=false \ + --enable_workspace=true \ --features=external_include_paths \ --keep_going \ + --per_file_copt=\"external/.*@-w\" \ --show_timestamps \ - --test_output=errors + --test_output=errors \ + ${BAZEL_EXTRA_ARGS:-}" # Test GCC for std in ${STD}; do @@ -115,18 +129,23 @@ for std in ${STD}; do --rm \ --env="CC=/usr/local/bin/gcc" \ --env="BAZEL_CXXOPTS=-std=${std}" \ + --env="USE_BAZEL_VERSION=9.1.0" \ + ${DOCKER_EXTRA_ARGS:-} \ ${LINUX_LATEST_CONTAINER} \ - /usr/local/bin/bazel test ... \ - --copt="-Wall" \ - --copt="-Werror" \ - --copt="-Wuninitialized" \ - --copt="-Wundef" \ - --define="absl=${absl}" \ - --enable_bzlmod=true \ - --features=external_include_paths \ - --keep_going \ - --show_timestamps \ - --test_output=errors + /bin/bash --login -c " + /usr/local/bin/bazel test ... \ + --copt=\"-Wall\" \ + --copt=\"-Werror\" \ + --copt=\"-Wuninitialized\" \ + --copt=\"-Wundef\" \ + --define=\"absl=${absl}\" \ + --enable_bzlmod=true \ + --features=external_include_paths \ + --keep_going \ + --per_file_copt=\"external/.*@-w\" \ + --show_timestamps \ + --test_output=errors \ + ${BAZEL_EXTRA_ARGS:-}" done done @@ -137,21 +156,26 @@ for std in ${STD}; do --volume="${GTEST_ROOT}:/src:ro" \ --workdir="/src" \ --rm \ - --env="CC=/opt/llvm/clang/bin/clang" \ + --env="CC=/opt/llvm/bin/clang" \ --env="BAZEL_CXXOPTS=-std=${std}" \ + --env="USE_BAZEL_VERSION=9.1.0" \ + ${DOCKER_EXTRA_ARGS:-} \ ${LINUX_LATEST_CONTAINER} \ - /usr/local/bin/bazel test ... \ - --copt="--gcc-toolchain=/usr/local" \ - --copt="-Wall" \ - --copt="-Werror" \ - --copt="-Wuninitialized" \ - --copt="-Wundef" \ - --define="absl=${absl}" \ - --enable_bzlmod=true \ - --features=external_include_paths \ - --keep_going \ - --linkopt="--gcc-toolchain=/usr/local" \ - --show_timestamps \ - --test_output=errors + /bin/bash --login -c " + /usr/local/bin/bazel test ... \ + --copt=\"--gcc-toolchain=/usr/local\" \ + --copt=\"-Wall\" \ + --copt=\"-Werror\" \ + --copt=\"-Wuninitialized\" \ + --copt=\"-Wundef\" \ + --define=\"absl=${absl}\" \ + --enable_bzlmod=true \ + --features=external_include_paths \ + --keep_going \ + --linkopt=\"--gcc-toolchain=/usr/local\" \ + --per_file_copt=\"external/.*@-w\" \ + --show_timestamps \ + --test_output=errors \ + ${BAZEL_EXTRA_ARGS:-}" done done diff --git a/extern/googletest/ci/macos-presubmit.sh b/extern/googletest/ci/macos-presubmit.sh index 5370ed60d..46b7a4cbd 100644 --- a/extern/googletest/ci/macos-presubmit.sh +++ b/extern/googletest/ci/macos-presubmit.sh @@ -31,8 +31,13 @@ set -euox pipefail -# Use Xcode 16.0 -sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer +# Use Xcode 26.2 +sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer + +brew install cmake + +export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu) +export CTEST_PARALLEL_LEVEL=$(sysctl -n hw.ncpu) if [[ -z ${GTEST_ROOT:-} ]]; then GTEST_ROOT="$(realpath $(dirname ${0})/..)" @@ -56,7 +61,7 @@ done # Test the Bazel build # If we are running on Kokoro, check for a versioned Bazel binary. -KOKORO_GFILE_BAZEL_BIN="bazel-8.0.0-darwin-x86_64" +KOKORO_GFILE_BAZEL_BIN="bazel-9.1.0-darwin-x86_64" if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}" chmod +x ${BAZEL_BIN} @@ -64,6 +69,12 @@ else BAZEL_BIN="bazel" fi +# Use Bazel Vendor mode to reduce reliance on external dependencies. +if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" ]]; then + tar -xf "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" -C "${HOME}/" + BAZEL_EXTRA_ARGS="--vendor_dir=${HOME}/googletest_vendor ${BAZEL_EXTRA_ARGS:-}" +fi + cd ${GTEST_ROOT} for absl in 0 1; do ${BAZEL_BIN} test ... \ @@ -75,6 +86,8 @@ for absl in 0 1; do --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ + --per_file_copt="external/.*@-w" \ --show_timestamps \ - --test_output=errors + --test_output=errors \ + ${BAZEL_EXTRA_ARGS:-} done diff --git a/extern/googletest/ci/windows-presubmit.bat b/extern/googletest/ci/windows-presubmit.bat index e2664c538..cce732b30 100644 --- a/extern/googletest/ci/windows-presubmit.bat +++ b/extern/googletest/ci/windows-presubmit.bat @@ -1,6 +1,6 @@ SETLOCAL ENABLEDELAYEDEXPANSION -SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-8.0.0-windows-x86_64.exe +SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-9.1.0-windows-x86_64.exe SET PATH=C:\Python34;%PATH% SET BAZEL_PYTHON=C:\python34\python.exe @@ -19,6 +19,7 @@ IF %errorlevel% neq 0 EXIT /B 1 SET CMAKE_BUILD_PATH=cmake_msvc2022 MKDIR %CMAKE_BUILD_PATH% CD %CMAKE_BUILD_PATH% +SET CXXFLAGS="/WX" %CMAKE_BIN% %GTEST_ROOT% ^ -G "Visual Studio 17 2022" ^ @@ -37,6 +38,7 @@ IF %errorlevel% neq 0 EXIT /B 1 %CTEST_BIN% -C Debug --timeout 600 IF %errorlevel% neq 0 EXIT /B 1 +SET "CXXFLAGS=" CD %GTEST_ROOT% RMDIR /S /Q %CMAKE_BUILD_PATH% @@ -48,6 +50,14 @@ RMDIR /S /Q %CMAKE_BUILD_PATH% :: --output_user_root=C:\tmp causes Bazel to use a shorter path. SET BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community +:: Use Bazel Vendor mode to reduce reliance on external dependencies. +IF EXIST "%KOKORO_GFILE_DIR%\distdir\googletest_vendor.tar.gz" ( + tar --force-local -xf "%KOKORO_GFILE_DIR%\distdir\googletest_vendor.tar.gz" -C c: + SET VENDOR_FLAG=--vendor_dir=c:\googletest_vendor +) ELSE ( + SET VENDOR_FLAG= +) + :: C++17 %BAZEL_EXE% ^ --output_user_root=C:\tmp ^ @@ -57,8 +67,10 @@ SET BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community --copt=/WX ^ --enable_bzlmod=true ^ --keep_going ^ + --per_file_copt=external/.*@/w ^ --test_output=errors ^ - --test_tag_filters=-no_test_msvc2017 + --test_tag_filters=-no_test_msvc2017 ^ + %VENDOR_FLAG% IF %errorlevel% neq 0 EXIT /B 1 :: C++20 @@ -70,6 +82,8 @@ IF %errorlevel% neq 0 EXIT /B 1 --copt=/WX ^ --enable_bzlmod=true ^ --keep_going ^ + --per_file_copt=external/.*@/w ^ --test_output=errors ^ - --test_tag_filters=-no_test_msvc2017 + --test_tag_filters=-no_test_msvc2017 ^ + %VENDOR_FLAG% IF %errorlevel% neq 0 EXIT /B 1 diff --git a/extern/googletest/docs/_layouts/default.html b/extern/googletest/docs/_layouts/default.html index c7f331b87..f0ae47426 100644 --- a/extern/googletest/docs/_layouts/default.html +++ b/extern/googletest/docs/_layouts/default.html @@ -7,15 +7,15 @@ {% seo %} + + -