瀏覽代碼

Build debug if code coverage build

paulsapps 11 年之前
父節點
當前提交
70ecde3eac
共有 1 個文件被更改,包括 15 次插入3 次删除
  1. 15 3
      .travis.yml

+ 15 - 3
.travis.yml

@@ -53,10 +53,22 @@ script:
 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OGRE_SDK=/Users/travis/build/q-gears/q-gears/OgreSDK; fi
 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OIS_HOME=/Users/travis/build/q-gears/q-gears/Dependencies; fi
 
-- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake -G"Unix Makefiles" ..; fi
-- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -Wno-dev -G"Unix Makefiles" .. -DBOOST_ROOT=${PWD}/../boost/1.55.0_1; fi
+# Debug code coverage Linux build
+- if [[ "$TRAVIS_OS_NAME" == "linux" && "${COVERAGE}" == 1 ]]; then cmake -G"Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Debug; fi
+
+# Release Linux build
+- if [[ "$TRAVIS_OS_NAME" == "linux" && "${COVERAGE}" != 1 ]]; then cmake -G"Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release; fi
+
+# Release OSX build
+- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -Wno-dev -G"Unix Makefiles" .. -DBOOST_ROOT=${PWD}/../boost/1.55.0_1 -DCMAKE_BUILD_TYPE=Release; fi
+
+# Do the compile
 - if [[ "${COVERITY_SCAN_BRANCH}" != 1 ]]; then make -j3; fi
+
+# Fix dylib paths on OSX to be relative to the main binary
 - if [[ "${COVERITY_SCAN_BRANCH}" != 1 && "$TRAVIS_OS_NAME" == "osx" ]]; then ../CIBuild/osx/fix_lib_paths.sh ./bin_release; fi
+
+# Generate installers
 - if [[ "${COVERITY_SCAN_BRANCH}" != 1 && "${COVERAGE}" != 1 ]]; then cpack -C Release; fi
 
 language: cpp
@@ -119,7 +131,7 @@ addons:
       name: "q-gears/q-gears"
       description: "Build submitted via Travis CI"
     notification_email: coverityscan@paulsapps.com
-    build_command_prepend: "mkdir qgears_build; cd qgears_build; cmake .."
+    build_command_prepend: "mkdir qgears_build; cd qgears_build; cmake .. -DCMAKE_BUILD_TYPE=Release"
     build_command: "make -j4"
     branch_pattern: coverity_scan
 env: