From 694f0c59e7da8cf3a18f51ee77531cdb1e28421b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Apr 2020 23:05:38 +0200 Subject: [PATCH 01/19] Don't rebuild on AppVeyor if only .travis.yml was changed Just avoid the unnecessary rebuilds. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 6737b09320..3d73c0de7e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,7 @@ skip_commits: - docs/ - interface/ - misc/ + - .travis.yml environment: matrix: From 70335d7a551d452c7d396e18eba2495006d28ab8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Apr 2020 23:07:57 +0200 Subject: [PATCH 02/19] Add Travis CI build using Xcode 11.3 Test with the latest Xcode release too. Make this build monolithic just to try to cover more possibilities. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 11f0bb397d..1e5f616d27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,10 @@ matrix: compiler: clang env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_CXX_STANDARD=11" name: wxOSX Xcode 9.4 + - os: osx + osx_image: xcode11.3 + env: wxCONFIGURE_FLAGS="--enable-monolithic" + name: wxOSX Xcode 11.3 - dist: trusty compiler: gcc env: wxCONFIGURE_FLAGS="--with-x11 --enable-pch --disable-stc" wxSKIP_SAMPLES=1 From f0136060eb73e0f3c3e29b0663941f53cbc43342 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Apr 2020 23:08:34 +0200 Subject: [PATCH 03/19] Upgrade Travis CI Linux build platforms to later versions Move Precise (12.04) build to Trusty (4.04), move one of the existing Trusty builds to Xenial (16.04) and all the other ones to Bionic (18.04) to test under reasonably recent platforms too, and mostly. --- .travis.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e5f616d27..1af91101e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,30 +7,30 @@ sudo: required matrix: include: - - dist: precise + - dist: trusty compiler: gcc env: wxGTK_VERSION=2 wxUSE_XVFB=1 - name: wxGTK 2 Ubuntu 12.04 - - dist: trusty + name: wxGTK 2 Ubuntu 14.04 + - dist: xenial compiler: gcc env: wxGTK_VERSION=3 - name: wxGTK 3 Ubuntu 14.04 - - dist: trusty + name: wxGTK 3 Ubuntu 16.04 + - dist: bionic compiler: gcc env: wxGTK_VERSION=2 wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic" wxUSE_XVFB=1 - name: wxGTK 2 UTF-8 Ubuntu 14.04 - - dist: trusty + name: wxGTK 2 UTF-8 Ubuntu 18.04 + - dist: bionic compiler: gcc env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1 - name: wxGTK 3 STL Ubuntu 14.04 - - dist: trusty + name: wxGTK 3 STL Ubuntu 18.04 + - dist: bionic compiler: clang env: wxGTK_VERSION=2 wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview" wxUSE_XVFB=1 - name: wxGTK 2 clang Ubuntu 14.04 - - dist: trusty + name: wxGTK 2 clang Ubuntu 18.04 + - dist: bionic compiler: gcc env: wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles" - name: wxGTK CMake Ubuntu 14.04 + name: wxGTK CMake Ubuntu 18.04 - os: osx osx_image: xcode6.4 compiler: clang @@ -45,22 +45,22 @@ matrix: osx_image: xcode11.3 env: wxCONFIGURE_FLAGS="--enable-monolithic" name: wxOSX Xcode 11.3 - - dist: trusty + - dist: bionic compiler: gcc env: wxCONFIGURE_FLAGS="--with-x11 --enable-pch --disable-stc" wxSKIP_SAMPLES=1 - name: wxX11 Ubuntu 14.04 - - dist: trusty + name: wxX11 Ubuntu 18.04 + - dist: bionic compiler: gcc env: wxCONFIGURE_FLAGS="--with-directfb --enable-pch --disable-stc" wxSKIP_SAMPLES=1 - name: wxDFB Ubuntu 14.04 - - dist: trusty + name: wxDFB Ubuntu 18.04 + - dist: bionic compiler: gcc env: wxCONFIGURE_FLAGS="--with-motif --enable-pch --disable-stc" wxSKIP_SAMPLES=1 - name: wxMotif Ubuntu 14.04 - - dist: trusty + name: wxMotif Ubuntu 18.04 + - dist: bionic compiler: gcc env: wxCONFIGURE_FLAGS="--with-qt --enable-pch" wxSKIP_SAMPLES=1 - name: wxQt Ubuntu 14.04 + name: wxQt Ubuntu 18.04 - os: linux arch: arm64 env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 From cd750332d39dac24fd0929b602fa616fafb69521 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 15:18:14 +0200 Subject: [PATCH 04/19] Disable debug info generation in Travis CI builds Debug info is useless in these builds and disabling it should hopefully speed them up a bit and take less space. --- build/tools/travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 3d88b54116..874ee26b2c 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -54,7 +54,7 @@ case $wxTOOLSET in ;; *) echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' - ./configure --disable-optimise $wxCONFIGURE_FLAGS + ./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS echo -en 'travis_fold:end:script.configure\\r' echo 'Building...' && echo -en 'travis_fold:start:script.build\\r' From f899a72d45129c8530567e2f85484e37c206717e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 15:24:24 +0200 Subject: [PATCH 05/19] Show config.log contents if configure failed This should help understanding why Qt libraries are not found under Bionic and may also be useful in case of other failures in the future. --- build/tools/travis-ci.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 874ee26b2c..9293df833a 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -54,7 +54,14 @@ case $wxTOOLSET in ;; *) echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' - ./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS + ./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$? + if [ $rc != 0 ]; then + echo '*** Configuring failed, contents of config.log follows: ***' + echo '-----------------------------------------------------------' + cat config.log + echo '-----------------------------------------------------------' + exit $rc + fi echo -en 'travis_fold:end:script.configure\\r' echo 'Building...' && echo -en 'travis_fold:start:script.build\\r' From 1bc33f3d0c82491dae279ff4d942d7deaa19adb9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 15:25:31 +0200 Subject: [PATCH 06/19] Ignore more Travis CI files on AppVeyor Avoid unnecessary AppVeyor rebuilds when Travis build files are changed. --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 3d73c0de7e..13a2a59548 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,8 @@ skip_commits: - interface/ - misc/ - .travis.yml + - build/tools/travis-ci.sh + - build/tools/before_install.sh environment: matrix: From 9a53b3b66a1c8502499e17421cf7f34078158df9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 15:48:54 +0200 Subject: [PATCH 07/19] Use C++17 and STL for Xcode 11.3 Travis CI build Note that using C++98 results in tests build failure with clang as libc++ doesn't allow using custom std::swap() specialization for non-const references in its iter_swap(), it really requires using rvalue references, which are, of course, only available in C++11 and later. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1af91101e6..187ad010b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ matrix: name: wxOSX Xcode 9.4 - os: osx osx_image: xcode11.3 - env: wxCONFIGURE_FLAGS="--enable-monolithic" + env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --enable-stl" name: wxOSX Xcode 11.3 - dist: bionic compiler: gcc From 76ac2d8e76b264db33827c91cfb49f5b088db66d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:12:03 +0200 Subject: [PATCH 08/19] Install Qt OpenGL support when building wxQt on Travis Somehow this wasn't necessary on the old Ubuntu version, but is needed under Bionic. Ideally configure shouldn't refuse to build everything if just Qt5OpenGL is not found, and just disable OpenGL support, but this enhancement can be done later. --- build/tools/before_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index 129cee2d9e..b640026b75 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -18,7 +18,7 @@ case $(uname -s) in case "$wxCONFIGURE_FLAGS" in *--with-directfb*) libtoolkit_dev='libdirectfb-dev' ;; *--with-motif*) libtoolkit_dev='libmotif-dev libxmu-dev' ;; - *--with-qt*) libtoolkit_dev='qtdeclarative5-dev' ;; + *--with-qt*) libtoolkit_dev='qtdeclarative5-dev libqt5opengl5-dev';; esac pgk_check="libgstreamermm-1.0-dev libgstreamermm-0.10-dev \ From bba585eebbee6adf2c7fde53977548798a0502a9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:18:11 +0200 Subject: [PATCH 09/19] Disable AppVeyor rebuilds on Mac files changes too As long as we don't test under AppVeyor, there is no need to do anything there when only Mac-specific files are changed. --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 13a2a59548..0c75abc35b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,8 @@ skip_commits: - docs/ - interface/ - misc/ + - include/wx/osx/ + - src/osx/ - .travis.yml - build/tools/travis-ci.sh - build/tools/before_install.sh From 9fba259546d11c869d3c355378cf8a2d56a1b710 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:20:48 +0200 Subject: [PATCH 10/19] Require macOS 10.12 for Travis CI build using Xcode 11.3 Our tests don't compile under Mac when targeting 10.9 and using C++17 as they try to use C++17 std::uncaught_exceptions() which is only available since 10.12 under macOS. We could avoid the use of this function in the tests in this build configuration, but for now just target 10.12 instead. Yet another alternative would be to downgrade to using C++14. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 187ad010b0..f6fee197b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ matrix: name: wxOSX Xcode 9.4 - os: osx osx_image: xcode11.3 - env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --enable-stl" + env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --with-macosx-version-min=10.12 --enable-stl" name: wxOSX Xcode 11.3 - dist: bionic compiler: gcc From babf789c5484040fe994b126bb08a22ceba04bd4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:25:33 +0200 Subject: [PATCH 11/19] Don't install unnecessary packages in Travis CI build script It shouldn't be necessary to install GTK-specific packages when building non-GTK-based ports. --- build/tools/before_install.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index b640026b75..96286c6a32 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -2,7 +2,7 @@ # # This script is used by Travis CI to install the dependencies before building # wxWidgets but can also be run by hand if necessary but currently it only -# works for Ubuntu 12.04 and 14.04 and OS X used by Travis builds. +# works for Ubuntu versions used by Travis builds. SUDO=sudo @@ -10,30 +10,37 @@ case $(uname -s) in Linux) if [ -f /etc/apt/sources.list ]; then $SUDO apt-get update - case "$wxGTK_VERSION" in - 3) libgtk_dev=libgtk-3-dev ;; - *) libgtk_dev=libgtk2.0-dev;; - esac case "$wxCONFIGURE_FLAGS" in *--with-directfb*) libtoolkit_dev='libdirectfb-dev' ;; *--with-motif*) libtoolkit_dev='libmotif-dev libxmu-dev' ;; *--with-qt*) libtoolkit_dev='qtdeclarative5-dev libqt5opengl5-dev';; + *--with-x11*) ;; + *) + case "$wxGTK_VERSION" in + 3) libtoolkit_dev=libgtk-3-dev + extra_deps='libwebkit2gtk-4.0-dev libwebkitgtk-3.0-dev' + ;; + *) libtoolkit_dev=libgtk2.0-dev + extra_deps='libwebkitgtk-dev' + ;; + esac + + extra_deps="$extra_deps \ + libgstreamermm-1.0-dev libgstreamermm-0.10-dev \ + libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ + libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \ + libglu1-mesa-dev" esac - pgk_check="libgstreamermm-1.0-dev libgstreamermm-0.10-dev \ - libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ - libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \ - libwebkit2gtk-4.0-dev libwebkitgtk-3.0-dev libwebkitgtk-dev \ - libglu1-mesa-dev libsecret-1-dev libnotify-dev" - - for pkg in $pgk_check; do + extra_deps="$extra_deps libsecret-1-dev libnotify-dev" + for pkg in $extra_deps; do if $(apt-cache pkgnames | grep -q $pkg) ; then pkg_install="$pkg_install $pkg" fi done - $SUDO apt-get install -y $libgtk_dev $libtoolkit_dev $pkg_install + $SUDO apt-get install -y $libtoolkit_dev $pkg_install fi ;; From 3fc119f564dd7e4896196ce2ab88b316385091ff Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:27:24 +0200 Subject: [PATCH 12/19] Avoid using undefined variable in Travis CI build script rc is undefined if configure succeeds, so use "$rc" to expand to something non-empty even in this case. --- build/tools/travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 9293df833a..f440f3ea3b 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -55,7 +55,7 @@ case $wxTOOLSET in *) echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' ./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$? - if [ $rc != 0 ]; then + if [ "$rc" != 0 ]; then echo '*** Configuring failed, contents of config.log follows: ***' echo '-----------------------------------------------------------' cat config.log From a22b9b283d47380bfe668c66e68e779775364b7a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:51:55 +0200 Subject: [PATCH 13/19] Really fix configure exit code test Don't compare undefined variable with 0, this is not going to work. --- build/tools/travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index f440f3ea3b..3401615226 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -55,7 +55,7 @@ case $wxTOOLSET in *) echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' ./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$? - if [ "$rc" != 0 ]; then + if [ -n $rc ]; then echo '*** Configuring failed, contents of config.log follows: ***' echo '-----------------------------------------------------------' cat config.log From cc86204c98aaae4062c47ed0df703f744e4542a2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:54:01 +0200 Subject: [PATCH 14/19] Change wxOSX CMake build name to include "CMake" --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f6fee197b6..889ee215a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ matrix: osx_image: xcode9.4 compiler: clang env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_CXX_STANDARD=11" - name: wxOSX Xcode 9.4 + name: wxOSX CMake Xcode 9.4 - os: osx osx_image: xcode11.3 env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --with-macosx-version-min=10.12 --enable-stl" From ea11be554cfc135ecbacf5c36d9608cc915afaa0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 17:56:45 +0200 Subject: [PATCH 15/19] Install libpango1.0-dev for wxX11 build on Travis Hopefully this is what explains pangoxft pkg-config check failure. --- build/tools/before_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index 96286c6a32..0411254cfd 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -15,7 +15,7 @@ case $(uname -s) in *--with-directfb*) libtoolkit_dev='libdirectfb-dev' ;; *--with-motif*) libtoolkit_dev='libmotif-dev libxmu-dev' ;; *--with-qt*) libtoolkit_dev='qtdeclarative5-dev libqt5opengl5-dev';; - *--with-x11*) ;; + *--with-x11*) extra_deps='libpango1.0-dev' ;; *) case "$wxGTK_VERSION" in 3) libtoolkit_dev=libgtk-3-dev From 30241e18ba3dac6bcc3e2a1b18e373fa004adc0d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 18:25:48 +0200 Subject: [PATCH 16/19] Fix configure success test one more time Quotes are important. --- build/tools/travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 3401615226..b1e3470c86 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -55,7 +55,7 @@ case $wxTOOLSET in *) echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r' ./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$? - if [ -n $rc ]; then + if [ -n "$rc" ]; then echo '*** Configuring failed, contents of config.log follows: ***' echo '-----------------------------------------------------------' cat config.log From 7cfe4ee9f2d15420aa7c3db57c085dd85941a1d1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 18:26:02 +0200 Subject: [PATCH 17/19] Disable GUI parts build for PPC and S/390 Travis platforms People are unlikely to use wxGTK on those anyhow, and it takes an awfully long time to build, especially on PPC. --- .travis.yml | 4 ++-- build/tools/before_install.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 889ee215a7..f3682e1396 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,11 +67,11 @@ matrix: name: wxGTK ARM64 - os: linux arch: ppc64le - env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 + env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 name: wxGTK PowerPC64 - os: linux arch: s390x - env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 + env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 name: wxGTK S/390 branches: diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index 0411254cfd..8ad9fc453d 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -16,6 +16,7 @@ case $(uname -s) in *--with-motif*) libtoolkit_dev='libmotif-dev libxmu-dev' ;; *--with-qt*) libtoolkit_dev='qtdeclarative5-dev libqt5opengl5-dev';; *--with-x11*) extra_deps='libpango1.0-dev' ;; + *--disable-gui*) ;; *) case "$wxGTK_VERSION" in 3) libtoolkit_dev=libgtk-3-dev From f1ee6277365e29933fab71fb8dea3be62ae2f62c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Apr 2020 21:00:28 +0200 Subject: [PATCH 18/19] Update Travis testing script to work for non-GUI builds too Skip parts that don't work in this case. --- .travis.yml | 4 ++-- build/tools/travis-ci.sh | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3682e1396..a849f64d20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,11 +67,11 @@ matrix: name: wxGTK ARM64 - os: linux arch: ppc64le - env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 + env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1 name: wxGTK PowerPC64 - os: linux arch: s390x - env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 + env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1 name: wxGTK S/390 branches: diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index b1e3470c86..84d973f806 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -69,7 +69,7 @@ case $wxTOOLSET in echo -en 'travis_fold:end:script.build\\r' echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r' - make -C tests $wxJOBS failtest + [ "$wxSKIP_GUI" = 1 ] || make -C tests $wxJOBS failtest make -C tests $wxJOBS echo -en 'travis_fold:end:script.tests\\r' @@ -77,6 +77,11 @@ case $wxTOOLSET in pushd tests && ./test && popd echo -en 'travis_fold:end:script.testing\\r' + if [ "$wxSKIP_GUI" = 1 ]; then + echo 'Skipping the rest of tests for non-GUI build.' + exit 0 + fi + if [ "$wxUSE_XVFB" = 1 ]; then echo 'Testing GUI using Xvfb...' && echo -en 'travis_fold:start:script.testing_gui\\r' pushd tests && xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui && popd From 0397da2a8fdb4449178238e64e7d6e58ff2f5f2a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 23 Apr 2020 00:02:10 +0200 Subject: [PATCH 19/19] Use ld --no-as-needed in Travis Ubuntu 18.04 wxGTK build This works around a problem in our build system which doesn't set rpath correctly when linking our own libraries, which means that "qa" library, for example, doesn't record the path to its "xml" library dependency. We already worked around this by linking any program using "qa" with "xml" too, however this doesn't do anything if "--as-needed" flag is in effect, as is the case by default under Ubuntu 18.04, so make our workaround work by forcefully disabling this flag. Real solution would be to use -Wl,-rpath correctly and then stop linking with "xml" library unnecessarily in e.g. test_gui bakefile. --- .travis.yml | 2 +- build/tools/travis-ci.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a849f64d20..4dbb33274a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: name: wxGTK 2 UTF-8 Ubuntu 18.04 - dist: bionic compiler: gcc - env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1 + env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11 LDFLAGS=-Wl,--no-as-needed" wxUSE_XVFB=1 name: wxGTK 3 STL Ubuntu 18.04 - dist: bionic compiler: clang diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 84d973f806..6f57b046ec 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -70,7 +70,7 @@ case $wxTOOLSET in echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r' [ "$wxSKIP_GUI" = 1 ] || make -C tests $wxJOBS failtest - make -C tests $wxJOBS + make -C tests $wxJOBS $wxMAKEFILE_FLAGS echo -en 'travis_fold:end:script.tests\\r' echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'