Commit Graph

250 Commits

Author SHA1 Message Date
Vadim Zeitlin
1b76ff4887 Disable wxWebRequest tests on CI platforms without Python 3
This currently means macOS 10.11 only, which is only used on Travis CI
and Python 2 installation there is broken anyhow, so this doesn't make
anything worse than it already is.
2021-05-17 01:26:32 +02:00
Vadim Zeitlin
f3b275321c Update comment to mention GitHub CI too
No real changes.
2021-04-16 19:23:28 +02:00
Vadim Zeitlin
994400eb17 Don't dump apt preferences in the CI build logs
This doesn't seem very useful and results in a lot of output.
2021-04-16 19:13:00 +02:00
Vadim Zeitlin
15aaf9a163 Stop installing debug repository apt key manually
This shouldn't be necessary any longer, as the corresponding Ubuntu bug
(https://bugs.launchpad.net/bugs/1920640) is supposed to be fixed.
2021-04-16 19:10:16 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Vadim Zeitlin
d01760ae41 Ignore apt-get update error in Travis CI build
For now just ignore it, it might be better to prune the repositories we
don't need, such as https://downloads.apache.org/cassandra/debian, which
result in the errors.
2021-04-12 21:04:21 +02:00
Vadim Zeitlin
e5011b46ae Recognize clang correctly in macOS Travis CI builds
It is called g++, but is actually always clang, so don't even bother
checking "g++ --version" output.
2021-04-06 18:49:29 +02:00
Vadim Zeitlin
8bc2ff71e2 Recognize g++ as value of TRAVIS_COMPILER
In macOS builds TRAVIS_COMPILER is set to g++ and not gcc, which
resulted in not handling it correctly and giving a bogus warning.
2021-04-06 18:45:52 +02:00
Vadim Zeitlin
7063813b59 Hardcode versions of all httpbin dependencies under Trusty
Python package hosting seems to randomly decide which version of the
package to return to pip running under Trusty: in addition to werkzeug
(see last commit), the version of flask has spontaneously changed from
1.0 to 1.2 in the latest build too.

Just hardcode the versions of all dependencies in the last successful
build and hope they keep working for longer than a day.
2021-04-05 17:56:09 +02:00
Vadim Zeitlin
c7c60877e4 Fix another dependency problem with httpbin and Python 3.4
Crazily, pip installs seem to be non-deterministic as installing httpbin
in https://travis-ci.org/github/wxWidgets/wxWidgets/jobs/765946720
pulled in werkzeug 0.16.1 which works with Python 3.4, but doing it
again tries to use werkzeug 1.x which isn't.

Fix the version explicitly to work around this.
2021-04-05 17:21:53 +02:00
Vadim Zeitlin
f024551395 Use Python 3 for httpbin installation under Ubuntu Trusty
Trying to use Python 2 under Trusty is hopeless, as pythonhosted.org has
already started dropping support for non-SNI clients and will drop it
completely soon, see https://status.python.org/incidents/hzmjhqsdjqgb
and https://github.com/pypa/pypi-support/issues/978, and SNI is not
available in the system Python 2 version (2.7.6, which is less than
2.7.9 in which it was added).

Note that we still can't use Python 3 everywhere as long as we have
macOS 11 builds as it's not available there.
2021-04-05 16:36:56 +02:00
Vadim Zeitlin
0bc1dbf218 Use user mode for pip upgrade
This is default for some platforms, but not everywhere, so use it
explicitly.

This should fix the error in Travis CI S/390 build.
2021-04-04 14:16:30 +02:00
Vadim Zeitlin
ee5a8096bd Install pip if it's not available at all
This is not supposed to happen, but somehow it does on Travis CI, so try
to remedy this by installing pip via apt if it's missing.
2021-04-04 01:53:29 +02:00
Vadim Zeitlin
21c97d155a Show pip version used for installing httpbin in the logs 2021-04-04 01:45:01 +02:00
Vadim Zeitlin
5498668514 Don't use broken pip version 20.0
Pip continues to impress with version 20 being completely broken and not
running at all.

Try the next one, which is supposed to fix this bug.
2021-04-04 01:43:50 +02:00
Vadim Zeitlin
c7961fa666 Don't upgrade pip to a version which is too new
Amazingly, updating a package has no problems with installing a newer
version incompatible with the current Python version, such as installing
pip 21 when using Python 3.5.
2021-04-04 01:43:50 +02:00
Vadim Zeitlin
d5d28e639e Attempt to make pip install actually work by upgrading it first
Old pip versions don't work when used with python3, so upgrade pip
before trying to use it.
2021-04-04 01:43:12 +02:00
Vadim Zeitlin
da0f6bd2a6 Use Python 3 for running httpbin in non-Trusty Linux CI builds
Even Ubuntu 16.04 has Python 3 and pip3, so just use them instead of
trying to work around problems with Python 2.
2021-04-04 01:25:04 +02:00
Vadim Zeitlin
2b89215eec Extract function for launching httpbin into its own file
Allow reusing it between GitHub and Travis CI.

Also show httpbin log in Travis CI logs too, not just on GitHub.
2021-04-04 01:00:35 +02:00
Vadim Zeitlin
7603e2b7ce Another attempt to fix httpbin in Travis CI Trusty build
Somehow installing decorator==4.4.2 worked a few times, but then stopped
and now fails with

	Could not find a version that satisfies the requirement
	decorator==4.4.2 (from versions: )

	No matching distribution found for decorator==4.4.2

Try using explicit URL.
2021-04-03 23:17:39 +02:00
Vadim Zeitlin
b78508615a Explicitly install decorator 4.4.2 as httpbin dependency
The latest version doesn't work with Python 2 any more and installing it
breaks Travis CI builds still using Python 2.
2021-04-03 19:41:55 +02:00
Vadim Zeitlin
6aac8fcf1f Don't use lsb_release under non-Linux platforms in Travis script
Avoid the error about command not being found.
2021-04-03 19:36:44 +02:00
Vadim Zeitlin
7d9b01afd9 Disable SSL certificate validation for pip in Trusty CI build
Trusty Python is too old to support SNI, so the new certificate used by
files.pythonhosted.org doesn't validate. Just disable checking it there.
2021-03-23 23:23:29 +01:00
Vadim Zeitlin
9b4852eef6 Install gdb for the CI builds
We can need it to get the backtrace in case of a crash.
2021-03-23 16:15:00 +01:00
Vadim Zeitlin
a47bb47165 Disable leak detection if debug symbols are unavailable
There just doesn't seem to be any way to make this work right now, so
handle dbgsym packages installation failure and disable leak detection
in this case.

Hopefully ddebs.ubuntu.com repository will be updated in the future,
allowing this to work again.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
c471699187 Show apt sources and preferences used in the CI builds
This may be useful to understand where do the packages come from.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
51d796b88b Exit on first error in the before_install script
Any errors here are really fatal.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
9cb28353e7 Add a helper function to run apt-get
This simplifies the script and allows to log the commands in the build
log.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
d61719edde Show packages not being installed in the build log 2021-03-23 14:09:05 +01:00
Vadim Zeitlin
bc7a7b0c2d Hide confusing output from "tee --append"
This is used to just append to the file, not actually to see the output
of our own echo commands.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
4900c5e5b8 Don't use release-proposed repository for debug symbols
This seems to be unnecessary, as -proposed is not used for the actual
packages.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
899a5251fb Run apt-get more quietly
Avoid unnecessary progress messages about reading the database.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
ce1d6162f7 Run apt-get install only once and not twice
Add -dbgsym packages to extra_deps and pass them to the same apt-get
command we use for installing all the other dependencies.

This is slightly faster and also makes it simpler to pass extra options
to apt-get, as we're going to do in the next commit.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
4dae461183 Move ASAN-specific packages installation
No changes yet, just reorganize things to make upcoming changes simpler.
2021-03-23 14:09:05 +01:00
Vadim Zeitlin
b5f7ed2169 Manually update expired key for ddebs.ubuntu.com repository
Retrieve the latest key, which was extended for another year.

See https://bugs.launchpad.net/ubuntu/+source/ubuntu-keyring/+bug/1920640
2021-03-22 23:23:56 +01:00
Vadim Zeitlin
a5afa85c0a Always use pip for installing httpbin in Travis CI builds
Using Docker just doesn't work: simply running "docker pull" fails due
to the pull rate limits all the time, see e.g.

https://travis-ci.org/github/wxWidgets/wxWidgets/jobs/759810039#L2628

while following Travis own instructions for dealing with this problem at

https://blog.travis-ci.com/docker-rate-limits

results in the build failure due to secret environment variables not
being accessible from the PRs for security reasons, see

https://travis-ci.org/github/wxWidgets/wxWidgets/jobs/759820694

So use pip everywhere, even under Ubuntu 14.04, where it doesn't work
out of the box as it tries to install globally when it doesn't have the
permissions to do it.
2021-02-21 14:57:10 +01:00
Vadim Zeitlin
e848c54f0f Use pip for installing httpbin in most Travis CI builds
Using docker results in errors due to rate limit on pulling, so try to
reduce its use as much as possible. It still has to be used under Ubuntu
14.04 because it has a version of Python too old to work with HTTPS
servers using SNI and so using pip fails there.
2021-02-15 22:24:10 +01:00
Vadim Zeitlin
d1810b0dce Remove setup0.h files
Simplify things by putting setup.h files themselves under version
control and getting rid of setup0.h ones.

The initial motivation for using separate setup0.h files was to allow
having local changes to setup.h, but with Git there is a simple way to
do it by using "git update-index --skip-worktree include/wx/msw/setup.h"
for example, so we don't really need setup0.h any more and dropping them
makes things simpler.
2021-01-31 19:02:56 +01:00
Vadim Zeitlin
2aba3ad0e1 Ignore leak from atk_bridge_adaptor_init() when using ASAN
There doesn't seem to be any way to avoid calling it or freeing
(multiple) memory blocks allocated by it.
2021-01-31 17:33:04 +01:00
Vadim Zeitlin
0718f641f5 Install more debug symbols for ASAN builds
Install glib and gtk symbols which are required to get full information
from the LeakSanitizer stack traces.
2021-01-31 17:32:34 +01:00
Vadim Zeitlin
f31a064848 Install libcurl to make it available in the CI builds
It's not installed by default at least on GitHub Actions images.
2021-01-28 00:04:39 +01:00
Vadim Zeitlin
8e8a86aed0 Fix return code from testing script in case of error
Using type reset %errorlevel% and the errors were not detected any
longer.
2021-01-27 14:56:29 +01:00
Vadim Zeitlin
b394bb1b87 Show httpbin output if the test failed, not if it succeeded
This output is mostly useful for diagnosing errors, so it's not very
useful to show it only after successful test completion in after_test
command.
2021-01-27 10:01:53 +01:00
Vadim Zeitlin
623c4811ab Run httpbin in appveyor.yml to be able to stop it later
There is no way to stop a background task simply and safely with
cmd.exe, but in appveyor.yml we can use PowerShell, so use its job
support to do it instead.

This is important because AppVeyor waits until all jobs launched by the
script terminate, so without stopping the background job all builds
waited for an hour before timing out.
2021-01-26 22:50:43 +01:00
VZ
75b4f5439a
Fix setting WX_TEST_WEBREQUEST_URL in AppVeyor builds
Don't use quotes around the value, they're not special for cmd.exe
and remain part of the actual variable value.

Co-authored-by: Maarten <MaartenBent@users.noreply.github.com>
2021-01-25 18:22:40 +01:00
Vadim Zeitlin
32cdda65bb Use pip for httpbin in Mac Travis CI builds
Docker isn't available under Mac, unfortunately.

Notice that it's still better to use Docker if it is available, rather
than using pip everywhere, as pip has trouble installing httpbin in the
Ubuntu 14.04 build, for example.
2021-01-25 00:25:04 +01:00
Vadim Zeitlin
9307fa6f89 Run httpbin locally for the tests in the CI builds
Run httpbin (either directly or inside a container) and set
WX_TEST_WEBREQUEST_URL to point to localhost.

Note that it is important _not_ to have a trailing slash in the root
URL, otherwise WebRequest::Auth::Digest test would fail.
2021-01-24 19:04:41 +01:00
Maarten Bent
71c4653b94 Enable wxUSE_WEBVIEW_EDGE in an AppVeyor test 2021-01-19 22:43:08 +01:00
Maarten Bent
564f9d6037 Specify tests to exclude in CI CMake builds
Escape the | in AppVeyor bat file to prevent errors.
2021-01-19 19:58:46 +01:00
Maarten Bent
b51d146adf Run ctest in correct directory on Travis CI 2021-01-19 19:58:46 +01:00