Merge branch 'travis'
Set up Travis CI builds using clang, C++11 and OS X.
This commit is contained in:
39
.travis.yml
39
.travis.yml
@@ -5,7 +5,22 @@
|
||||
language: cpp
|
||||
sudo: required
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: gcc
|
||||
- compiler: gcc
|
||||
env: wxCONFIGURE_FLAGS="--disable-precomp-headers --enable-monolithic"
|
||||
- dist: trusty
|
||||
compiler: gcc
|
||||
- dist: trusty
|
||||
compiler: gcc
|
||||
env: wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11"
|
||||
- dist: trusty
|
||||
compiler: clang
|
||||
env: wxCONFIGURE_FLAGS="--disable-shared"
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11"
|
||||
|
||||
branches:
|
||||
only:
|
||||
@@ -19,23 +34,27 @@ notifications:
|
||||
on_success: change
|
||||
on_failure: change
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install -y libcppunit-dev
|
||||
|
||||
env:
|
||||
- wxCONFIGURE_FLAGS=
|
||||
- wxCONFIGURE_FLAGS="--disable-shared"
|
||||
- wxCONFIGURE_FLAGS="--disable-precomp-headers --enable-monolithic"
|
||||
- wxCONFIGURE_FLAGS="--enable-stl" CXXFLAGS=-std=c++0x
|
||||
before_install: ./build/tools/before_install.sh
|
||||
|
||||
script:
|
||||
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
|
||||
- ./configure --disable-optimise $wxCONFIGURE_FLAGS
|
||||
- echo -en 'travis_fold:end:script.1\\r'
|
||||
- echo 'Building...' && echo -en 'travis_fold:start:script.2\\r'
|
||||
- make
|
||||
- echo -en 'travis_fold:end:script.2\\r'
|
||||
- echo 'Testing...' && echo -en 'travis_fold:start:script.3\\r'
|
||||
- make -C tests
|
||||
- pushd tests
|
||||
- ./test -t
|
||||
- popd
|
||||
- echo -en 'travis_fold:end:script.3\\r'
|
||||
- echo 'Building the samples...' && echo -en 'travis_fold:start:script.4\\r'
|
||||
- make samples
|
||||
- echo -en 'travis_fold:end:script.4\\r'
|
||||
- echo 'Installing...' && echo -en 'travis_fold:start:script.5\\r'
|
||||
- sudo make install
|
||||
- make -C samples/minimal -f makefile.unx
|
||||
- echo -en 'travis_fold:end:script.5\\r'
|
||||
- echo 'Testing building with the installed version...' && echo -en 'travis_fold:start:script.6\\r'
|
||||
- make -C samples/minimal -f makefile.unx -B $wxMAKEFILE_FLAGS
|
||||
- echo -en 'travis_fold:end:script.6\\r'
|
||||
|
21
build/tools/before_install.sh
Executable file
21
build/tools/before_install.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script is used by Travis CI to install the dependencies before building
|
||||
# wxWidgets but can also be run by hand if necessary but currently it only
|
||||
# works for Ubuntu 12.04 and 14.04 and OS X used by Travis builds.
|
||||
|
||||
SUDO=sudo
|
||||
|
||||
case $(uname -s) in
|
||||
Linux)
|
||||
if [ -f /etc/apt/sources.list ]; then
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y libcppunit-dev libgtk2.0-dev libnotify-dev
|
||||
fi
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
brew update
|
||||
brew install cppunit --universal
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user