forked from edbee/edbee-lib
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from keneanung/AddTravis
Add travis
- Loading branch information
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
language: cpp | ||
os: | ||
- osx | ||
- linux | ||
dist: trusty | ||
sudo: false | ||
addons: | ||
apt: | ||
sources: | ||
- sourceline: 'ppa:beineri/opt-qt562-trusty' | ||
packages: | ||
- qt56base | ||
- qt56multimedia | ||
- qt56tools | ||
- xvfb | ||
compiler: | ||
- gcc | ||
- clang | ||
matrix: | ||
exclude: | ||
- os: osx | ||
compiler: gcc | ||
before_install: ./CI/travis.before_install.sh | ||
install: ./CI/travis.install.sh | ||
before_script: | ||
- "export DISPLAY=:99.0" | ||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sh -e /etc/init.d/xvfb start; fi | ||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok ) & fi | ||
- sleep 3 # give xvfb some time to start | ||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then PATH="/usr/local/opt/qt5/bin:$PATH"; fi | ||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then source /opt/qt56/bin/qt56-env.sh; fi | ||
- mkdir build | ||
script: | ||
- cd build | ||
- if [ "${CC}" = "clang" ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then SPEC="-spec linux-clang"; fi | ||
- qmake ${SPEC} ../edbee-lib.pro && make -j2 | ||
- cd edbee-test | ||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then cd edbee-test.app/Contents/MacOS/; fi | ||
- ./edbee-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then | ||
echo Before install on OSX. | ||
./CI/travis.osx.before_install.sh; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then | ||
echo Install on OSX. | ||
./CI/travis.osx.install.sh; | ||
fi | ||
if [ ! -z "${CXX}" ]; then | ||
echo "Testing (possibly updated) compiler version:" | ||
${CXX} --version; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
set -ev | ||
brew update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -ev | ||
BREWS="qt5" | ||
for i in $BREWS; do | ||
brew outdated | grep -q $i && brew upgrade $i | ||
done | ||
for i in $BREWS; do | ||
brew list | grep -q $i || brew install $i | ||
done |