wiki:KDEProblems/KDEMacPortsCI

Version 12 (modified by mkae (Marko Käning), 10 years ago) (diff)

--

Continuous Integration of KDE software on MacPorts

Currently there is an ongoing discussion on KDE-DEVEL about this topic. MacPort's key developers' expertise regarding the setup of their buildbots could perhaps be helpful for the KDE folks. On the other hand one might also run Jenkins on OSX and adapt its configuration to the KDE software's requirements.

Requirements for the CI system

This is an excerpt from Ben Cooksley's post on KDE-DEVEL on thread "Running KDE apps on Apple OS X":


The infrastructure we have for our Linux builds should be nearly completely portable to OSX without too much trouble (in theory at least - i've never done any compilation on OSX).

The actual requirements aren't written anywhere, but you might find the documentation I've written for the CI system to be of some use.

A basic run down of what the CI system needs however:

1) Python 2.x, with json and lxml support (for the scripts which conduct builds)

2) Java (for the Jenkins node agent itself)

3) RSync and SSH (for the transferral of completed builds between nodes)

4) Git, Subversion, Bazaar, wget and GNU Tar (to access source code)

5) GNU Patch (for applying custom patches, used in certain builds)

6) A compiler, usable by CMake, QMake and autotools based build systems

7) GNU Make, Automake, Autoconf (for carrying out the build, and configuring it in certain rare cases)

We'll need to make adjustments to ensure the system doesn't attempt to launch Xvfb or a X11 Window Manager, which it currently will do when executing tests. These should be fairly easy to do however.

To build certain projects, the compiler will need to support C# and a certain level of C++11 as well. The Mono bindings will not be buildable if C# support is unavailable.

Under no circumstance should a CI node have Qt installed at the system level in any form, as this is provided directly by the CI system itself.


Checking on the above requirements in the current MacPorts tree shows that all necessary tools are available.
Which versions of these programs can be used with KDE's current CI system has to be checked step by step.

The only problem seems to be C# support. But those projects will probably only be running on Windows anyways.

Discussion about getting a non-MacPorts Qt5 installation

[23:46] <bcooksley> Thibrom: we should be able to arrange that, once we've got a Mac platform ready
[23:47] <Thibrom> okay, that's nice
[23:47] <bcooksley> you could help speed that up
[23:47] <bcooksley> by finding out if the scripts are able to build Qt 5 and up
[23:47] <Thibrom> yep if i can help for anything tel me
[23:47] <bcooksley> I assume GCompris only needs Qt 5 / Qt 4?
[23:47] <Thibrom> yes it's only based on Qt5
[23:47] <Thibrom> no other dependencies
[23:49] <bcooksley> okay, the first step then
[23:49] <Thibrom> i didn"t see something about qt5 in the scripts 
[23:49] <Thibrom> like in QT_PLUGIN_PATH
[23:50] <bcooksley> the scripts determine a lot of stuff dynamically at runtime
[23:50] <bcooksley> they use branch groups and dependency files to determine what is needed
[23:51] <bcooksley> you can see the commands used to build Qt 5 at config/build/qt5/
[23:51] <bcooksley> all you should need to do is clone the repo
[23:51] <bcooksley> checkout the production branch
[23:52] <bcooksley> then run update-setup.sh to clone in the other repos and bits it needs
[23:52] <bcooksley> after that
[23:52] <bcooksley> you can run python tools/prepare-environment.py --project qt5 --branchGroup kf5-qt5 --platform darwin-mavericks --sources /path/to/directory/where/qt5/will/be/built
[23:53] <bcooksley> and then python tools/perform-build.py --project qt5 --branchGroup kf5-qt5 --platform darwin-mavericks --sources /path/to/directory/where/qt5/will/be/built
[23:53] <bcooksley> you might need to give me an SSH key though
[23:53] <Thibrom> okay thanks for all that informations, where can i get those scripts?
[23:53] <bcooksley> git://anongit.kde.org/websites/build-kde-org
[23:54] <bcooksley> as the scripts work by sharing build materials between nodes
[23:54] <bcooksley> they use a workspace on the main build.kde.org server for that, which is accessed via ssh
[23:54] <Thibrom> i cloned the repo thakns
[23:55] <mk_MP> bcooksley: Is the above written down on some web page or do I have to copy your last 10 lines in case I manage to get my Mavericks VM set up?

May 13th 2014: User Thibrom has managed to get successfully started with the installation of above mentioned CI scripts using MacPorts by installing the ports listed in section "Requirements for the CI system".

OSX virtualisation

When setting up build-slaves it might be a good idea to not only have several Apple machines in real hardware, but perhaps also make use of some virtual OSX machines. This might speed up especially the test of various environments or give opportunity for an easy backup of the complete CI system.

See SOFTWARE LICENSE AGREEMENT FOR OS X MAVERICKS:


If OS X Mavericks is pre-installed “you are granted a limited, non-exclusive license to install, use and run one (1) copy of the Apple Software on a single Apple-branded computer at any one time”.

If OS X Mavericks is downloaded from the Mac App Store, “you are granted a limited, non-transferable, non-exclusive license (i) to download, install, use and run for personal, non-commercial use, one (1) copy of the Apple Software directly on each Apple-branded computer running OS X Mountain Lion, OS X Lion or OS X Snow Leopard (“Mac Computer”) that you own or control; … (iii) to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using OS X Server; or (d) personal, non-commercial use.”