Add CMake to Travis-CI
This commit is contained in:
@@ -7,6 +7,13 @@ sudo: required
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- dist: trusty
|
||||||
|
compiler: gcc
|
||||||
|
env: wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles"
|
||||||
|
- os: osx
|
||||||
|
osx_image: beta-xcode6.2
|
||||||
|
compiler: clang
|
||||||
|
env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_CXX_STANDARD=11"
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: wxCONFIGURE_FLAGS="--disable-precomp-headers --enable-monolithic"
|
env: wxCONFIGURE_FLAGS="--disable-precomp-headers --enable-monolithic"
|
||||||
|
@@ -4,30 +4,60 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo 'travis_fold:start:configure'
|
case $wxTOOLSET in
|
||||||
echo 'Configuring...'
|
cmake)
|
||||||
./configure --disable-optimise $wxCONFIGURE_FLAGS
|
if [ `uname -s` = "Linux" ] && [ `lsb_release -cs` = "precise" ]; then
|
||||||
echo 'travis_fold:end:configure'
|
echo Updating CMake...
|
||||||
echo 'travis_fold:start:building'
|
wget -O - https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz | tar xzf -
|
||||||
echo 'Building...'
|
export PATH=`pwd`/cmake-3.6.2-Linux-x86_64/bin:$PATH
|
||||||
make
|
fi
|
||||||
echo 'travis_fold:end:building'
|
|
||||||
echo 'travis_fold:start:testing'
|
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
||||||
echo 'Testing...'
|
cmake --version
|
||||||
make -C tests
|
echo 'travis_fold:start:configure'
|
||||||
pushd tests
|
echo 'Configuring...'
|
||||||
./test -t
|
mkdir build_cmake
|
||||||
popd
|
pushd build_cmake
|
||||||
echo 'travis_fold:end:testing'
|
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=SOME -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
||||||
echo 'travis_fold:start:samples'
|
echo 'travis_fold:end:configure'
|
||||||
echo 'Building the samples...'
|
echo 'travis_fold:start:building'
|
||||||
make samples
|
echo 'Building...'
|
||||||
echo 'travis_fold:end:samples'
|
cmake --build .
|
||||||
echo 'travis_fold:start:installing'
|
echo 'travis_fold:end:building'
|
||||||
echo 'Installing...'
|
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
||||||
sudo make install
|
echo 'travis_fold:start:testing'
|
||||||
echo 'travis_fold:end:installing'
|
echo 'Testing...'
|
||||||
echo 'travis_fold:start:test_install'
|
ctest . -C Debug -V --output-on-failure
|
||||||
echo 'Testing building with the installed version...'
|
echo 'travis_fold:end:testing'
|
||||||
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
fi
|
||||||
echo 'travis_fold:end:test_install'
|
;;
|
||||||
|
*)
|
||||||
|
echo 'travis_fold:start:configure'
|
||||||
|
echo 'Configuring...'
|
||||||
|
./configure --disable-optimise $wxCONFIGURE_FLAGS
|
||||||
|
echo 'travis_fold:end:configure'
|
||||||
|
echo 'travis_fold:start:building'
|
||||||
|
echo 'Building...'
|
||||||
|
make
|
||||||
|
echo 'travis_fold:end:building'
|
||||||
|
echo 'travis_fold:start:testing'
|
||||||
|
echo 'Testing...'
|
||||||
|
make -C tests
|
||||||
|
pushd tests
|
||||||
|
./test -t
|
||||||
|
popd
|
||||||
|
echo 'travis_fold:end:testing'
|
||||||
|
echo 'travis_fold:start:samples'
|
||||||
|
echo 'Building the samples...'
|
||||||
|
make samples
|
||||||
|
echo 'travis_fold:end:samples'
|
||||||
|
echo 'travis_fold:start:installing'
|
||||||
|
echo 'Installing...'
|
||||||
|
sudo make install
|
||||||
|
echo 'travis_fold:end:installing'
|
||||||
|
echo 'travis_fold:start:test_install'
|
||||||
|
echo 'Testing building with the installed version...'
|
||||||
|
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
||||||
|
echo 'travis_fold:end:test_install'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
Reference in New Issue
Block a user