From fc874f063e22b3b2c2ddf6f12ec1fcc18e544c7c Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 23 Jan 2020 20:54:33 +0000 Subject: [PATCH] Travis: Split CMake and Make --- .travis.yml | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index e29ab984..9e74a97b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,8 +48,10 @@ addons: update: true env: - - MAKE_BUILD_TYPE=RELEASE=0 CMAKE_BUILD_TYPE=Debug - - MAKE_BUILD_TYPE=RELEASE=1 CMAKE_BUILD_TYPE=RelWithDebInfo + - BUILD_SYSTEM=make BUILD_TYPE=RELEASE=0 + - BUILD_SYSTEM=cmake BUILD_TYPE=Debug + - BUILD_SYSTEM=make BUILD_TYPE=RELEASE=1 + - BUILD_SYSTEM=cmake BUILD_TYPE=RelWithDebInfo before_install: # Set URL for Discord send script @@ -63,8 +65,8 @@ before_install: - echo $TRAVIS_OS_NAME # Display build type - - echo $MAKE_BUILD_TYPE - - echo $CMAKE_BUILD_TYPE + - echo $BUILD_SYSTEM + - echo $BUILD_TYPE # The following Homebrew packages aren't linked by default, and need to be prepended to the path explicitly. - if [ "$TRAVIS_OS_NAME" = "osx" ]; then @@ -107,19 +109,25 @@ install: fi before_script: - # Make build directory and generate CMake build files - - mkdir -p ${CMAKE_BUILD_DIR} && cd ${CMAKE_BUILD_DIR} - - cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DFIX_BUGS=ON -DWARNINGS=ON -DWARNINGS_ALL=ON - - cd .. + - | + if [ "BUILD_SYSTEM" == "cmake" ]; then + # Make build directory and generate CMake build files + mkdir -p ${CMAKE_BUILD_DIR} && cd ${CMAKE_BUILD_DIR} + cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFIX_BUGS=ON -DWARNINGS=ON -DWARNINGS_ALL=ON + cd .. + fi script: - # CMake build - - cd ${CMAKE_BUILD_DIR} - - cmake --build . --config $CMAKE_BUILD_TYPE --parallel $JOBS - - cd .. - - # Make build - - make -j $JOBS FIX_BUGS=1 $MAKE_BUILD_TYPE WARNINGS=1 WARNINGS_ALL=1 + - | + if [ "BUILD_SYSTEM" == "cmake" ]; then + # CMake build + cd ${CMAKE_BUILD_DIR} + cmake --build . --config $BUILD_TYPE --parallel $JOBS + cd .. + else + # Make build + make -j $JOBS FIX_BUGS=1 $BUILD_TYPE WARNINGS=1 WARNINGS_ALL=1 + fi after_success: # Send success notification to Discord through DISCORD_WEBHOOK_URL