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.
This avoids one of the two files which are currently causing macOS SCons
builds to fail in the master branch.
(cherry-picked from commit 8dc60ae98fa472d7a5fa124002f7b1a2f552e0f3)
Scons OpenGL/GLEW test taken mostly verbatim from 3e2eba22a96cb2c6c69ee5109059b806f22a372f
(cherry-picked from commit 5e36a90039ddde3625690ace5259198e1932a7f8)
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 63ff641662d4192401a49f9a002d7872000a3f02)
Though given 00d87f8fe4078ffd84fcdc0d73fcc2104efef1e7 I would say this is better than nothing.
(cherry-picked from commit 33ad6be326c234b173d680ce34589464f88f8418)
The intent behind this is that, if there most likely wouldn't be enough time left to complete the unit tests anyway, then just fail the job after compiling so the cache can be updated. Otherwise, if the unit tests were run and the job timed out, then the cache would not be uploaded at all and the next time the job ran it would be from scratch again.
(cherry-picked from commit 5d970e40cd43a23a8d1b8198e962f198fc9282b0)
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 92f74c39f6aedc10bd04f1cf6dc9144fb35e3a19)
This allows having multiple Dockerfile-base-* files without also needing to add a separate Dockerfile-travis-* file due to the FROM line changing.
(cherry-picked from commit 3f67c2fbf051aa9e322defb66c782477cd53b8bd)
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 1bb5fdf2830515d33793c52f298d305bd12b5a60)
utils/travis/install_deps.sh - no longer executes anything outside of the osx if block.
utils/travis/exit_wrapper.sh - I honestly don't know why this exists.
utils/travis/test_wrapper.sh - No longer used as of 7ca5a0df6449b4b895842566d33a38872f1f507e.
(cherry-picked from commit 344b5c56b90cffcbc9638bcb7535bb3e0f073da7)
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 b801140344c7cbf86980ff54ef963f9ec2122897)
Adds the CXX_STD variable which can be set. Currently defaults to 14. This also now makes cmake honor the CXXSTD env variable set on travis.
(cherry-picked from commit 983045718aa13a2b7b1b45bb37baa76a88a1d47e)
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.
This code ended up ignoring *all* MP test failures, in particular the one
fixed in commit 11d7b9f0cfe29ab6d6b5829c8e337b7cb67eeb18.
I'd test the code and fix it if I could, but unfortunately I can no longer
develop on GNU/Linux because of PC issues (which I mentioned in Discord).
Therefore I'm just reverting the entire change.
This also removes the included SHA1 and MD5 implementations
in favour of those from OpenSSL.
Thanks to @jyrkive for helping to get the CMake build working and
ensuring the game still compiles with OpenSSL 1.1.0.
(The SHA_xxx() aliases were removed in OpenSSL 1.1.0.)