From dcef4d4a9ea5c46160859be5358e30192d1953b7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jan 2017 00:14:26 +0100 Subject: [PATCH 1/3] 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 62d2f4e5f5b24b1335e12dbdcf222488a0215845, so try using multiple commands with "set -e" to ensure that we abort the build as soon as possible. --- .travis.yml | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25d1614219..b0d8645e08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,25 +37,22 @@ notifications: 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' && - (test -n "$wxSKIP_SAMPLES" && make samples || echo "*** Skipping building samples ***") && - echo -en 'travis_fold:end:script.4\\r' && - echo 'Installing...' && echo -en 'travis_fold:start:script.5\\r' && - sudo make install && - 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 $wxMAKEFILE_FLAGS && - echo -en 'travis_fold:end:script.6\\r' +script: + - set -e && echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' + - ./configure --disable-optimise $wxCONFIGURE_FLAGS + - echo -en 'travis_fold:end:script.configure\\r' + - echo 'Building...' && echo -en 'travis_fold:start:script.build\\r' + - make + - echo -en 'travis_fold:end:script.build\\r' + - echo 'Testing...' && echo -en 'travis_fold:start:script.test\\r' + - make -C tests && pushd tests && ./test -t && popd + - echo -en 'travis_fold:end:script.test\\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' + - sudo make install + - 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 $wxMAKEFILE_FLAGS + - echo -en 'travis_fold:end:script.testinstall\\r' From c80440af861f2cb354d6037a1c8a5bc7151d8826 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jan 2017 20:05:00 +0100 Subject: [PATCH 2/3] Dont 'include -stdlib=libc++ in CXXFLAGS in Travis build script There is no need to specify it explicitly any more and it seems to confuse make because of an apparent problem with (insufficient?) quoting in Mac builds. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b0d8645e08..9525b6eab3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: - os: osx osx_image: xcode6.4 compiler: clang - env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS='-std=c++11 -stdlib=libc++'" wxSKIP_SAMPLES=1 + env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxSKIP_SAMPLES=1 branches: only: From f08305ae33f5c7ce832913315164db96dcf985c0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jan 2017 20:06:28 +0100 Subject: [PATCH 3/3] Clean before building using installed library in Travis CI The minimal sample had been already built as part of "make samples", so clean it before rebuilding it using the installed library version, otherwise we never do anything in this step. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9525b6eab3..b9f248aa74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,5 +54,6 @@ script: - sudo make install - 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'