diff --git a/.travis.yml b/.travis.yml index 0c064e24..db56bf02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,16 @@ +notifications: + email: false language: cpp -sudo: required -dist: trusty +matrix: + include: + - os: linux + dist: trusty + sudo: required +# - os: osx +# osx_image: xcode7.3 before_install: - - sudo apt-get -qq update - - sudo apt-get install -qq -y qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev -script: mkdir build && cd build && cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release .. && make -j 2 + - chmod +x ./.travis/travis_install.sh + - ./.travis/travis_install.sh +script: + - chmod +x ./.travis/travis_build.sh + - ./.travis/travis_build.sh diff --git a/.travis/travis_build.sh b/.travis/travis_build.sh new file mode 100644 index 00000000..ae28b7cd --- /dev/null +++ b/.travis/travis_build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# compile hyperion on osx +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON .. && make -j$(nproc) package +fi + +# compile hyperion on linux +if [[ $TRAVIS_OS_NAME == 'linux' ]]; then + mkdir build && cd build && cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release -DENABLE_AMLOGIC=ON -DENABLE_TESTS=ON -DENABLE_SPIDEV=ON .. && make -j$(nproc) package +fi diff --git a/.travis/travis_install.sh b/.travis/travis_install.sh new file mode 100644 index 00000000..93e3ec59 --- /dev/null +++ b/.travis/travis_install.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# install osx deps for hyperion compile +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + echo "Install OSX deps" + brew update + brew install qt5 + brew install libusb +fi + +# install linux deps for hyperion compile +if [[ $TRAVIS_OS_NAME == 'linux' ]]; then + echo "Install linux deps" + sudo apt-get -qq update ; sudo apt-get install -qq -y qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev +fi +