2016-10-06 10:04:55 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# This script is used by Travis CI to configure, build and test wxWidgets
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-10-07 08:02:02 -04:00
|
|
|
case $wxTOOLSET in
|
|
|
|
cmake)
|
|
|
|
if [ `uname -s` = "Linux" ] && [ `lsb_release -cs` = "precise" ]; then
|
|
|
|
echo Updating CMake...
|
|
|
|
wget -O - https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz | tar xzf -
|
|
|
|
export PATH=`pwd`/cmake-3.6.2-Linux-x86_64/bin:$PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
|
|
|
cmake --version
|
|
|
|
echo 'travis_fold:start:configure'
|
|
|
|
echo 'Configuring...'
|
|
|
|
mkdir build_cmake
|
|
|
|
pushd build_cmake
|
2017-12-09 08:38:11 -05:00
|
|
|
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=SOME -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
2016-10-07 08:02:02 -04:00
|
|
|
echo 'travis_fold:end:configure'
|
|
|
|
echo 'travis_fold:start:building'
|
|
|
|
echo 'Building...'
|
|
|
|
cmake --build .
|
|
|
|
echo 'travis_fold:end:building'
|
|
|
|
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
|
|
|
echo 'travis_fold:start:testing'
|
|
|
|
echo 'Testing...'
|
|
|
|
ctest . -C Debug -V --output-on-failure
|
|
|
|
echo 'travis_fold:end:testing'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2017-12-09 08:38:11 -05:00
|
|
|
echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r'
|
2016-10-07 08:02:02 -04:00
|
|
|
./configure --disable-optimise $wxCONFIGURE_FLAGS
|
2017-12-09 08:38:11 -05:00
|
|
|
echo -en 'travis_fold:end:script.configure\\r'
|
|
|
|
echo 'Building...' && echo -en 'travis_fold:start:script.build\\r'
|
2016-10-07 08:02:02 -04:00
|
|
|
make
|
2017-12-09 08:38:11 -05:00
|
|
|
echo -en 'travis_fold:end:script.build\\r'
|
|
|
|
echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r'
|
2016-10-07 08:02:02 -04:00
|
|
|
make -C tests
|
2017-12-09 08:38:11 -05:00
|
|
|
echo -en 'travis_fold:end:script.tests\\r'
|
|
|
|
echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'
|
|
|
|
pushd tests && ./test && popd
|
|
|
|
echo -en 'travis_fold:end:script.testing\\r'
|
|
|
|
echo 'Building samples...' && echo -en 'travis_fold:start:script.samples\\r'
|
|
|
|
(test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
|
|
|
|
echo -en 'travis_fold:end:script.samples\\r'
|
|
|
|
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
2016-10-07 08:02:02 -04:00
|
|
|
sudo make install
|
2017-12-09 08:38:11 -05:00
|
|
|
echo -en 'travis_fold:end:script.install\\r'
|
|
|
|
echo 'Testing installation...' && echo -en 'travis_fold:start:script.testinstall\\r'
|
|
|
|
make -C samples/minimal -f makefile.unx clean
|
2016-10-07 08:02:02 -04:00
|
|
|
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
2017-12-09 08:38:11 -05:00
|
|
|
echo -en 'travis_fold:end:script.testinstall\\r'
|
2016-10-07 08:02:02 -04:00
|
|
|
;;
|
|
|
|
esac
|