Skip to content

(release 30)fix enhance travis ci setup#283

Merged
SlySven merged 2 commits intoMudlet:release_30from
SlySven:(release_30)FixEnhance_TravisCISetup
Nov 17, 2015
Merged

(release 30)fix enhance travis ci setup#283
SlySven merged 2 commits intoMudlet:release_30from
SlySven:(release_30)FixEnhance_TravisCISetup

Conversation

@SlySven
Copy link
Copy Markdown
Member

@SlySven SlySven commented Nov 16, 2015

This revises the Travis C.I. setup to:
Build all combinations of:

  • MaoOs vs. Linux
  • CMake vs. QMake project files
  • G++ vs Clang++ compiler
    Doing this has found a couple of small bugs in TRoomDB which the second commit fixes.
    In testing we can have 5 (five) sub-builds active at a time and currently it takes around 11 minutes to do a full build.

The Linux build is using the older "non-container" build as it uses sudo to tweak somethings that the new "container" based one does not allow. I did try to migrate to the new (faster, more resources 2 cores per VM & 4GB vs. 1.5 cores & 3GB) but I found it impossible to setup the package selection we want.

I have made both this and the release_30 version much more similar - I have ported the development one's use of boost 1.55 libraries to this one which had a confusing mix of 1.46 & 1.48 even after upgrading {it seems the default Ubuntu "Precise Pangolin" (12.04 LTS) distribution that is used has some oddities in that regard}.

Importantly the CMake project files now have a chance of working on both Linux and MacOs - which is nice because they were written from a mainly Windows perspective as far as I can tell. This was causing issues with the lua-zip module which is not readily available in a compiled for the MaoOs platform - so we #include d it as originally luazip.c into TLuaInterpreter.cpp for just that platform, but which meant we also have to track down and include the zziplib library as well. Also problematic was the zip library as we had it down as a '"..."' type include rather than a '<...>' and included it's own internal zipconf.h header ourselves - which is NOT necessarily stored in the obvious place {INCLUDE directory) but rather a subdirectory of the LIBRARY directory. Since it uses pkg-config though the recommended process is to use that - which CMake has support for - so that is what I have done on the "APPLE" platform only.

FWIW The Travis system uses only Qt 5.0.2 for the Linux platform - which in it's way is a good check for ensuring maximum compatibility with all Qt5 versions - the MacOs platform currently seems to be using at least 5.5 at the time of writing. For some obscure reason though, the combination of Clang and CMake on the Linux builds objects to something in the Qt headers for that version and consistently errors out. Fortunately I now understand enough of how to configure Travis so that we can "allow_failure" for just that combination. I could have prevented that combo from running but until it becomes more clearer why, I thought it was best to leave it in place.

This and it's companion #282 should be OK to go in without messing with any other PR as far as I can tell.

This commit is a rebase of a whole series that I put out to achieve
everything it now does. This message should represent a reasonable
summary of the end results.

Split the Linux build into two separate process using the qmake and cmake
project files.  Whilst the previous code for the qmake file worked with
the MacOs platform it was not possible to build Mudlet with the cmake
project files.  This commit tweaks various things so that it now does.

For Macintosh computers there is not an easy way to obtain the lua zip
module as a pre-compiled package so we have to include the source code
ourselves.  In checking this I found that we did not have all the text
that I think we needed to satisfy the terms of the Licence (which is NOT
GPL, though stated to be compatible with it).

Added the CMake project and some related files to the qmake project file
so that they can be found and edited whilst working in QtCreator from that
file.

Clean up a couple of things spotted during C.I. compilations:

* In TRoomDB::__removeRoom(int id) there was an ambiguous logic construct
which needed some parenthesis to clarify the intent.

* In TRoomDB::setAreaName(int areaID, QString name) an erronous printf
format specifier was included in a debug warning message.

* The CMake build version variable was out of date and did not match the
QMake one - given that CMake is the likely build method for Windows it
suggests that there might be preview version in the field that declare
themselves to be "3.0.0-beta" when they are actually "-gamma" or "-delta"
versions!

Include some Travis files into the project file so that they show up in the
Qt Creator IDE (as they now do in the other branches version).

Copy across the QMAKE_CXXFLAGS and other tweaks from the other branch
version. This includes the C++11 enabling Qt switch.

MacOs C++11 support seems to need MacOs >10.6 though I could easily be wrong!

Change Travis setup to use both CLang & GCC: since we are testing
compilers we can try doubling the build matrix to use both Clang and GCC
compilers...

I've removed qt4-dev tools from the Linux lineup as we no longer support
it and it is more tricky to work with both Qt4 and Qt5 development tools
in place.

The GCC update for Linux was ported from Development branch of code.

Remove old boost packages from Linux Travis Builds as I found that the
explicitly numbered libboost1.46 package was not being replaced by
unnumbered upgrade (1.48) and I think that was causing compilation
problems for the Linux qmake entries in the CI matrix.

Put in a command to purge the unused auto-dependences that the qt4
removed items orphans - which otherwise meant time was being spent
upgrading pointlessly the unremoved ones.

As it seems there is a problem in the Qt 5.0.2 libraries that the Linux
clang compiler objects to but the gcc 4.7 does not when run via cmake I
have put in an "allow failure" for that row of the build matrix.

Also ensure boost 1.48 is installed uniformly, the default seems to mix
up 1.46 and 1.48 components.

The test platform only has Qt5.0.2 for Linux and this, used with CMake,
seems to fail internally within the Qt header files.

Also added a couple of lines to report the compiler to be used AFTER it
may have been updated during the installation stages (the system does
report it but AT THE BEGINNING before package updates are carried out).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
In TRoomDB::__removeRoom(int id) there was an ambiguous logic construct
which needed some parenthesis to clarify the intent.

In TRoomDB::setAreaName(int areaID, QString name) an erronous printf
format specifier was included in a debug warning message.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@vadimnehta
Copy link
Copy Markdown

+1

SlySven added a commit that referenced this pull request Nov 17, 2015
…etup

(release 30)fix enhance travis ci setup
@SlySven SlySven merged commit 6555207 into Mudlet:release_30 Nov 17, 2015
@SlySven SlySven deleted the (release_30)FixEnhance_TravisCISetup branch March 26, 2017 21:18
mehulmathur16 pushed a commit to mehulmathur16/Mudlet that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants