Skip to content

Commit

Permalink
Merge pull request #106 from jgaa/staging
Browse files Browse the repository at this point in the history
Merging recent changes to master. 
All tests are passing under Debian and Ubuntu.

Issue #101 is reproducible under Windows. 

Working on issue #101, #102, #104, #105
  • Loading branch information
jgaa authored Oct 30, 2020
2 parents 48bc608 + fae9062 commit 0cd4ad1
Show file tree
Hide file tree
Showing 11 changed files with 508 additions and 351 deletions.
46 changes: 16 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,27 @@ if (NOT DEFINED RESTC_ROOT_DIR)
set(RESTC_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif()

if (NOT DEFINED WITH_APIDOC)
option(WITH_APIDOC "Generate Doxygen documentation")
endif()
option(WITH_APIDOC "Generate Doxygen documentation")

if (NOT DEFINED RESTC_CPP_WITH_EXAMPLES)
option(RESTC_CPP_WITH_EXAMPLES "Compile examples" ON)
endif()
option(RESTC_CPP_WITH_EXAMPLES "Compile examples" ON)

if (NOT DEFINED RESTC_CPP_WITH_UNIT_TESTS)
option(RESTC_CPP_WITH_UNIT_TESTS "Enable Unit Testing" ON)
endif()
option(RESTC_CPP_WITH_UNIT_TESTS "Enable Unit Testing" ON)

if (NOT DEFINED RESTC_CPP_AUTORUN_UNIT_TESTS)
option(RESTC_CPP_AUTORUN_UNIT_TESTS "Run Unit Tests automatically after build" OFF)
endif()
option(RESTC_CPP_AUTORUN_UNIT_TESTS "Run Unit Tests automatically after build" OFF)

if (NOT DEFINED RESTC_CPP_WITH_FUNCTIONALT_TESTS)
option(RESTC_CPP_WITH_FUNCTIONALT_TESTS "Enable Functional Testing" ON)
endif()
option(RESTC_CPP_WITH_FUNCTIONALT_TESTS "Enable Functional Testing" ON)

if (NOT DEFINED RESTC_CPP_WITH_TLS)
option(RESTC_CPP_WITH_TLS "Enable TLS (Trough OpenSSL)" ON)
endif()
option(RESTC_CPP_WITH_TLS "Enable TLS (Trough OpenSSL)" ON)

if (NOT DEFINED RESTC_CPP_LOG_WITH_BOOST_LOG)
option(RESTC_CPP_LOG_WITH_BOOST_LOG "Use boost::log for logging" ON)
endif()
option(RESTC_CPP_LOG_WITH_BOOST_LOG "Use boost::log for logging" ON)

if (NOT DEFINED RESTC_CPP_LOG_JSON_SERIALIZATION)
option(RESTC_CPP_LOG_JSON_SERIALIZATION "Enable trace logging for json serialization debugging")
endif()
option(RESTC_CPP_LOG_JSON_SERIALIZATION "Enable trace logging for json serialization debugging")

if (NOT DEFINED RESTC_CPP_WITH_ZLIB)
option(RESTC_CPP_WITH_ZLIB "Use zlib" ON)
endif()
option(RESTC_CPP_WITH_ZLIB "Use zlib" ON)

if (NOT DEFINED RESTC_CPP_USE_CPP17)
option(RESTC_CPP_USE_CPP17 "Use the C++17 standard" OFF)
endif()
option(RESTC_CPP_USE_CPP17 "Use the C++17 standard" OFF)

option(RESTC_CPP_THREADED_CTX "Allow asio contextx with multiple therads. Enables thread-safe internal access." OFF)

if (NOT DEFINED RESTC_CPP_MAX_INPUT_BUFFER_LENGTH)
set (RESTC_CPP_MAX_INPUT_BUFFER_LENGTH 0x7fffffff)
Expand Down Expand Up @@ -147,6 +129,9 @@ if (NOT EMBEDDED_RESTC_CPP)
if (RESTC_CPP_WITH_TLS)
find_package(OpenSSL REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC ${OPENSSL_LIBRARIES})
if (WIN32)
target_link_libraries(${PROJECT_NAME} PUBLIC bcrypt)
endif()
endif()

if (UNIX)
Expand All @@ -156,6 +141,7 @@ if (NOT EMBEDDED_RESTC_CPP)

if (RESTC_CPP_LOG_WITH_BOOST_LOG)
set(BOOST_LOG_DEP log)
message(STATUS "Using boost log")
endif()

#set(Boost_USE_MULTITHREADED ON)
Expand Down
24 changes: 24 additions & 0 deletions ci/jenkins/Dockefile.debian-buster
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM debian:buster

MAINTAINER Jarle Aase <[email protected]>

# In case you need proxy
RUN DEBIAN_FRONTEND="noninteractive" apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -y -q --no-install-recommends upgrade &&\
DEBIAN_FRONTEND="noninteractive" apt-get install -y -q \
openssh-server g++ git \
build-essential \
zlib1g-dev g++ cmake make libboost-all-dev libssl-dev \
default-jdk &&\
apt-get -y -q autoremove &&\
apt-get -y -q clean

# Set user jenkins to the image
RUN useradd -m -d /home/jenkins -s /bin/sh jenkins &&\
echo "jenkins:jenkins" | chpasswd

# Standard SSH port
EXPOSE 22

# Default command
CMD ["/usr/sbin/sshd", "-D"]
12 changes: 6 additions & 6 deletions ci/jenkins/Dockefile.debian-testing
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ FROM debian:testing
MAINTAINER Jarle Aase <[email protected]>

# In case you need proxy
RUN apt-get -q update &&\
apt-get -y -q --no-install-recommends upgrade &&\
apt-get -y -q install openssh-server g++ git \
automake autoconf ruby ruby-dev rubygems build-essential \
RUN DEBIAN_FRONTEND="noninteractive" apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -y -q --no-install-recommends upgrade &&\
DEBIAN_FRONTEND="noninteractive" apt-get install -y -q\
openssh-server g++ git \
build-essential \
zlib1g-dev g++ cmake make libboost-all-dev libssl-dev \
openjdk-8-jdk &&\
gem install --no-ri --no-rdoc fpm &&\
default-jdk &&\
apt-get -y -q autoremove &&\
apt-get -y -q clean

Expand Down
11 changes: 5 additions & 6 deletions ci/jenkins/Dockerfile.debian-stretch
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ FROM debian:stretch

MAINTAINER Jarle Aase <[email protected]>

# In case you need proxy
RUN apt-get -q update &&\
apt-get -y -q --no-install-recommends upgrade &&\
apt-get -y -q install openssh-server g++ git \
automake autoconf ruby ruby-dev rubygems build-essential \
RUN DEBIAN_FRONTEND="noninteractive" apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -y -q --no-install-recommends upgrade &&\
DEBIAN_FRONTEND="noninteractive" apt-get install -y -q \
openssh-server g++ git \
build-essential \
zlib1g-dev g++ cmake make libboost-all-dev libssl-dev \
openjdk-8-jdk &&\
gem install --no-ri --no-rdoc fpm &&\
apt-get -y -q autoremove &&\
apt-get -y -q clean

Expand Down
Loading

0 comments on commit 0cd4ad1

Please sign in to comment.