From 3a5db1b3168a86622bd915fafcc4daa3419c7bb6 Mon Sep 17 00:00:00 2001
From: Petr Shumilov
Date: Mon, 27 Jan 2025 21:00:31 +0300
Subject: [PATCH] Fix github CI
Signed-off-by: Petr Shumilov
---
.github/workflows/macos.yml | 2 +-
cmake/utils.cmake | 9 ++++++---
compiler/compiler-settings.cpp | 2 +-
third-party/curl-cmake/curl.cmake | 8 ++++++--
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 1d3f541bf8..06814cf78a 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -36,7 +36,7 @@ jobs:
brew install python@3.13 re2c cmake coreutils openssl libiconv re2 pcre yaml-cpp zstd googletest shivammathur/php/php@7.4
brew link --overwrite --force shivammathur/php/php@7.4
/opt/homebrew/opt/python@3.13/libexec/bin/python -m pip install --upgrade pip --break-system-packages && /opt/homebrew/opt/python@3.13/libexec/bin/pip install --break-system-packages jsonschema
-
+
- name: Run cmake
run: cmake -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DDOWNLOAD_MISSING_LIBRARIES=On -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
diff --git a/cmake/utils.cmake b/cmake/utils.cmake
index da5d43987a..0a5a4adb97 100644
--- a/cmake/utils.cmake
+++ b/cmake/utils.cmake
@@ -62,12 +62,15 @@ function(update_git_submodules)
# Update submodules
execute_process(
- COMMAND git submodule update --init --recursive
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND /usr/bin/git submodule update --init --recursive -v
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE update_result
+ OUTPUT_VARIABLE out1
+ ERROR_VARIABLE err1
ERROR_QUIET
)
-
+ message("out='${out1}'")
+ message("err='${err1}'")
if(NOT update_result EQUAL 0)
message(FATAL_ERROR "Failed to update Git submodules.")
endif()
diff --git a/compiler/compiler-settings.cpp b/compiler/compiler-settings.cpp
index 850e201a1e..eadc519188 100644
--- a/compiler/compiler-settings.cpp
+++ b/compiler/compiler-settings.cpp
@@ -153,7 +153,7 @@ void append_3dparty_lib(std::string &ld_flags, const std::string &path_to_3dpart
ld_flags += " " + path_to_3dparty + "lib/lib" + libname + ".a";
}
-void append_curl([[maybe_unused]] std::string &cxx_flags, std::string &ld_flags, const std::string &path_to_3dparty) noexcept {
+void append_curl([[maybe_unused]] std::string &cxx_flags, std::string &ld_flags, [[maybe_unused]] const std::string &path_to_3dparty) noexcept {
if (!contains_lib(ld_flags, "curl")) {
#if defined(__APPLE__)
ld_flags += " -lcurl";
diff --git a/third-party/curl-cmake/curl.cmake b/third-party/curl-cmake/curl.cmake
index 7d1b6e3683..e8d34b0939 100644
--- a/third-party/curl-cmake/curl.cmake
+++ b/third-party/curl-cmake/curl.cmake
@@ -1,6 +1,11 @@
set(CURL_INSTALL_DIR ${CMAKE_BINARY_DIR}/third-party/curl)
file(MAKE_DIRECTORY ${CURL_INSTALL_DIR})
+set(CURL_COMPILE_FLAGS "-Wno-deprecated-declarations")
+if(COMPILER_CLANG)
+ set(CURL_COMPILE_FLAGS "${CURL_COMPILE_FLAGS} -Wno-string-plus-int")
+endif()
+
ExternalProject_Add(
curl
SOURCE_DIR ${THIRD_PARTY_DIR}/curl
@@ -21,8 +26,7 @@ ExternalProject_Add(
-DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR}
-DCMAKE_INSTALL_LIBDIR=${CURL_INSTALL_DIR}/lib/
-DCMAKE_INSTALL_INCLUDEDIR=${CURL_INSTALL_DIR}/include
- -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations"
- -DCMAKE_C_FLAGS="-Wno-deprecated-declarations"
+ -DCMAKE_C_FLAGS=${CURL_COMPILE_FLAGS}
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $
INSTALL_COMMAND
${CMAKE_COMMAND} --install . --config $ &&