Split travis file into helper scripts. Added OSX build.

* Setup and helper script per build target, currently: docs, linux & osx.
This commit is contained in:
Jake Turner
2017-01-03 05:58:56 +00:00
committed by Baldur Karlsson
parent 0d52eeed35
commit d7f8a0236f
7 changed files with 47 additions and 25 deletions
+26 -25
View File
@@ -1,13 +1,5 @@
language: cpp
sudo: required
dist: trusty
compiler:
- gcc
- clang
branches:
only:
- master
@@ -15,31 +7,40 @@ branches:
env:
global:
- RENDERDOC_TRAVIS_BUILD=1 RENDERDOC_CI_BUILD=1
matrix:
- CODE_BUILD=1 LINUX_BUILD=1 DOCS_BUILD=0
# only build docs once on linux
matrix:
fast_finish: true
include:
- compiler: gcc
env: CODE_BUILD=0 LINUX_BUILD=0 DOCS_BUILD=1
# only build docs on linux
- os: linux
dist: trusty
sudo: required
compiler: gcc
env: CODE_BUILD=0 LINUX_BUILD=0 APPLE_BUILD=0 DOCS_BUILD=1
- os: linux
dist: trusty
sudo: required
env: CODE_BUILD=1 LINUX_BUILD=1 APPLE_BUILD=0 DOCS_BUILD=0
compiler: gcc
- os: linux
dist: trusty
sudo: required
env: CODE_BUILD=1 LINUX_BUILD=1 APPLE_BUILD=0 DOCS_BUILD=0
compiler: clang
- os: osx
osx_image: xcode8.2
env: CODE_BUILD=1 LINUX_BUILD=0 APPLE_BUILD=1 DOCS_BUILD=0
compiler: clang
# install dependencies
install:
- sudo add-apt-repository -y 'ppa:ubuntu-toolchain-r/test'
- sudo add-apt-repository -y 'ppa:beineri/opt-qt562-trusty'
- sudo add-apt-repository -y 'deb http://apt.llvm.org/precise/ llvm-toolchain-precise-3.8 main'
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-get update -qq
- if [[ "$CODE_BUILD" == "1" ]]; then sudo apt-get install --allow-unauthenticated -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qt56base qt56x11extras libxcb-keysyms1-dev gdb clang-format-3.8 ; fi
- if [[ "$DOCS_BUILD" == "1" ]]; then sudo pip install --upgrade pip setuptools ; sudo pip install Sphinx sphinx-rtd-theme ; fi
- if [[ "$CODE_BUILD" == "1" ]]; then clang-format-3.8 -i -style=file $(find pdblocate/ qrenderdoc/ renderdoc/ renderdoccmd/ renderdocshim/ -type f -regex '.*\(/3rdparty/\|/official/\|resource.h\).*' -prune -o -regex '.*\.\(c\|cpp\|h\)$' -print) ; fi
- if [[ "$DOCS_BUILD" == "1" ]]; then . ./scripts/travis/docs_setup.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CODE_BUILD" == "1" ]]; then . ./scripts/travis/linux_setup.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$CODE_BUILD" == "1" ]]; then . ./scripts/travis/osx_setup.sh ; fi
- git clean -f
- git diff --exit-code
script:
- sh ./scripts/hash_version.sh
- if [[ "$CODE_BUILD" == "1" ]]; then . /opt/qt56/bin/qt56-env.sh ; fi
- if [[ "$CODE_BUILD" == "1" ]]; then mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make ; fi
# - if [[ "$DOCS_BUILD" == "1" ]]; then cd docs/ && make html ; fi
- if [[ "$DOCS_BUILD" == "1" ]]; then . ./scripts/travis/docs_compile.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CODE_BUILD" == "1" ]]; then . ./scripts/travis/linux_compile.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$CODE_BUILD" == "1" ]]; then . ./scripts/travis/osx_compile.sh ; fi
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
#cd docs/ && make html
+3
View File
@@ -0,0 +1,3 @@
#!//bin/sh
sudo pip install --upgrade pip setuptools
sudo pip install Sphinx sphinx-rtd-theme
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
. /opt/qt56/bin/qt56-env.sh
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
sudo add-apt-repository -y 'ppa:ubuntu-toolchain-r/test'
sudo add-apt-repository -y 'ppa:beineri/opt-qt562-trusty'
sudo add-apt-repository -y 'deb http://apt.llvm.org/precise/ llvm-toolchain-precise-3.8 main'
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install --allow-unauthenticated -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qt56base qt56x11extras libxcb-keysyms1-dev gdb clang-format-3.8
clang-format-3.8 -i -style=file $(find pdblocate/ qrenderdoc/ renderdoc/ renderdoccmd/ renderdocshim/ -type f -regex '.*\(/3rdparty/\|/official/\|resource.h\).*' -prune -o -regex '.*\.\(c\|cpp\|h\)$' -print)
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
brew install qt5
brew link qt5 --force