Use CMake script to check Travis installation
This commit is contained in:
@@ -16,50 +16,67 @@ case $wxTOOLSET in
|
|||||||
cmake)
|
cmake)
|
||||||
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
echo 'travis_fold:start:configure'
|
echo 'travis_fold:start:configure'
|
||||||
echo 'Configuring...'
|
echo 'Configuring...'
|
||||||
mkdir build_cmake
|
mkdir build_cmake
|
||||||
pushd build_cmake
|
pushd build_cmake
|
||||||
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=SOME -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=SOME -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
||||||
echo 'travis_fold:end:configure'
|
echo 'travis_fold:end:configure'
|
||||||
|
|
||||||
echo 'travis_fold:start:building'
|
echo 'travis_fold:start:building'
|
||||||
echo 'Building...'
|
echo 'Building...'
|
||||||
cmake --build . -- $wxJOBS
|
cmake --build . -- $wxJOBS
|
||||||
echo 'travis_fold:end:building'
|
echo 'travis_fold:end:building'
|
||||||
|
|
||||||
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
||||||
echo 'travis_fold:start:testing'
|
echo 'travis_fold:start:testing'
|
||||||
echo 'Testing...'
|
echo 'Testing...'
|
||||||
ctest -V -C Debug -R "test_base" --output-on-failure --interactive-debug-mode 0 .
|
ctest -V -C Debug -R "test_base" --output-on-failure --interactive-debug-mode 0 .
|
||||||
echo 'travis_fold:end:testing'
|
echo 'travis_fold:end:testing'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
||||||
sudo env "PATH=$PATH" cmake --build . --target install
|
sudo env "PATH=$PATH" cmake --build . --target install
|
||||||
echo -en 'travis_fold:end:script.install\\r'
|
|
||||||
popd
|
popd
|
||||||
|
echo -en 'travis_fold:end:script.install\\r'
|
||||||
|
|
||||||
|
echo 'Testing installation...' && echo -en 'travis_fold:start:script.testinstall\\r'
|
||||||
|
mkdir build_cmake_install_test
|
||||||
|
pushd build_cmake_install_test
|
||||||
|
cmake "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES ../samples/minimal
|
||||||
|
cmake --build .
|
||||||
|
popd
|
||||||
|
echo -en 'travis_fold:end:script.testinstall\\r'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r'
|
echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r'
|
||||||
./configure --disable-optimise $wxCONFIGURE_FLAGS
|
./configure --disable-optimise $wxCONFIGURE_FLAGS
|
||||||
echo -en 'travis_fold:end:script.configure\\r'
|
echo -en 'travis_fold:end:script.configure\\r'
|
||||||
|
|
||||||
echo 'Building...' && echo -en 'travis_fold:start:script.build\\r'
|
echo 'Building...' && echo -en 'travis_fold:start:script.build\\r'
|
||||||
make $wxJOBS
|
make $wxJOBS
|
||||||
echo -en 'travis_fold:end:script.build\\r'
|
echo -en 'travis_fold:end:script.build\\r'
|
||||||
|
|
||||||
echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r'
|
echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r'
|
||||||
make -C tests $wxJOBS
|
make -C tests $wxJOBS
|
||||||
echo -en 'travis_fold:end:script.tests\\r'
|
echo -en 'travis_fold:end:script.tests\\r'
|
||||||
|
|
||||||
echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'
|
echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'
|
||||||
pushd tests && ./test && popd
|
pushd tests && ./test && popd
|
||||||
echo -en 'travis_fold:end:script.testing\\r'
|
echo -en 'travis_fold:end:script.testing\\r'
|
||||||
|
|
||||||
echo 'Building samples...' && echo -en 'travis_fold:start:script.samples\\r'
|
echo 'Building samples...' && echo -en 'travis_fold:start:script.samples\\r'
|
||||||
(test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
|
(test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
|
||||||
echo -en 'travis_fold:end:script.samples\\r'
|
echo -en 'travis_fold:end:script.samples\\r'
|
||||||
|
|
||||||
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
||||||
sudo make install
|
sudo make install
|
||||||
echo -en 'travis_fold:end:script.install\\r'
|
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
|
||||||
|
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
||||||
|
echo -en 'travis_fold:end:script.testinstall\\r'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo 'Testing installation...' && echo -en 'travis_fold:start:script.testinstall\\r'
|
|
||||||
make -C samples/minimal -f makefile.unx clean
|
|
||||||
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
|
||||||
echo -en 'travis_fold:end:script.testinstall\\r'
|
|
||||||
|
Reference in New Issue
Block a user