瀏覽代碼

adding travis-ci script

Roberto Parolin 6 年之前
父節點
當前提交
6359cb10ca
共有 1 個文件被更改,包括 66 次插入0 次删除
  1. 66 0
      .travis.yml

+ 66 - 0
.travis.yml

@@ -0,0 +1,66 @@
+language: cpp
+
+os:
+  - linux
+  - osx
+  - windows
+
+compiler:
+  - gcc
+  - clang
+  - msvc
+
+env:
+  - EA_CONFIG=Debug
+  - EA_CONFIG=Release
+  
+addons:
+  apt:
+    sources:
+      - ubuntu-toolchain-r-test
+      - george-edison55-precise-backports
+      - llvm-toolchain-trusty-5.0
+    packages:
+      - cmake
+      - cmake-data
+      - g++-7
+      - clang-5.0
+
+matrix:
+    exclude:
+      - os: osx
+        compiler: gcc
+      - os: osx
+        compiler: msvc
+      - os: linux 
+        compiler: msvc
+      - os: windows
+        compiler: clang
+      - os: windows
+        compiler: gcc
+
+# Handle git submodules yourself
+git:
+    submodules: false
+
+# Use sed to replace the SSH URL with the public URL, then initialize submodules
+before_install:
+    - sed --version >/dev/null 2>&1 && sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules || sed -i "" 's/[email protected]:/https:\/\/github.com\//'  .gitmodules
+    - git submodule update --init 
+
+install:
+  - if [[ "$CXX" == "g++" ]]; then export CC="gcc-7"  ;fi
+  - if [[ "$CXX" == "g++" ]]; then export CXX="g++-7" ;fi
+
+# Universal Setup
+before_script:
+  - mkdir build_$EA_CONFIG
+  - cd build_$EA_CONFIG
+  - cmake .. -DEASTDC_BUILD_TESTS:BOOL=ON
+  - cmake --build . --config $EA_CONFIG
+
+script:
+  # Run Tests
+  - cd $TRAVIS_BUILD_DIR/build_$EA_CONFIG/test
+  - ctest -C $EA_CONFIG -V || exit 1
+