From 7889a0864b2bc684a3e171fa9a6f77143bd9896b Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 13 Aug 2019 11:19:52 +0300 Subject: [PATCH] Travis CI: Test CMake builds --- .travis.yml | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ebf4d3d..e1167b56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -284,6 +284,29 @@ matrix: - CONF_OPTIONS="--disable-threads --enable-cplusplus" - CFLAGS_EXTRA="-O3 -march=native" - NO_CLONE_LIBATOMIC_OPS=true + - os: linux + compiler: clang + env: + - CMAKE_CONFIG="Debug" + - CMAKE_OPTIONS="-Denable_cplusplus=ON -Denable_gc_assertions=ON" + - NO_CLONE_LIBATOMIC_OPS=true + - os: linux + compiler: gcc + env: + - CMAKE_CONFIG="Release" + - CMAKE_OPTIONS="-Denable_cplusplus=ON -Denable_large_config=ON" + - NO_CLONE_LIBATOMIC_OPS=true + - os: linux + compiler: gcc + env: + - CMAKE_CONFIG="Debug" + - CMAKE_OPTIONS="-DBUILD_SHARED_LIBS=OFF -Denable_gc_debug=ON" + - NO_CLONE_LIBATOMIC_OPS=true + - os: osx + env: + - CMAKE_CONFIG="Debug" + - CMAKE_OPTIONS="-Denable_cplusplus=ON" + - NO_CLONE_LIBATOMIC_OPS=true - os: osx env: - CSA_CHECK=true @@ -534,22 +557,32 @@ install: - if [[ "$NO_CLONE_LIBATOMIC_OPS" != true ]]; then git clone --depth=50 https://github.com/ivmai/libatomic_ops.git; fi -- "./autogen.sh" +- if [[ "$CMAKE_CONFIG" == "" ]]; then + ./autogen.sh; + fi - if [[ "$GNUTOOLS_ROOT" != "" ]]; then mv $GNUTOOLS_ROOT $GNUTOOLS_ROOT-x; fi - if [[ "$REPORT_COVERAGE" == true ]]; then gem install coveralls-lcov; fi script: -- if [[ "$CSA_CHECK" != true && "$CPPCHECK_ENABLE" == "" - && "$MAKEFILE_NAME" != "Makefile.direct" +- if [[ "$CSA_CHECK" != true && "$CMAKE_CONFIG" == "" + && "$CPPCHECK_ENABLE" == "" && "$MAKEFILE_NAME" != "Makefile.direct" && "$COVERITY_SCAN_BRANCH" != 1 ]]; then CFLAGS="$CONF_CFLAGS" ./configure $CONF_OPTIONS --enable-werror && cat include/config.h; fi -- if [[ "$CSA_CHECK" != true && "$CPPCHECK_ENABLE" == "" - && "$COVERITY_SCAN_BRANCH" != 1 ]]; then +- if [[ "$CSA_CHECK" != true && "$CMAKE_CONFIG" == "" + && "$CPPCHECK_ENABLE" == "" && "$COVERITY_SCAN_BRANCH" != 1 ]]; then make -j -f $MAKEFILE_NAME $MAKEFILE_TARGETS CFLAGS_EXTRA="$CFLAGS_EXTRA" LDFLAGS="$LDFLAGS"; fi +- if [[ "$CMAKE_CONFIG" != "" ]]; then + cmake $CMAKE_OPTIONS -Dbuild_tests=ON -Denable_werror=ON + -Werror=deprecated . && + cmake --build . --config $CMAKE_CONFIG; + fi +- if [[ "$CMAKE_CONFIG" != "" ]]; then + ctest --build-config $CMAKE_CONFIG -V; + fi - if [[ "$CC_FOR_CHECK" != "" ]]; then make -f $MAKEFILE_NAME $MAKEFILE_TARGETS_CHECK CC=$CC_FOR_CHECK CFLAGS_EXTRA="$CFLAGS_EXTRA"; -- 2.40.0