From fce4aed563772ebec426a39993931bd8335d4097 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 20 Oct 2020 12:00:59 +0300 Subject: [PATCH 1/6] changed travis config used default gcc (9.3) and clang (7.0) added ARM64 architecture removed matrix environment (replaced with `compiler:` and `before-install:`) removed sources (they were not being allowed anyway) changed script to use 4 threads instead of 2 replaced test statement with if statement (mainly for consistency) --- .travis.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c7372c52..d100d5494 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,13 @@ dist: focal compiler: - gcc + - clang + +arch: + - amd64 + - arm64 env: - matrix: - - COMPILER=g++ CCOMPILER=gcc PUSH_COVERAGE=ON TRAVIS_BUILD_DOCS=ON - - COMPILER=g++-8 CCOMPILER=gcc-8 - - COMPILER=g++-10 CCOMPILER=gcc-10 - - COMPILER=clang++ CCOMPILER=clang global: - secure: "CQRYHWlg/WDu5DBUeDwGo+rPeOofN08DhiLUNlLtZjMWaRyP0Cop1qVaFs8ESOkYiWek2MdpvjZud+7hL+yx2ogvNx4SfHpUMCDKYgcX+YQ9MmYwabvoKq8N6KVXE3lbPp549TonHdDuNCWNKRniNjYtrij5J+IiIiT8/6Txo2p9RWk6YSUTdXJ9YrfuWMtRuF5uo9SHGyujv8pOJKedrwWoSBbHT44jnwfHMVe/C8jgjwlrJ9N3iXOtsG6sj+UTS8vOpL+jpBONEbBfHgSFU57I7IFNdPQbSObpVwG9geOAHT7IQQyQ9hp2AJoFxxVURB5SzqztDDpQ0XIF76vuH9tA/fF2pwDsLRmcLR8JU1TCmQgvnlYD0+Or9S1Dq0tQME5AP+21Hk2zVcGdbgQP7XWix758F0vpOXa4PXw8TmAjP2jKyAMHlzR3icr3+OmKSK3uXMMt2HSMOJQ+JvFxr//DM493i/VGyeY25/zu3A9RstiE+1d82Fi9xKOmMf4smvSkjOgT0b727jqNbNe6CvEKQUmqHabzYRQzUVz6WPVDHBxZP7AiKmZIVQXYnDsVXywStkSoxxY5En6XKpq0GR3bIVtUMORgZPoZi7Jni+/4EckcYH8g9mpsQf9tPRcOZ2WIvt5gqp2MZuwBLBRcbxihuECfBscqdeA0oDU5AZw=" - GH_REPO_NAME: crow @@ -20,17 +20,10 @@ env: - GH_REPO_REF: github.com/mrozigor/crow.git - THEME_REPO_REF: github.com/mrozigor/darxygen.git + addons: apt: - sources: - - ubuntu-toolchain-r-test - - boost-latest - - llvm-toolchain-precise packages: - - g++ - - g++-8 - - g++-10 - - clang - libboost-all-dev - doxygen - doxygen-doc @@ -38,20 +31,23 @@ addons: - doxygen-gui - graphviz +before_install: + - if [ "$TRAVIS_COMPILER" == "gcc" -a "$TRAVIS_CPU_ARCH" == "amd64" ]; then export PUSH_COVERAGE=ON; fi + - if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then export TRAVIS_BUILD_DOCS=ON; fi + install: - if [ "$PUSH_COVERAGE" == "ON" ]; then pip install --user cpp-coveralls; fi before_script: - - export CXX=$COMPILER CC=$CCOMPILER - mkdir build - cd build - cmake --version - cmake .. -script: make -j2 && ctest -V -j2 +script: make -j4 && ctest -V -j4 after_success: - cd .. - if [ "$PUSH_COVERAGE" == "ON" ]; then coveralls -i include --exclude-pattern .*/http_parser_merged.h --exclude-pattern .*/TinySHA1.hpp --gcov-options '\-lp'; fi - chmod +x generateDocumentationAndDeploy.sh - - test "$TRAVIS_BRANCH" = "master" && test $TRAVIS_PULL_REQUEST = "false" && test "$TRAVIS_BUILD_DOCS" = "ON" && ./generateDocumentationAndDeploy.sh + - if [ "$TRAVIS_BUILD_DOCS" == "ON" ]; then ./generateDocumentationAndDeploy.sh; fi From cdd613935d789511bf1e0ba8e60cd952af4a39fd Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 20 Oct 2020 12:17:00 +0300 Subject: [PATCH 2/6] removed char <=0 comparison (not sure why it invoked an error in ARM now) --- include/crow/json.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/crow/json.h b/include/crow/json.h index 05f68b935..4c217d0c1 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -35,7 +35,7 @@ namespace crow inline void escape(const std::string& str, std::string& ret) { ret.reserve(ret.size() + str.size()+str.size()/4); - for(char c:str) + for(unsigned char c:str) { switch(c) { @@ -47,7 +47,7 @@ namespace crow case '\r': ret += "\\r"; break; case '\t': ret += "\\t"; break; default: - if (0 <= c && c < 0x20) + if (c < 0x20) { ret += "\\u00"; auto to_hex = [](char c) From 924c2640205764d1833756db1f4215fd4095f8ff Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 20 Oct 2020 16:21:14 +0300 Subject: [PATCH 3/6] added new testing information to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 45972bffa..d4a0a51eb 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,8 @@ If you just want to use crow, generate `crow_all.h` (use script `amalgamate/merg ### Requirements - - C++ compiler with good C++14 support (tested with g++>=8). + - C++ compiler with good C++14 support. + - Tested on g++-9.3 and clang-7.0, AMD64 (x86_64) and Arm64 v8 - boost 1.7 library. - (optional) CMake to build tests and/or examples. - (optional) Linking with tcmalloc/jemalloc is recommended for speed. From e5013b16d6ee46bc68df9f8213db22c4e5daa12d Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 20 Oct 2020 16:23:09 +0300 Subject: [PATCH 4/6] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4a0a51eb..f7ee371c0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Crow logo](http://i.imgur.com/wqivvjK.jpg) -Crow is C++ microframework for web. (inspired by Python Flask) +Crow is a C++ microframework for web. (inspired by Python Flask) [![Travis Build](https://travis-ci.org/mrozigor/crow.svg?branch=master)](https://travis-ci.org/mrozigor/crow) [![Coverage Status](https://coveralls.io/repos/github/mrozigor/crow/badge.svg?branch=master)](https://coveralls.io/github/mrozigor/crow?branch=master) From 518537e078c1ca07aaf7636fb55780491b843528 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Wed, 21 Oct 2020 19:45:12 +0300 Subject: [PATCH 5/6] added condition to prevent for doc builds --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d100d5494..cb323843e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ addons: before_install: - if [ "$TRAVIS_COMPILER" == "gcc" -a "$TRAVIS_CPU_ARCH" == "amd64" ]; then export PUSH_COVERAGE=ON; fi - - if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then export TRAVIS_BUILD_DOCS=ON; fi + - if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" -a "$PUSH_COVERAGE" == "ON" ]; then export TRAVIS_BUILD_DOCS=ON; fi install: - if [ "$PUSH_COVERAGE" == "ON" ]; then pip install --user cpp-coveralls; fi From a2942468ed1e5db8f5d3f1945c43486893b9a480 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Wed, 21 Oct 2020 20:44:58 +0300 Subject: [PATCH 6/6] added master only requirement --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index cb323843e..5c45044bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ cache: ccache dist: focal +branches: + only: + - master + compiler: - gcc - clang