.travis.yml: use env.matrix for Debug/Release builds
authorMax Teufel <max@teufelsnetz.com>
Sun, 8 Mar 2015 08:07:10 +0000 (09:07 +0100)
committerMax Teufel <max@teufelsnetz.com>
Sun, 8 Mar 2015 08:07:58 +0000 (09:07 +0100)
.travis.yml

index 708885d..ec324ab 100644 (file)
@@ -25,6 +25,9 @@ env:
     # via the "travis encrypt" command using the project repo's public key
     - secure: "E3/UuL338/FVeKbWVBH8RWznD3ntT8BZxX9TDTCwoZFTPluI53Bk0G3MdDBFihFYLeTMfNxxrT2n+EnQtf9a6SrUIo1xFYWV3yKNHwFiS0LKn0IvhofPoRsg+Y190Hgq8djFSEU1Gk4pYATSfRYnAAbVxuL51CumGVBgBkplB0A="
     - CMAKE_VERSION=3.1.3 SDL2_VERSION=2.0.3 SDL2IMAGE_VERSION=2.0.0
+  matrix:
+    - BUILD_TYPE="Debug"
+    - BUILD_TYPE="Release"
  
 before_install:
   - sudo apt-get update -qq
@@ -49,16 +52,10 @@ before_install:
 script:
   # Clean from previous Travis build
   - git clean -f
-  # First a debug build:
-  - mkdir build-debug
-  - cd build-debug
-  - cmake .. -DCMAKE_BUILD_TYPE=Debug
-  - make VERBOSE=1 -j $(nproc)
-  # Then a release build:
-  - cd ..
-  - mkdir build-release
-  - cd build-release
-  - cmake .. -DCMAKE_BUILD_TYPE=Release
+  # Then build:
+  - mkdir "build-$BUILD_TYPE"
+  - cd "build-$BUILD_TYPE"
+  - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
   - make VERBOSE=1 -j $(nproc)
 
 addons: