Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
andreylzmw committed Mar 21, 2024
1 parent 82f3514 commit fc66f81
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 21 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
strategy:
matrix:
include:
- os: buster
compiler: g++
cpp: 17
asan: off
ubsan: off
- os: focal
compiler: clang++
cpp: 17
asan: off
ubsan: on
- os: focal
compiler: g++-10
cpp: 20
asan: on
ubsan: off
# - os: buster
# compiler: g++
# cpp: 17
# asan: off
# ubsan: off
# - os: focal
# compiler: clang++
# cpp: 17
# asan: off
# ubsan: on
# - os: focal
# compiler: g++-10
# cpp: 20
# asan: on
# ubsan: off
- os: jammy
compiler: g++
cpp: 20
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/Dockerfile.buster
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ RUN apt-get update && \
pip3 install -r /tmp/requirements.txt && \
apt-get install -y --no-install-recommends curl-kphp-vk kphp-timelib libuber-h3-dev libfmt-dev libgtest-dev libgmock-dev libre2-dev libpcre3-dev \
libzstd-dev libyaml-cpp-dev libnghttp2-dev zlib1g-dev php7.4-dev libldap-dev libkrb5-dev \
postgresql postgresql-server-dev-all libnuma-dev composer && \
postgresql postgresql-server-dev-all libnuma-dev composer perl && \
rm -rf /var/lib/apt/lists/* && \
update-alternatives --set php /usr/bin/php7.4
update-alternatives --set php /usr/bin/php7.4 && \
apt remove openssl && \
wget --no-check-certificate https://www.openssl.org/source/openssl-3.0.2.tar.gz && \
tar -xvzf openssl-3.0.2.tar.gz && \
cd openssl-3.0.2 && \
chmod +x ./config && \
./Configure && \
make && make test && make install && \
ldconfig /usr/local/lib64/

RUN useradd -ms /bin/bash kitten
2 changes: 2 additions & 0 deletions cmake/init-compilation-flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ endif()
set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
# include_directories(/usr/local/include)
# link_directories(/usr/local/lib64)

option(ADDRESS_SANITIZER "Enable address sanitizer")
if(ADDRESS_SANITIZER)
Expand Down
2 changes: 1 addition & 1 deletion common/common-tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ prepend(COMMON_TESTS_SOURCES ${COMMON_DIR}/
wrappers/string_view-test.cpp)

prepare_cross_platform_libs(COMMON_TESTS_LIBS zstd)
set(COMMON_TESTS_LIBS vk::common_src vk::net_src vk::binlog_src vk::unicode ${COMMON_TESTS_LIBS} ${EPOLL_SHIM_LIB} OpenSSL::Crypto z)
set(COMMON_TESTS_LIBS vk::common_src vk::net_src vk::binlog_src vk::unicode ${COMMON_TESTS_LIBS} ${EPOLL_SHIM_LIB} z)
vk_add_unittest(common "${COMMON_TESTS_LIBS}" ${COMMON_TESTS_SOURCES})
2 changes: 1 addition & 1 deletion compiler/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ add_executable(kphp2cpp ${KPHP_COMPILER_DIR}/kphp2cpp.cpp)
target_include_directories(kphp2cpp PUBLIC ${KPHP_COMPILER_DIR})

prepare_cross_platform_libs(COMPILER_LIBS yaml-cpp re2)
set(COMPILER_LIBS vk::kphp2cpp_src vk::tlo_parsing_src vk::popular_common ${COMPILER_LIBS} fmt::fmt OpenSSL::Crypto pthread)
set(COMPILER_LIBS vk::kphp2cpp_src vk::tlo_parsing_src vk::popular_common ${COMPILER_LIBS} fmt::fmt pthread)
if(NOT APPLE)
list(APPEND COMPILER_LIBS stdc++fs)
endif()
Expand Down
2 changes: 1 addition & 1 deletion net/net-tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ prepend(NET_TESTS_SOURCES ${BASE_DIR}/net/
time-slice-test.cpp)

prepare_cross_platform_libs(NET_TESTS_LIBS zstd)
set(NET_TESTS_LIBS vk::common_src vk::net_src vk::binlog_src vk::unicode ${NET_TESTS_LIBS} ${EPOLL_SHIM_LIB} OpenSSL::Crypto z)
set(NET_TESTS_LIBS vk::common_src vk::net_src vk::binlog_src vk::unicode ${NET_TESTS_LIBS} ${EPOLL_SHIM_LIB} z)
vk_add_unittest(net "${NET_TESTS_LIBS}" ${NET_TESTS_SOURCES})
2 changes: 1 addition & 1 deletion runtime/runtime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ target_include_directories(kphp_runtime PUBLIC ${BASE_DIR} /opt/curl7600/include
add_dependencies(kphp_runtime kphp-timelib)

prepare_cross_platform_libs(RUNTIME_LIBS yaml-cpp re2 zstd h3) # todo: linking between static libs is no-op, is this redundant? do we need to add mysqlclient here?
set(RUNTIME_LIBS vk::kphp_runtime vk::kphp_server vk::popular_common vk::unicode vk::common_src vk::binlog_src vk::net_src ${RUNTIME_LIBS} OpenSSL::Crypto m z pthread)
set(RUNTIME_LIBS vk::kphp_runtime vk::kphp_server vk::popular_common vk::unicode vk::common_src vk::binlog_src vk::net_src ${RUNTIME_LIBS} m z pthread)
vk_add_library(kphp-full-runtime STATIC)
target_link_libraries(kphp-full-runtime PUBLIC ${RUNTIME_LIBS})
set_target_properties(kphp-full-runtime PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OBJS_DIR})
Expand Down

0 comments on commit fc66f81

Please sign in to comment.