From 89242efa7824e3590b97eb703c70859f703339a8 Mon Sep 17 00:00:00 2001 From: PB Date: Wed, 14 Jul 2021 09:00:59 +0200 Subject: [PATCH 1/7] Remove TravisCI badge from readme Travis CI is not used anymore, so remove its build status badge from the main readme. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1acfe9c7e6..92d31be7c8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Platforms --------- [![AppVeyor](https://img.shields.io/appveyor/build/wxWidgets/wxWidgets?label=AppVeyor&logo=appveyor)](https://ci.appveyor.com/project/wxWidgets/wxwidgets) -[![Travis](https://img.shields.io/travis/wxWidgets/wxWidgets?label=TravisCI&logo=travis)](https://travis-ci.org/wxWidgets/wxWidgets) [![Github](https://img.shields.io/github/checks-status/wxWidgets/wxWidgets/master?label=GitHub&logo=github)](https://github.com/wxWidgets/wxWidgets/actions) [![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/wxwidgets.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:wxwidgets) From 91f6bee71bb55b41c0cbec610d383085c098ce68 Mon Sep 17 00:00:00 2001 From: PB Date: Wed, 14 Jul 2021 22:34:27 +0200 Subject: [PATCH 2/7] Remove TravisCI build scripts Travis CI is not used anymore, remove its scripts. --- .travis.yml | 87 ----------------- build/tools/travis-ci.sh | 195 --------------------------------------- 2 files changed, 282 deletions(-) delete mode 100644 .travis.yml delete mode 100755 build/tools/travis-ci.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c1e8519c52..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,87 +0,0 @@ -# This is the control file for Travis continuous integration system. -# -# It is used automatically for the repositories on Github if it's found in the -# root directory of the project. -language: cpp - -# Specify the default platform. -os: linux -dist: xenial - -jobs: - include: - - dist: trusty - compiler: gcc - env: wxGTK_VERSION=2 wxUSE_XVFB=1 - name: wxGTK 2 Ubuntu 14.04 - - dist: bionic - compiler: gcc - env: wxGTK_VERSION=3 wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles" - name: wxGTK 3 CMake Ubuntu 18.04 - - os: osx - osx_image: xcode7.3 - compiler: clang - env: wxSKIP_SAMPLES=1 - name: wxOSX Xcode 7.3 - - os: osx - osx_image: xcode9.4 - compiler: clang - env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_CXX_STANDARD=11" - 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" - name: wxOSX Xcode 11.3 - - os: osx - osx_image: xcode11.4 - env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0 --with-osx_iphone --with-macosx-version-min=10.0 --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) --enable-stl --disable-sys-libs" wxALLOW_WARNINGS=1 wxSKIP_GUI=1 wxSKIP_TESTING=1 wxSKIP_SAMPLES=1 - name: wxOSX iOS Xcode 11.4 - - os: osx - osx_image: xcode11.4 - env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO" wxCMAKE_SAMPLES=OFF wxCMAKE_TESTS=OFF - name: wxOSX iOS CMake Xcode 11.4 - - os: linux - arch: arm64 - env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 - name: wxGTK ARM64 - - os: linux - arch: ppc64le - env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1 - name: wxBase PowerPC64 - - os: linux - arch: s390x - env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1 - name: wxBase S/390 - - # The environments running these builds are flaky and often fail for the - # reasons that have nothing to do with the build itself. - allow_failures: - - os: linux - arch: arm64 - env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 - name: wxGTK ARM64 - - os: linux - arch: ppc64le - env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1 - name: wxBase PowerPC64 - - os: linux - arch: s390x - env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1 - name: wxBase S/390 - -branches: - only: - - master - - WX_3_0_BRANCH - -notifications: - email: - if: repo = wxWidgets/wxWidgets - recipients: - - vadim@wxwidgets.org - on_success: change - on_failure: change - -before_install: ./build/tools/before_install.sh - -script: ./build/tools/travis-ci.sh diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh deleted file mode 100755 index fb6d3f33a1..0000000000 --- a/build/tools/travis-ci.sh +++ /dev/null @@ -1,195 +0,0 @@ -#!/bin/bash -# -# This script is used by Travis CI to configure, build and test wxWidgets - -set -e - -. ./build/tools/httpbin.sh - -wxPROC_COUNT=`getconf _NPROCESSORS_ONLN` -((wxPROC_COUNT++)) -wxBUILD_ARGS="-j$wxPROC_COUNT" - -# Setting this variable suppresses "Error retrieving accessibility bus address" -# messages from WebKit tests that we're not interested in. -export NO_AT_BRIDGE=1 - -case $wxTOOLSET in - cmake) - if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi - if [ -z $wxCMAKE_SAMPLES ]; then wxCMAKE_SAMPLES=SOME; fi - if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then - wxBUILD_ARGS="-jobs $wxPROC_COUNT -quiet" - fi - cmake --version - - echo 'travis_fold:start:configure' - echo 'Configuring...' - mkdir build_cmake - pushd build_cmake - cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=$wxCMAKE_SAMPLES -D wxBUILD_TESTS=$wxCMAKE_TESTS .. - echo 'travis_fold:end:configure' - - if [ "$wxCMAKE_GENERATOR" != "Xcode" ]; then - echo 'travis_fold:start:building' - echo 'Building...' - cmake --build . -- $wxBUILD_ARGS - echo 'travis_fold:end:building' - fi - - echo 'travis_fold:start:install' - if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then echo -n 'Building and '; fi - echo 'Installing...' - sudo env "PATH=$PATH" cmake --build . --target install -- $wxBUILD_ARGS - echo 'travis_fold:end:install' - - if [ "$wxCMAKE_TESTS" != "OFF" ]; then - echo 'travis_fold:start:httpbin' - httpbin_launch - echo 'travis_fold:end:httpbin' - - echo 'travis_fold:start:testing' - echo 'Testing...' - ctest -V -C Debug -E "test_drawing" --output-on-failure --interactive-debug-mode 0 . || rc=$? - echo 'travis_fold:end:testing' - if [ -n "$rc" ]; then - httpbin_show_log - exit $rc - fi - fi - - echo 'travis_fold:start:testinstall' - echo 'Testing installation...' - popd - mkdir build_cmake_install_test - pushd build_cmake_install_test - cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES ../samples/minimal - cmake --build . -- $wxBUILD_ARGS - popd - echo 'travis_fold:end:testinstall' - ;; - *) - echo 'travis_fold:start:configure' - echo 'Configuring...' - - wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS" - if [ -n "$wxGTK_VERSION" ]; then - wxCONFIGURE_OPTIONS="--with-gtk=$wxGTK_VERSION $wxCONFIGURE_OPTIONS" - fi - - ./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$? - - if [ -n "$rc" ]; then - echo '*** Configuring failed, contents of config.log follows: ***' - echo '-----------------------------------------------------------' - cat config.log - echo '-----------------------------------------------------------' - exit $rc - fi - echo 'travis_fold:end:configure' - - if [ "$wxALLOW_WARNINGS" != 1 ]; then - # Under macOS TRAVIS_COMPILER is set to g++, but it's actually an - # alias for clang. - case "$(uname -s)" in - Darwin) - real_compiler=clang - ;; - - *) - # Elsewhere either gcc or clang can be used. - real_compiler="$TRAVIS_COMPILER" - ;; - esac - - case "$real_compiler" in - clang) - allow_warn_opt="-Wno-error=#warnings" - ;; - - gcc | g++) - allow_warn_opt="-Wno-error=cpp" - ;; - - *) - echo "*** Unknown compiler: $real_compiler ***" - ;; - esac - - error_opts="-Werror $allow_warn_opt" - wxMAKEFILE_CXXFLAGS="$wxMAKEFILE_CXXFLAGS $error_opts" - wxMAKEFILE_ERROR_CXXFLAGS=("CXXFLAGS=$error_opts") - else - wxMAKEFILE_ERROR_CXXFLAGS=() - fi - - wxMAKEFILE_FLAGS=() - if [ -n "$wxMAKEFILE_CXXFLAGS" ]; then - wxMAKEFILE_FLAGS+=("CXXFLAGS=$wxMAKEFILE_CXXFLAGS") - fi - if [ -n "$wxMAKEFILE_LDFLAGS" ]; then - wxMAKEFILE_FLAGS+=("LDFLAGS=$wxMAKEFILE_LDFLAGS") - fi - - echo 'travis_fold:start:building' - echo 'Building...' - make -k $wxBUILD_ARGS "${wxMAKEFILE_ERROR_CXXFLAGS[@]}" - echo 'travis_fold:end:building' - - echo 'travis_fold:start:tests' - echo 'Building tests...' - [ "$wxSKIP_GUI" = 1 ] || make -C tests $wxBUILD_ARGS failtest - make -k -C tests $wxBUILD_ARGS "${wxMAKEFILE_FLAGS[@]}" - echo 'travis_fold:end:tests' - - if [ "$wxSKIP_TESTING" = 1 ]; then - echo 'Skipping running tests' - exit 0 - fi - - echo 'travis_fold:start:httpbin' - httpbin_launch - echo 'travis_fold:end:httpbin' - - echo 'travis_fold:start:testing' - echo 'Testing...' - pushd tests - ./test || rc=$? - popd - echo 'travis_fold:end:testing' - if [ -n "$rc" ]; then - httpbin_show_log - exit $rc - fi - - if [ "$wxSKIP_GUI" = 1 ]; then - echo 'Skipping the rest of tests for non-GUI build.' - exit 0 - fi - - if [ "$wxUSE_XVFB" = 1 ]; then - echo 'travis_fold:start:testing_gui' - echo 'Testing GUI using Xvfb...' - pushd tests - xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui - popd - echo 'travis_fold:end:testing_gui' - fi - - echo 'travis_fold:start:samples' - echo 'Building samples...' - (test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make -k "${wxMAKEFILE_FLAGS[@]}" samples - echo 'travis_fold:end:samples' - - echo 'travis_fold:start:install' - echo 'Installing...' - sudo make install - echo 'travis_fold:end:install' - - echo 'travis_fold:start:testinstall' - echo 'Testing installation...' - make -C samples/minimal -f makefile.unx clean - make -C samples/minimal -f makefile.unx "${wxMAKEFILE_FLAGS[@]}" - echo 'travis_fold:end:testinstall' - ;; -esac From 346a31d545fbf815b30041610ce6c0387bd6a1cc Mon Sep 17 00:00:00 2001 From: PB Date: Thu, 15 Jul 2021 13:53:12 +0200 Subject: [PATCH 3/7] Remove TravisCI mentions from build scripts Travis CI is not used anymore, remove its mentions from the build scripts. --- .github/workflows/ci.yml | 2 -- .github/workflows/ci_msw_cross.yml | 2 -- appveyor.yml | 2 -- build/tools/before_install.sh | 2 +- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e906677e57..5fd1db851a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ on: paths-ignore: - '.github/workflows/ci_msw_cross.yml' - 'build/tools/appveyor*.bat' - - 'build/tools/travis-ci.sh' - 'distrib/**' - 'docs/**' - 'interface/**' @@ -25,7 +24,6 @@ on: paths-ignore: - '.github/workflows/ci_msw_cross.yml' - 'build/tools/appveyor*.bat' - - 'build/tools/travis-ci.sh' - 'distrib/**' - 'docs/**' - 'interface/**' diff --git a/.github/workflows/ci_msw_cross.yml b/.github/workflows/ci_msw_cross.yml index 5e12ebf652..57847cd1dd 100644 --- a/.github/workflows/ci_msw_cross.yml +++ b/.github/workflows/ci_msw_cross.yml @@ -8,7 +8,6 @@ on: paths-ignore: - '.github/workflows/ci.yml' - 'build/tools/appveyor*.bat' - - 'build/tools/travis-ci.sh' - 'distrib/**' - 'docs/**' - 'interface/**' @@ -27,7 +26,6 @@ on: paths-ignore: - '.github/workflows/ci.yml' - 'build/tools/appveyor*.bat' - - 'build/tools/travis-ci.sh' - 'distrib/**' - 'docs/**' - 'interface/**' diff --git a/appveyor.yml b/appveyor.yml index 7d7aa35a86..b9474da3cb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,8 +28,6 @@ skip_commits: - src/x11/ - '**/*.md' - .github/workflows/ - - .travis.yml - - build/tools/travis-ci.sh - build/tools/before_install.sh - build/tools/httpbin.sh diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index 541aafb95d..87b1fb0c94 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# This script is used by both GitHub and Travis CI to install the dependencies +# This script is used by GitHub to install the dependencies # before building wxWidgets but can also be run by hand if necessary (but # currently it only works for Ubuntu versions used by the CI builds). From a370de4caf63784978c29b16793ad103d3573c3f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Jul 2021 19:54:06 +0200 Subject: [PATCH 4/7] Remove checks for TRAVIS environments variable from the tests We don't use Travis CI any more, so this is now unnecessary. --- tests/test.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/test.cpp b/tests/test.cpp index 44e0dae1f1..cef50eaf67 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -365,16 +365,6 @@ extern void SetProcessEventFunc(ProcessEventFunc func) extern bool IsNetworkAvailable() { - // Somehow even though network is available on Travis CI build machines, - // attempts to open remote URIs sporadically fail, so don't run these tests - // under Travis to avoid false positives. - static int s_isTravis = -1; - if ( s_isTravis == -1 ) - s_isTravis = wxGetEnv(wxASCII_STR("TRAVIS"), NULL); - - if ( s_isTravis ) - return false; - // NOTE: we could use wxDialUpManager here if it was in wxNet; since it's in // wxCore we use a simple rough test: @@ -414,8 +404,7 @@ extern bool IsAutomaticTest() // Also recognize various CI environments. if ( !s_isAutomatic ) { - s_isAutomatic = wxGetEnv(wxASCII_STR("TRAVIS"), NULL) || - wxGetEnv(wxASCII_STR("GITHUB_ACTIONS"), NULL) || + s_isAutomatic = wxGetEnv(wxASCII_STR("GITHUB_ACTIONS"), NULL) || wxGetEnv(wxASCII_STR("APPVEYOR"), NULL); } } From 9aae8fc81f2ee46ea82e0fcff1e1d421b1509de0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Jul 2021 19:55:01 +0200 Subject: [PATCH 5/7] Remove checks for LXC containers used under Travis CI only As we don't use Travis CI any longer, we don't need these checks neither. --- tests/file/filetest.cpp | 5 ----- tests/filename/filenametest.cpp | 3 --- tests/test.cpp | 14 -------------- tests/testprec.h | 4 ---- tests/textfile/textfiletest.cpp | 5 ----- 5 files changed, 31 deletions(-) diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp index 0c38fe69ef..8902eb4d66 100644 --- a/tests/file/filetest.cpp +++ b/tests/file/filetest.cpp @@ -141,11 +141,6 @@ void FileTestCase::TempFile() // Check that GetSize() works correctly for special files. TEST_CASE("wxFile::Special", "[file][linux][special-file]") { - // LXC containers don't (always) populate /proc and /sys, so skip these - // tests there. - if ( IsRunningInLXC() ) - return; - // We can't test /proc/kcore here, unlike in the similar // wxFileName::GetSize() test, as wxFile must be able to open it (at least // for reading) and usually we don't have the permissions to do it. diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index e8e4fe1145..f14e58474f 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -949,9 +949,6 @@ TEST_CASE("wxFileName::Shortcuts", "[filename]") // Check that GetSize() works correctly for special files. TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]") { - if ( IsRunningInLXC() ) - return; - wxULongLong size = wxFileName::GetSize("/proc/kcore"); INFO( "size of /proc/kcore=" << size ); CHECK( size > 0 ); diff --git a/tests/test.cpp b/tests/test.cpp index cef50eaf67..d5699cffef 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -424,20 +424,6 @@ extern bool IsRunningUnderXVFB() return s_isRunningUnderXVFB == 1; } -#ifdef __LINUX__ - -extern bool IsRunningInLXC() -{ - // We're supposed to be able to detect running in LXC by checking for - // /dev/lxd existency, but this doesn't work under Travis for some reason, - // so just rely on having the environment variable defined for the - // corresponding builds in our .travis.yml. - wxString value; - return wxGetEnv("wxLXC", &value) && value == "1"; -} - -#endif // __LINUX__ - #if wxUSE_GUI bool EnableUITests() diff --git a/tests/testprec.h b/tests/testprec.h index 4467b7ee36..d3340eff03 100644 --- a/tests/testprec.h +++ b/tests/testprec.h @@ -147,10 +147,6 @@ extern bool IsAutomaticTest(); extern bool IsRunningUnderXVFB(); -#ifdef __LINUX__ -extern bool IsRunningInLXC(); -#endif // __LINUX__ - // Helper class setting the locale to the given one for its lifetime. class LocaleSetter { diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp index 4dfd597c18..f744ffc327 100644 --- a/tests/textfile/textfiletest.cpp +++ b/tests/textfile/textfiletest.cpp @@ -341,11 +341,6 @@ void TextFileTestCase::ReadBig() // correspond to the real amount of data in them, works. TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]") { - // LXC containers don't (always) populate /proc and /sys, so skip these - // tests there. - if ( IsRunningInLXC() ) - return; - SECTION("/proc") { wxTextFile f; From 278771e7d83c4e7aa8b30bbe1fead609922f7c6c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Jul 2021 19:57:23 +0200 Subject: [PATCH 6/7] Remove mention of .travis.yml in Git attributes file This file doesn't exist any longer. --- .gitattributes | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index ce295c8bd1..db93587921 100644 --- a/.gitattributes +++ b/.gitattributes @@ -42,5 +42,4 @@ build/upmake -diff .gitattributes export-ignore .gitignore export-ignore .gitmodules export-ignore -.travis.yml export-ignore appveyor.yml export-ignore From 63b4c5ee67703ee0a640080180e237311685adc4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Jul 2021 19:58:28 +0200 Subject: [PATCH 7/7] Remove checks for buildbot in the test suite buildbot is not used since a long time, so don't bother checking for it in IsAutomaticTest(). This commit is best viewed ignoring whitespace-only changes. --- tests/test.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tests/test.cpp b/tests/test.cpp index d5699cffef..0ee15c3b4b 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -391,22 +391,8 @@ extern bool IsAutomaticTest() static int s_isAutomatic = -1; if ( s_isAutomatic == -1 ) { - // Allow setting an environment variable to emulate buildslave user for - // testing. - wxString username; - if ( !wxGetEnv(wxASCII_STR("WX_TEST_USER"), &username) ) - username = wxGetUserId(); - - username.MakeLower(); - s_isAutomatic = username == wxASCII_STR("buildbot") || - username.Matches(wxASCII_STR("sandbox*")); - - // Also recognize various CI environments. - if ( !s_isAutomatic ) - { - s_isAutomatic = wxGetEnv(wxASCII_STR("GITHUB_ACTIONS"), NULL) || - wxGetEnv(wxASCII_STR("APPVEYOR"), NULL); - } + s_isAutomatic = wxGetEnv(wxASCII_STR("GITHUB_ACTIONS"), NULL) || + wxGetEnv(wxASCII_STR("APPVEYOR"), NULL); } return s_isAutomatic == 1;