Added a travis file

This commit is contained in:
Linus Probert 2017-12-05 08:39:04 +01:00
parent 50f516ad71
commit 18913ea925
1 changed files with 38 additions and 0 deletions

38
.travis.yml Normal file
View File

@ -0,0 +1,38 @@
sudo: required
dist: trusty
language: c
compiler:
- gcc
- clang
before_install:
- sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
- sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
- sudo add-apt-repository -y ppa:h-rayflood/llvm
#g++4.9
- if [ "$CXX" = "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
#clang 4.0
- if [ "$CXX" == "clang++" ]; then wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; fi
- if [ "$CXX" == "clang++" ]; then sudo add-apt-repository -y "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main"; fi
- sudo apt-get update -qq
install:
- sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
- sudo apt-get install -y cmake cmake-data check
#g++6
- if [ "$CXX" = "g++" ]; then sudo apt-get install -y g++-6; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
#clang 4.0
- if [ "$CXX" == "clang++" ]; then sudo apt-get install -y clang-4.0; fi
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-4.0"; fi
script:
- mkdir build
- cd build
- make
- make test