Travis: Split CMake and Make

This commit is contained in:
Clownacy 2020-01-23 20:54:33 +00:00
parent 6008550295
commit fc874f063e

View file

@ -48,8 +48,10 @@ addons:
update: true update: true
env: env:
- MAKE_BUILD_TYPE=RELEASE=0 CMAKE_BUILD_TYPE=Debug - BUILD_SYSTEM=make BUILD_TYPE=RELEASE=0
- MAKE_BUILD_TYPE=RELEASE=1 CMAKE_BUILD_TYPE=RelWithDebInfo - BUILD_SYSTEM=cmake BUILD_TYPE=Debug
- BUILD_SYSTEM=make BUILD_TYPE=RELEASE=1
- BUILD_SYSTEM=cmake BUILD_TYPE=RelWithDebInfo
before_install: before_install:
# Set URL for Discord send script # Set URL for Discord send script
@ -63,8 +65,8 @@ before_install:
- echo $TRAVIS_OS_NAME - echo $TRAVIS_OS_NAME
# Display build type # Display build type
- echo $MAKE_BUILD_TYPE - echo $BUILD_SYSTEM
- echo $CMAKE_BUILD_TYPE - echo $BUILD_TYPE
# The following Homebrew packages aren't linked by default, and need to be prepended to the path explicitly. # The following Homebrew packages aren't linked by default, and need to be prepended to the path explicitly.
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
@ -107,19 +109,25 @@ install:
fi fi
before_script: before_script:
- |
if [ "BUILD_SYSTEM" == "cmake" ]; then
# Make build directory and generate CMake build files # Make build directory and generate CMake build files
- mkdir -p ${CMAKE_BUILD_DIR} && cd ${CMAKE_BUILD_DIR} mkdir -p ${CMAKE_BUILD_DIR} && cd ${CMAKE_BUILD_DIR}
- cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DFIX_BUGS=ON -DWARNINGS=ON -DWARNINGS_ALL=ON cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFIX_BUGS=ON -DWARNINGS=ON -DWARNINGS_ALL=ON
- cd .. cd ..
fi
script: script:
- |
if [ "BUILD_SYSTEM" == "cmake" ]; then
# CMake build # CMake build
- cd ${CMAKE_BUILD_DIR} cd ${CMAKE_BUILD_DIR}
- cmake --build . --config $CMAKE_BUILD_TYPE --parallel $JOBS cmake --build . --config $BUILD_TYPE --parallel $JOBS
- cd .. cd ..
else
# Make build # Make build
- make -j $JOBS FIX_BUGS=1 $MAKE_BUILD_TYPE WARNINGS=1 WARNINGS_ALL=1 make -j $JOBS FIX_BUGS=1 $BUILD_TYPE WARNINGS=1 WARNINGS_ALL=1
fi
after_success: after_success:
# Send success notification to Discord through DISCORD_WEBHOOK_URL # Send success notification to Discord through DISCORD_WEBHOOK_URL