diff options
| -rw-r--r-- | .gitlab-ci.yml | 27 | ||||
| -rw-r--r-- | .gitlab/ci/configure_debian10_aarch64_extdeps.cmake | 1 | ||||
| -rw-r--r-- | .gitlab/ci/configure_debian10_extdeps.cmake | 1 | ||||
| -rw-r--r-- | .gitlab/ci/configure_extdeps_common.cmake | 5 | ||||
| -rw-r--r-- | .gitlab/ci/configure_fedora36_extdeps.cmake | 1 | ||||
| -rw-r--r-- | .gitlab/ci/ctest_standalone.cmake | 6 | ||||
| -rwxr-xr-x | .gitlab/ci/docker/debian10-aarch64/install_deps.sh | 14 | ||||
| -rwxr-xr-x | .gitlab/ci/docker/debian10/install_deps.sh | 14 | ||||
| -rwxr-xr-x | .gitlab/ci/docker/fedora36/install_deps.sh | 14 | ||||
| -rw-r--r-- | .gitlab/ci/env_debian10_aarch64_extdeps.sh | 1 | ||||
| -rw-r--r-- | .gitlab/ci/env_debian10_extdeps.sh | 1 | ||||
| -rw-r--r-- | .gitlab/ci/env_extdeps_common.sh | 5 | ||||
| -rw-r--r-- | .gitlab/ci/env_fedora36_extdeps.sh | 1 | ||||
| -rwxr-xr-x | .gitlab/ci/extdeps-linux.sh | 62 | ||||
| -rw-r--r-- | .gitlab/os-linux.yml | 30 | ||||
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | Tests/RunCMake/FileAPI/ClientStateful-check.py | 6 | ||||
| -rw-r--r-- | Tests/RunCMake/FileAPI/RunCMakeTest.cmake | 4 |
19 files changed, 191 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f321d33..bfc713f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -314,6 +314,33 @@ b:debian10-makefiles-inplace: variables: CMAKE_CI_JOB_NIGHTLY: "true" +b:debian10-extdeps: + extends: + - .debian10_extdeps + - .cmake_build_linux_standalone + - .linux_builder_tags + - .run_manually + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + +b:debian10-aarch64-extdeps: + extends: + - .debian10_aarch64_extdeps + - .cmake_build_linux_standalone + - .linux_builder_tags_aarch64 + - .run_manually + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + +b:fedora36-extdeps: + extends: + - .fedora36_extdeps + - .cmake_build_linux_standalone + - .linux_builder_tags + - .run_manually + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + t:fedora36-ninja: extends: - .fedora36_ninja diff --git a/.gitlab/ci/configure_debian10_aarch64_extdeps.cmake b/.gitlab/ci/configure_debian10_aarch64_extdeps.cmake new file mode 100644 index 0000000..8e545f5 --- /dev/null +++ b/.gitlab/ci/configure_debian10_aarch64_extdeps.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_extdeps_common.cmake") diff --git a/.gitlab/ci/configure_debian10_extdeps.cmake b/.gitlab/ci/configure_debian10_extdeps.cmake new file mode 100644 index 0000000..8e545f5 --- /dev/null +++ b/.gitlab/ci/configure_debian10_extdeps.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_extdeps_common.cmake") diff --git a/.gitlab/ci/configure_extdeps_common.cmake b/.gitlab/ci/configure_extdeps_common.cmake new file mode 100644 index 0000000..2c7d328 --- /dev/null +++ b/.gitlab/ci/configure_extdeps_common.cmake @@ -0,0 +1,5 @@ +set(CMAKE_USE_SYSTEM_LIBRARIES ON CACHE BOOL "") +set(CMAKE_SKIP_BOOTSTRAP_TEST ON CACHE BOOL "") +set(CMake_TEST_Qt6 OFF CACHE BOOL "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora36_extdeps.cmake b/.gitlab/ci/configure_fedora36_extdeps.cmake new file mode 100644 index 0000000..8e545f5 --- /dev/null +++ b/.gitlab/ci/configure_fedora36_extdeps.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_extdeps_common.cmake") diff --git a/.gitlab/ci/ctest_standalone.cmake b/.gitlab/ci/ctest_standalone.cmake index 9199693..36ba71c 100644 --- a/.gitlab/ci/ctest_standalone.cmake +++ b/.gitlab/ci/ctest_standalone.cmake @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.8) include("${CMAKE_CURRENT_LIST_DIR}/gitlab_ci.cmake") include("${CMAKE_CURRENT_LIST_DIR}/env_$ENV{CMAKE_CONFIGURATION}.cmake" OPTIONAL) -set(cmake_args - -C "${CMAKE_CURRENT_LIST_DIR}/configure_$ENV{CMAKE_CONFIGURATION}.cmake") +set(initial_cache "${CMAKE_CURRENT_LIST_DIR}/configure_$ENV{CMAKE_CONFIGURATION}.cmake") +set(cmake_args -C "${initial_cache}") include(ProcessorCount) ProcessorCount(nproc) @@ -25,6 +25,8 @@ ctest_update() if("$ENV{CMAKE_CI_BOOTSTRAP}") set(CTEST_CONFIGURE_COMMAND "\"${CTEST_SOURCE_DIRECTORY}/bootstrap\" --parallel=${nproc}") +elseif("$ENV{CMAKE_CONFIGURATION}" MATCHES "extdeps") + set(CTEST_CONFIGURE_COMMAND "/opt/extdeps/bin/cmake -C \"${initial_cache}\" -G \"${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"") endif() # Configure the project. diff --git a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh index 3dd814d..9a98538 100755 --- a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh +++ b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh @@ -14,6 +14,20 @@ apt-get install -y \ curl \ git +# Install optional external build dependencies. +apt-get install -y \ + libarchive-dev \ + libbz2-dev \ + libcurl4-gnutls-dev \ + libexpat1-dev \ + libjsoncpp-dev \ + liblzma-dev \ + libncurses-dev \ + librhash-dev \ + libuv1-dev \ + libzstd-dev \ + zlib1g-dev + # Install iwyu runtime deps. apt-get install -y \ clang-6.0 \ diff --git a/.gitlab/ci/docker/debian10/install_deps.sh b/.gitlab/ci/docker/debian10/install_deps.sh index f796816..36ef508 100755 --- a/.gitlab/ci/docker/debian10/install_deps.sh +++ b/.gitlab/ci/docker/debian10/install_deps.sh @@ -14,6 +14,20 @@ apt-get install -y \ curl \ git +# Install optional external build dependencies. +apt-get install -y \ + libarchive-dev \ + libbz2-dev \ + libcurl4-gnutls-dev \ + libexpat1-dev \ + libjsoncpp-dev \ + liblzma-dev \ + libncurses-dev \ + librhash-dev \ + libuv1-dev \ + libzstd-dev \ + zlib1g-dev + # Install iwyu runtime deps. apt-get install -y \ clang-6.0 \ diff --git a/.gitlab/ci/docker/fedora36/install_deps.sh b/.gitlab/ci/docker/fedora36/install_deps.sh index b8ddfb9..141e540 100755 --- a/.gitlab/ci/docker/fedora36/install_deps.sh +++ b/.gitlab/ci/docker/fedora36/install_deps.sh @@ -17,6 +17,20 @@ dnf install --setopt=install_weak_deps=False -y \ git-core \ make +# Install optional external build dependencies. +dnf install --setopt=install_weak_deps=False -y \ + bzip2-devel \ + expat-devel \ + jsoncpp-devel \ + libarchive-devel \ + libcurl-devel \ + libuv-devel \ + libuv-devel \ + libzstd-devel \ + rhash-devel \ + xz-devel \ + zlib-devel + # Install documentation tools. dnf install --setopt=install_weak_deps=False -y \ python3-sphinx \ diff --git a/.gitlab/ci/env_debian10_aarch64_extdeps.sh b/.gitlab/ci/env_debian10_aarch64_extdeps.sh new file mode 100644 index 0000000..7076e18 --- /dev/null +++ b/.gitlab/ci/env_debian10_aarch64_extdeps.sh @@ -0,0 +1 @@ +source .gitlab/ci/env_extdeps_common.sh diff --git a/.gitlab/ci/env_debian10_extdeps.sh b/.gitlab/ci/env_debian10_extdeps.sh new file mode 100644 index 0000000..7076e18 --- /dev/null +++ b/.gitlab/ci/env_debian10_extdeps.sh @@ -0,0 +1 @@ +source .gitlab/ci/env_extdeps_common.sh diff --git a/.gitlab/ci/env_extdeps_common.sh b/.gitlab/ci/env_extdeps_common.sh new file mode 100644 index 0000000..8cabc05 --- /dev/null +++ b/.gitlab/ci/env_extdeps_common.sh @@ -0,0 +1,5 @@ +.gitlab/ci/extdeps-linux.sh + +export CMAKE_PREFIX_PATH=/opt/extdeps +export PATH=/opt/extdeps/bin:$PATH +export LD_LIBRARY_PATH=/opt/extdeps/lib diff --git a/.gitlab/ci/env_fedora36_extdeps.sh b/.gitlab/ci/env_fedora36_extdeps.sh new file mode 100644 index 0000000..7076e18 --- /dev/null +++ b/.gitlab/ci/env_fedora36_extdeps.sh @@ -0,0 +1 @@ +source .gitlab/ci/env_extdeps_common.sh diff --git a/.gitlab/ci/extdeps-linux.sh b/.gitlab/ci/extdeps-linux.sh new file mode 100755 index 0000000..f0d4c0d --- /dev/null +++ b/.gitlab/ci/extdeps-linux.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +set -e + +mkdir -p /opt/extdeps/src +cd /opt/extdeps/src +export PATH=/opt/extdeps/bin:$PATH + +#---------------------------------------------------------------------------- +# cmake + +case "$(uname -s)-$(uname -m)" in + Linux-x86_64) + cmake_version="3.13.5" + cmake_sha256sum="e2fd0080a6f0fc1ec84647acdcd8e0b4019770f48d83509e6a5b0b6ea27e5864" + cmake_platform="Linux-x86_64" + ;; + Linux-aarch64) + cmake_version="3.19.8" + cmake_sha256sum="807f5afb2a560e00af9640e496d5673afefc2888bf0ed076412884a5ebb547a1" + cmake_platform="Linux-aarch64" + ;; + *) + echo "Unrecognized platform $(uname -s)-$(uname -m)" + exit 1 + ;; +esac +readonly shatool +readonly cmake_sha256sum +readonly cmake_platform + +readonly cmake_filename="cmake-$cmake_version-$cmake_platform" +readonly cmake_tarball="$cmake_filename.tar.gz" + +echo "$cmake_sha256sum $cmake_tarball" > cmake.sha256sum +curl -OL "https://github.com/Kitware/CMake/releases/download/v$cmake_version/$cmake_tarball" +sha256sum --check cmake.sha256sum +tar xzf "$cmake_tarball" -C /opt/extdeps --strip-components=1 +rm -f "$cmake_tarball" cmake.sha256sum + +#---------------------------------------------------------------------------- +# libuv + +curl -L -o libuv-1.28.0.tar.gz https://github.com/libuv/libuv/archive/refs/tags/v1.28.0.tar.gz +tar xzf libuv-1.28.0.tar.gz +cmake -S libuv-1.28.0 -B libuv-1.28.0-build \ + -DCMAKE_INSTALL_PREFIX=/opt/extdeps +cmake --build libuv-1.28.0-build --target install +rm -rf libuv-1.28.0* + +#---------------------------------------------------------------------------- +# jsoncpp + +curl -L -o jsoncpp-1.6.0.tar.gz https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.6.0.tar.gz +tar xzf jsoncpp-1.6.0.tar.gz +cmake -S jsoncpp-1.6.0 -B jsoncpp-1.6.0-build \ + -DCMAKE_BUILD_TYPE=Release \ + -DJSONCPP_LIB_BUILD_STATIC=ON \ + -DJSONCPP_LIB_BUILD_SHARED=ON \ + -DCMAKE_INSTALL_PREFIX=/opt/extdeps +cmake --build jsoncpp-1.6.0-build --target install +rm -rf jsoncpp-1.6.0* diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 37e5c22..765518a 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -45,7 +45,7 @@ ### Debian .debian10: - image: "kitware/cmake:ci-debian10-x86_64-2022-06-21" + image: "kitware/cmake:ci-debian10-x86_64-2022-08-17" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -60,7 +60,7 @@ CMAKE_CI_NO_INSTALL: 1 .debian10_aarch64: - image: "kitware/cmake:ci-debian10-aarch64-2022-06-21" + image: "kitware/cmake:ci-debian10-aarch64-2022-08-17" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -69,7 +69,7 @@ ### Fedora .fedora36: - image: "kitware/cmake:ci-fedora36-x86_64-2022-06-21" + image: "kitware/cmake:ci-fedora36-x86_64-2022-08-17" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes" @@ -137,6 +137,30 @@ CMAKE_CI_NO_INSTALL: 1 CTEST_NO_WARNINGS_ALLOWED: 1 +.debian10_extdeps: + extends: .debian10 + + variables: + CMAKE_CONFIGURATION: debian10_extdeps + CMAKE_CI_BUILD_TYPE: Release + CTEST_NO_WARNINGS_ALLOWED: 1 + +.debian10_aarch64_extdeps: + extends: .debian10_aarch64 + + variables: + CMAKE_CONFIGURATION: debian10_aarch64_extdeps + CMAKE_CI_BUILD_TYPE: Release + CTEST_NO_WARNINGS_ALLOWED: 1 + +.fedora36_extdeps: + extends: .fedora36 + + variables: + CMAKE_CONFIGURATION: fedora36_extdeps + CMAKE_CI_BUILD_TYPE: Release + CTEST_NO_WARNINGS_ALLOWED: 1 + .fedora36_ninja: extends: .fedora36 diff --git a/CMakeLists.txt b/CMakeLists.txt index 267518b..9d77dfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -648,7 +648,7 @@ macro (CMAKE_BUILD_UTILITIES) #--------------------------------------------------------------------- # Build jsoncpp library. if(CMAKE_USE_SYSTEM_JSONCPP) - find_package(JsonCpp 1.4.1) + find_package(JsonCpp 1.6.0) if(NOT JsonCpp_FOUND) message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!") diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index ec89188..2485a7e 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -305,6 +305,9 @@ add_RunCMake_test(ExportImport) add_RunCMake_test(ExternalData) add_RunCMake_test(FeatureSummary) add_RunCMake_test(FPHSA) +if(CMAKE_USE_SYSTEM_JSONCPP) + list(APPEND FileAPI_ARGS -DJsonCpp_VERSION_STRING=${JsonCpp_VERSION_STRING}) +endif() add_RunCMake_test(FileAPI -DPython_EXECUTABLE=${Python_EXECUTABLE} -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}) add_RunCMake_test(FindBoost) diff --git a/Tests/RunCMake/FileAPI/ClientStateful-check.py b/Tests/RunCMake/FileAPI/ClientStateful-check.py index f3d20d1..28679bb 100644 --- a/Tests/RunCMake/FileAPI/ClientStateful-check.py +++ b/Tests/RunCMake/FileAPI/ClientStateful-check.py @@ -108,7 +108,11 @@ def check_query_json_empty(q): check_error_re(q, "value, object or array expected") def check_query_json_extra(q): - check_error_re(q, "Extra non-whitespace after JSON value") + if bool(os.environ.get("CMake_JSONCPP_PRE_1_7_5", "")) and is_dict(q) and sorted(q.keys()) == ["responses"]: + # jsoncpp < 1.7.5 did not diagnose extra non-whitespace characters + check_error(q["responses"], "'requests' member missing") + else: + check_error_re(q, "Extra non-whitespace after JSON value") def check_query_not_file(q): check_error_re(q, "failed to read from file") diff --git a/Tests/RunCMake/FileAPI/RunCMakeTest.cmake b/Tests/RunCMake/FileAPI/RunCMakeTest.cmake index 61dce17..961b73a 100644 --- a/Tests/RunCMake/FileAPI/RunCMakeTest.cmake +++ b/Tests/RunCMake/FileAPI/RunCMakeTest.cmake @@ -39,6 +39,10 @@ if(RunCMake_GENERATOR_IS_MULTI_CONFIG) set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;MinSizeRel\\;RelWithDebInfo") endif() +if(JsonCpp_VERSION_STRING AND JsonCpp_VERSION_STRING VERSION_LESS 1.7.5) + set(ENV{CMake_JSONCPP_PRE_1_7_5} 1) +endif() + run_cmake(Nothing) run_cmake(Empty) run_cmake(EmptyClient) |
