From 98ac1e4a78d2d890aa1f65523d9654028c50b10e Mon Sep 17 00:00:00 2001 From: Hauke Strasdat Date: Thu, 30 May 2024 11:36:20 -0700 Subject: [PATCH] attempting to re-enable CI --- .github/workflows/ci.yml | 4 +-- CMakePresets.json | 2 -- .../ports/default/farm-ng-core/portfile.cmake | 1 - cpp/sophus2/calculus/CMakeLists.txt | 8 ++---- cpp/sophus2/ceres/CMakeLists.txt | 28 +++++++++---------- cpp/sophus2/color/CMakeLists.txt | 16 +++++------ cpp/sophus2/image/CMakeLists.txt | 15 +++++----- cpp/sophus2/linalg/CMakeLists.txt | 14 ++++------ cpp/sophus2/sensor/CMakeLists.txt | 14 ++++------ scripts/compile_clang.sh | 2 +- scripts/compile_clang_asan.sh | 2 +- scripts/compile_gcc.sh | 2 +- 12 files changed, 47 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42242687..2eef11c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CMake on: push: - branches: [ "main" ] + branches: [ "main", "cygnet-dev" ] pull_request: - branches: [ "main" ] + branches: [ "main", "cygnet-dev" ] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) diff --git a/CMakePresets.json b/CMakePresets.json index 2d05b337..4a96c18f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -14,7 +14,6 @@ "binaryDir": "${sourceDir}/out/build/${presetName}", "installDir": "${sourceDir}/out/install/${presetName}", "cacheVariables": { - "BUILD_SOPHUS_TESTS": "On", "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", "CMAKE_CXX_FLAGS": "-Werror -Wall -Wextra -Wpedantic -Wno-unused-local-typedef -Wno-unused-local-typedef -Wno-gnu-zero-variadic-macro-arguments -Wno-unused-parameter -Wno-unused-variable -Wno-vla-extension", "CMAKE_CXX_EXTENSIONS": "OFF", @@ -58,7 +57,6 @@ "displayName": "GCC RelWithDebInfo", "inherits": "common", "cacheVariables": { - "BUILD_SOPHUS_TESTS": "On", "CMAKE_C_COMPILER": "gcc", "CMAKE_CXX_COMPILER": "g++", "CMAKE_BUILD_TYPE": "RelWithDebInfo", diff --git a/cmake/vcpkg/ports/default/farm-ng-core/portfile.cmake b/cmake/vcpkg/ports/default/farm-ng-core/portfile.cmake index 55ee4251..6918a86f 100644 --- a/cmake/vcpkg/ports/default/farm-ng-core/portfile.cmake +++ b/cmake/vcpkg/ports/default/farm-ng-core/portfile.cmake @@ -13,7 +13,6 @@ set(VCPKG_CXX_FLAGS "-fconcepts ${VCPKG_CXX_FLAGS}") vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - "-DBUILD_SOPHUS_TESTS=Off" "-DFARM_NG_PROVIDER_DEV_PACKAGES=Sophus" "-DCMAKE_CXX_STANDARD=17" # TODO: Should be able to remove "-DCMAKE_CXX_EXTENSIONS=On" # TODO: Should be able to remove diff --git a/cpp/sophus2/calculus/CMakeLists.txt b/cpp/sophus2/calculus/CMakeLists.txt index 1b615617..b86c7ef0 100644 --- a/cpp/sophus2/calculus/CMakeLists.txt +++ b/cpp/sophus2/calculus/CMakeLists.txt @@ -14,8 +14,6 @@ farm_ng_add_library(sophus2_calculus ) target_link_libraries(sophus2_calculus INTERFACE sophus2_common) -if(${BUILD_SOPHUS_TESTS}) - farm_ng_add_test(region - PARENT_LIBRARY sophus2_calculus - LABELS small) -endif() +farm_ng_add_test(region + PARENT_LIBRARY sophus2_calculus + LABELS small) diff --git a/cpp/sophus2/ceres/CMakeLists.txt b/cpp/sophus2/ceres/CMakeLists.txt index 2f09128c..53b13e40 100644 --- a/cpp/sophus2/ceres/CMakeLists.txt +++ b/cpp/sophus2/ceres/CMakeLists.txt @@ -14,18 +14,16 @@ farm_ng_add_library(sophus_ceres ) target_link_libraries(sophus_ceres INTERFACE sophus2_lie) -if(${BUILD_SOPHUS_TESTS}) - find_package(Ceres 2.1.0 REQUIRED) - foreach(test_basename - ceres - manifold - ) - farm_ng_add_test(${test_basename} - PARENT_LIBRARY sophus_ceres - LINK_LIBRARIES - Ceres::ceres sophus_ceres - farm_ng_core::farm_ng_core_pipeline - sophus2_sensor - LABELS large) - endforeach() -endif() +find_package(Ceres 2.1.0 REQUIRED) +foreach(test_basename + ceres + manifold +) +farm_ng_add_test(${test_basename} + PARENT_LIBRARY sophus_ceres + LINK_LIBRARIES + Ceres::ceres sophus_ceres + farm_ng_core::farm_ng_core_pipeline + sophus2_sensor + LABELS large) +endforeach() diff --git a/cpp/sophus2/color/CMakeLists.txt b/cpp/sophus2/color/CMakeLists.txt index cbfb010a..8b7a817b 100644 --- a/cpp/sophus2/color/CMakeLists.txt +++ b/cpp/sophus2/color/CMakeLists.txt @@ -15,12 +15,10 @@ farm_ng_add_library(sophus2_color ) target_link_libraries(sophus2_color PUBLIC sophus2_calculus) -if(${BUILD_SOPHUS_TESTS}) - foreach(test_basename - color) - farm_ng_add_test(${test_basename} - PARENT_LIBRARY sophus2_color - LINK_LIBRARIES sophus2_color - LABELS small) - endforeach() -endif() +foreach(test_basename + color) + farm_ng_add_test(${test_basename} + PARENT_LIBRARY sophus2_color + LINK_LIBRARIES sophus2_color + LABELS small) +endforeach() diff --git a/cpp/sophus2/image/CMakeLists.txt b/cpp/sophus2/image/CMakeLists.txt index 411c9b73..16577fcf 100644 --- a/cpp/sophus2/image/CMakeLists.txt +++ b/cpp/sophus2/image/CMakeLists.txt @@ -41,11 +41,10 @@ target_link_libraries(sophus2_image sophus2_geometry) -if(${BUILD_SOPHUS_TESTS}) - foreach(test_basename ${sophus2_image_src_prefixes}) - farm_ng_add_test(${test_basename} - PARENT_LIBRARY sophus2_image - LINK_LIBRARIES sophus2_image - LABELS small) - endforeach() -endif() +foreach(test_basename ${sophus2_image_src_prefixes}) + farm_ng_add_test(${test_basename} + PARENT_LIBRARY sophus2_image + LINK_LIBRARIES sophus2_image + LABELS small) +endforeach() + diff --git a/cpp/sophus2/linalg/CMakeLists.txt b/cpp/sophus2/linalg/CMakeLists.txt index 9fafb391..d6c90d33 100644 --- a/cpp/sophus2/linalg/CMakeLists.txt +++ b/cpp/sophus2/linalg/CMakeLists.txt @@ -30,11 +30,9 @@ farm_ng_add_library(sophus2_linalg target_link_libraries(sophus2_linalg INTERFACE sophus2_common sophus_concept) -if(${BUILD_SOPHUS_TESTS}) - foreach(test_basename ${sophus2_linalg_src_prefixes}) - farm_ng_add_test(${test_basename} - PARENT_LIBRARY sophus2_linalg - LINK_LIBRARIES sophus2_linalg - LABELS small) - endforeach() -endif() +foreach(test_basename ${sophus2_linalg_src_prefixes}) + farm_ng_add_test(${test_basename} + PARENT_LIBRARY sophus2_linalg + LINK_LIBRARIES sophus2_linalg + LABELS small) +endforeach() diff --git a/cpp/sophus2/sensor/CMakeLists.txt b/cpp/sophus2/sensor/CMakeLists.txt index d02785b6..41959cca 100644 --- a/cpp/sophus2/sensor/CMakeLists.txt +++ b/cpp/sophus2/sensor/CMakeLists.txt @@ -36,11 +36,9 @@ SOURCES target_link_libraries(sophus2_sensor sophus2_lie sophus2_image) -if(${BUILD_SOPHUS_TESTS}) - foreach(test_basename ${sophus2_sensor_src_prefixes}) - farm_ng_add_test(${test_basename} - PARENT_LIBRARY sophus2_sensor - LINK_LIBRARIES sophus2_sensor - LABELS small) - endforeach() -endif() +foreach(test_basename ${sophus2_sensor_src_prefixes}) + farm_ng_add_test(${test_basename} + PARENT_LIBRARY sophus2_sensor + LINK_LIBRARIES sophus2_sensor + LABELS small) +endforeach() diff --git a/scripts/compile_clang.sh b/scripts/compile_clang.sh index 76c5be7f..00fc32df 100755 --- a/scripts/compile_clang.sh +++ b/scripts/compile_clang.sh @@ -5,6 +5,6 @@ set -e # exit on error mkdir -p build cd build -CC=clang CXX=clang++ cmake -G Ninja -DBUILD_FARM_NG_PROTOS=On -DBUILD_SOPHUS_TESTS=On .. +CC=clang CXX=clang++ cmake -G Ninja -DBUILD_FARM_NG_PROTOS=On .. ninja ninja test diff --git a/scripts/compile_clang_asan.sh b/scripts/compile_clang_asan.sh index 30eb38d1..8e7224c1 100755 --- a/scripts/compile_clang_asan.sh +++ b/scripts/compile_clang_asan.sh @@ -5,6 +5,6 @@ set -e # exit on error mkdir -p build cd build -CC=clang CXX=clang++ cmake -G Ninja -DBUILD_ASAN=On -DCMAKE_BUILD_TYPE=Debug -DBUILD_FARM_NG_PROTOS=On -DBUILD_SOPHUS_TESTS=On .. +CC=clang CXX=clang++ cmake -G Ninja -DBUILD_ASAN=On -DCMAKE_BUILD_TYPE=Debug -DBUILD_FARM_NG_PROTOS=On .. ninja ninja test diff --git a/scripts/compile_gcc.sh b/scripts/compile_gcc.sh index 0dca991e..afd6990f 100755 --- a/scripts/compile_gcc.sh +++ b/scripts/compile_gcc.sh @@ -5,6 +5,6 @@ set -e # exit on error mkdir -p build cd build -cmake -DBUILD_FARM_NG_PROTOS=On -DBUILD_SOPHUS_TESTS=On .. +cmake -DBUILD_FARM_NG_PROTOS=On .. make -j1 make test