Use multiple commands in Travis CI build script

Using a single long command was always inconvenient and started displaying the
build results strangely since starting to build the samples conditionally in
62d2f4e5f5, so try using multiple commands with
"set -e" to ensure that we abort the build as soon as possible.
This commit is contained in:
Vadim Zeitlin
2017-01-07 00:14:26 +01:00
parent 5b88196311
commit dcef4d4a9e

View File

@@ -37,25 +37,22 @@ notifications:
before_install: ./build/tools/before_install.sh before_install: ./build/tools/before_install.sh
script: | script:
echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r' && - set -e && 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.1\\r' && - echo -en 'travis_fold:end:script.configure\\r'
echo 'Building...' && echo -en 'travis_fold:start:script.2\\r' && - echo 'Building...' && echo -en 'travis_fold:start:script.build\\r'
make && - make
echo -en 'travis_fold:end:script.2\\r' && - echo -en 'travis_fold:end:script.build\\r'
echo 'Testing...' && echo -en 'travis_fold:start:script.3\\r' && - echo 'Testing...' && echo -en 'travis_fold:start:script.test\\r'
make -C tests && - make -C tests && pushd tests && ./test -t && popd
pushd tests && - echo -en 'travis_fold:end:script.test\\r'
./test -t && - echo 'Building samples...' && echo -en 'travis_fold:start:script.samples\\r'
popd && - (test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
echo -en 'travis_fold:end:script.3\\r' && - echo -en 'travis_fold:end:script.samples\\r'
echo 'Building the samples...' && echo -en 'travis_fold:start:script.4\\r' && - echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
(test -n "$wxSKIP_SAMPLES" && make samples || echo "*** Skipping building samples ***") && - sudo make install
echo -en 'travis_fold:end:script.4\\r' && - echo -en 'travis_fold:end:script.install\\r'
echo 'Installing...' && echo -en 'travis_fold:start:script.5\\r' && - echo 'Testing installation...' && echo -en 'travis_fold:start:script.testinstall\\r'
sudo make install && - make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
echo -en 'travis_fold:end:script.5\\r' && - echo -en 'travis_fold:end:script.testinstall\\r'
echo 'Testing building with the installed version...' && echo -en 'travis_fold:start:script.6\\r' &&
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS &&
echo -en 'travis_fold:end:script.6\\r'