From d742d916eb99bbb88cb59803d4fc3216150f77d8 Mon Sep 17 00:00:00 2001 From: ilammy Date: Mon, 23 Dec 2019 18:47:40 +0200 Subject: [PATCH 1/2] Run ThemisPP tests with C++14 and C++17 Explicitly test compatibility with those standard levels. C++20 is currently being finalized. It's somewhat supported in the compilers, but not in the versions shipped with Ubuntu 16.04. --- .circleci/config.yml | 2 ++ CHANGELOG.md | 1 + 2 files changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 94101132d..8d349eda0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -157,6 +157,8 @@ jobs: - run: make test - run: make clean_themispp_test && CFLAGS="-std=c++03" make themispp_test && make test_cpp - run: make clean_themispp_test && CFLAGS="-std=c++11" make themispp_test && make test_cpp + - run: make clean_themispp_test && CFLAGS="-std=c++14" make themispp_test && make test_cpp + - run: make clean_themispp_test && CFLAGS="-std=c++17" make themispp_test && make test_cpp - run: make test_python - run: make test_ruby - run: make test_go diff --git a/CHANGELOG.md b/CHANGELOG.md index 78924d8b3..7ace4489d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ _Code:_ - **C++** - New function `themispp::gen_sym_key()` can be used to generate symmetric keys for Secure Cell ([#561](https://github.com/cossacklabs/themis/pull/561)). + - Updated test suite to test C++14 and C++17 (in addition to C++11 and C++03) ([#572](https://github.com/cossacklabs/themis/pull/572)). - **Go** From 77221570f8881f34f1cb7f11b6f95b8fde9af8a7 Mon Sep 17 00:00:00 2001 From: ilammy Date: Tue, 24 Dec 2019 13:31:13 +0200 Subject: [PATCH 2/2] Run ThemisPP tests with both GCC and Clang It turned out that behavior wrt attributes might be different between GCC and Clang, so let's test both compilers now. Clang that we have in the Docker image does not support "-std=c++17", so we do not test with that. (Actually, GCC support the option, but __cplusplus value suggests that it's still in C++14 mode.) --- .circleci/config.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d349eda0..fac38ac62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -155,10 +155,15 @@ jobs: - run: '[ -z "$CIRCLE_PR_NUMBER" ] && ! [ -z "$COVERALLS_TOKEN" ] && cd $HOME/go/src/$GOTHEMIS_IMPORT && $HOME/go/bin/goveralls -v -service=circle-ci -repotoken=$COVERALLS_TOKEN || true' - run: sudo /sbin/ldconfig - run: make test - - run: make clean_themispp_test && CFLAGS="-std=c++03" make themispp_test && make test_cpp - - run: make clean_themispp_test && CFLAGS="-std=c++11" make themispp_test && make test_cpp - - run: make clean_themispp_test && CFLAGS="-std=c++14" make themispp_test && make test_cpp - - run: make clean_themispp_test && CFLAGS="-std=c++17" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="g++" CFLAGS="-std=c++03" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="g++" CFLAGS="-std=c++11" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="g++" CFLAGS="-std=c++14" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="g++" CFLAGS="-std=c++17" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="clang++" CFLAGS="-std=c++03" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="clang++" CFLAGS="-std=c++11" make themispp_test && make test_cpp + - run: make clean_themispp_test && CXX="clang++" CFLAGS="-std=c++14" make themispp_test && make test_cpp + # Clang 3.8 that we have here does not support C++17 yet +# - run: make clean_themispp_test && CXX="clang++" CFLAGS="-std=c++17" make themispp_test && make test_cpp - run: make test_python - run: make test_ruby - run: make test_go