For whatever reason the existing limit of 200MB is no longer enough, resulting in a significant number of cache misses, which results in partial rebuilds taking far longer than they should.
Problem: msbuild uses timestamps to determine what needs to be rebuilt, and git doesn't track files' last modified time, so everything is always fully rebuilt.
Solution: This commit adds an sqlite database that tracks C/C++ files and their md5 hashes. If a file's hash hasn't changed, then it doesn't need to be rebuilt, so its last modified time is backdated 20 years. The 20 years is an arbitrarily chosen amount of time and has no special significance.
This also removes the separate WML_tests.cmd scripts from VC14 and VC16, now instead using the same run_wml_tests script as the linux jobs.
There is currently no caching of the Windows jobs, since msbuild unfortunately uses timestamps rather than more complete information like scons/ccache in order to determine if things need to be rebuilt. Since git doesn't preserve any sort of last modified timestamp, the cloned repo into the travis job is always "newer" than the cached compiled output, and therefore wesnoth is always fully rebuilt.
Ideally, assuming this sticks around and gets out of early access from travis, we could then use just travis instead of travis and appveyor.
Of note:
* The image now created by Dockerfile-base-mingw is available on wesnoth's Docker Hub.
* Strict building is disabled, as there are a couple warnings that show up when crosscompiling.
Steps:
1) added `brew install libffi`, was told it was already installed and to try reinstalling.
2) changed to `brew reinstall libffi`, was told it was "keg only" and was provided the PKG_CONFIG export statement.
3) added export statement, seems to work.
Use unbuffer to work around a travis issue when a secret is set in .travis.yml: https://github.com/travis-ci/travis-ci/issues/7967
As a bonus colored output of for example cmake now works again.
Also streamline test execution.
This adds running the WML schema validation in travis. It also updates the schema itself and fixes a few WML errors so that core and all campaigns under all difficulties pass the schema validation.
Travis now also makes use of this to set the optimization level for the -O0 builds, rather than extra_flags_*. This additionally fixes an issue where using -O0 in the release build with LTO resulted in the individual *.o files being compiled with -O0, but LTO then still linked with release's default -O3.
(cherry-picked from commit 63ff641662)
Note: UBSan at least does seem to take a fairly significant amount of extra time to compile and run the WML tests with.
(cherry-picked from commit 92f74c39f6)
This makes it simpler in the future to have branches that have dependencies that are different from master, rather than having a single image with all necessary dependencies installed, which may at some point end up not being possible to do.
(cherry-picked from commit 1bb5fdf283)
This removes the -g option from the xcode travis build, since debugging information isn't needed and the increased size was causing the cache to timeout when compressing and uploading it. ccache max cache size is also decreased from 2 GBs to 200 MBs, which matches the linux+cmake builds. Fixes#2670.
(cherry-picked from commit b801140344)
Currently will remain disabled everywhere, but this allows for enabling LTO for optimized, non-xcode jobs just by changing the value of the LTO variable.
Moving it out of the same directory as the git repository means that the object files won't be copied into the temporary docker container when it's being created.
Currently the MP unit tests will randomly fail due to one of the two background wesnoth instances failing video initialization. All unit tests require the display server to be initialized however, or they fail with the same error as the MP tests sometimes fail with. However, the MP tests are the only tests to randomly fail due to video initialization, while for the same travis job the WML unit tests (which run before) and the boost unit tests (which run after) are still able to be successfully completed.
Therefore, the video initialization failures are not entirely random, and the MP tests are also the only tests that experience this failure while also being the only tests that have more than one instance of wesnoth running simultaneously.
tl;dr: the attempted solution here is to sleep for 5 seconds between starting background processes in the mp unit test script.
Also removes starting the display server prior outside of the docker container, since that's not needed anymore.
Travis runs all commands in .travis.yml in its own wrapper script, so by sourcing steps/script.sh and then using exit explicitly, it resulted in the entire travis wrapper immediately terminating. With steps/script.sh no longer sourced, using exit works as expected again, and only exits steps/script.sh rather than quitting everything. Another solution, should sourcing steps/script.sh become necessary, is to use return instead of exit.
With that addressed, it's then possible to re-add printing the ccache statistics after the build ends while also making sure that the script exits with the return code of the xcodebuild/cmake+make command rather than the return code of the ccache statistics commands.
Travis looks at the return code of the final command run, and since printing the ccache statistics never fails, building would never be considered as failing. Manually calling exit also causes travis to treat the build as errored, since by sourcing the build it results in the entire travis wrapper shell exiting.