Build Server (Jenkins) Configuration



  • We have a Jenkins server 'master' running on OS X and a slave in a Windows (VirtualBox) VM. Most of the build process is working, using the following steps to test the plumbing:

    @export PATH="C:\Program Files\Git\bin":"C:\Qt\5.4\mingw491_32\bin":$PATH
    mkdir -p build
    cd build
    qmake $WORKSPACE/qt-project/gui-client.pro
    C:/Qt/Tools/mingw491_32/bin/mingw32-make.exe clean
    C:/Qt/Tools/mingw491_32/bin/mingw32-make.exe -f Makefile.Release@

    mkdir works because Git is installed with the "third radio button" which includes msysGit, allowing common UNIX commands to work in the Windows command line.

    Currently, the problem is that qmake runs, populating the 'build' folder with the generated makefiles, ui_*, etc. and the 'debug' and 'release' folders are created, but they are empty, resulting in build failure and a list of "Could not find ..." errors. Is there a path we are missing that is preventing qmake from generating these, or is is possible some additional permissions issue is at play?

    Would anyone with Windows admin experience, especially dealing with build servers, share your thoughts and any other suggestions you might have?

    The OS X configuration came together pretty painlessly so I'm happy to share those details if it would be helpful to anyone.

    Cheers all!
    Patrick



  • I now see this in the console following mingw32-make.exe:
    @g++.exe: error: ..qt-projectmain.cpp: No such file or directory
    g++.exe: fatal error: no input files@

    so I am guessing I have an issue with slashes :)



  • just in case this is helpful to anyone dealing with same, here is a working script Jenkins can now call from the master to run the build on the Windows slave:

    @export PATH="C:\Program Files\Git\bin":"C:\Qt\5.4\mingw491_32\bin":"C:\Qt\Tools\mingw491_32\bin":%PATH%
    mkdir -p build
    cd build
    qmake $WORKSPACE/qt-project/gui-client.pro -r -unix "CONFIG+=release"
    mingw32-make.exe clean
    mingw32-make.exe@

    the -unix on the qmake call was critical (oddly enough since this is running on a Windows server), otherwise the backslashes would be interpreted incorrectly.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.