We have a smallish C++ Linux project that accompanies our large C++/MFC Windows project. Currently, the Windows project uses CruiseControl.net and Visual Build Pro for managing continuous building and integration. We would like implement something to start our Linux project on the same path.
My question is, should I research using a separate Build tool for Linux or attempt to get Visual Build Pro to work by leveraging its automation and simply invoking a make script on a our Linux Build Machine to actually compile the project?
Even further, due to the size of the Linux project, would it be just easier to script it all including making snapshots and such?
While I don't know the complexity of the "integration" step in your project, the "building" step is in my experience best solved by a trivial shell script:
BUILDDIR=`mktemp -d`
svn checkout MY_REPOSITORY/trunk $BUILDDIR
cd $BUILDDIR
./configure
make all check
I've solved the integration test part with Dejagnu in my current project, works like a charm with another line of sh calling it.
Then insert this shell script into the daily run routine (e.g. by adding it to the crontab of a special CI user on the Linux machine) and forward all of the mail the CI user gets to the person responsible for watching the CI.
You can use jenkins or hudson to build on Linux box. This tools have integration with Source Control (svn, perforce, ...), cppunit ...
Related
I can able to use this Jacoco coverage in Windows machine. I want to know whether this works for Linux machine or not. If it works, tell me how. If it doesn't, please tell me the reason.
Thanks.
Jacoco is implemented in Java and usually ran from Maven or Ant or Jenkins, which are also implemented in Java. Java works on both Windows and Linux, so there should not be any issue with running Jacoco in Linux.
You could have issues with running your build, say under Maven, if your pom file definition contains Windows specific paths and settings. This would cause your build process to break, not the Jacoco run. If you manage to have a successful build in Linux then it should easy to get Jacoco to run as well.
I've been trying to migrate my whole test projects to Jenkins which includes both Windows and Qnx C++ codes. Since I'm trying to manage all the continuous integration from the windows platform, I installed jenkins only on the windows machine.
Inside Jenkins, I created 2 different jobs, one for windows related codes and the other for qnx related codes. For windows related codes, there is no problem on building, running and collecting gtest outputs like passed/failed results or code coverage. (I use Visual Studio with OpenCppCoverage tool, so inside Jenkins, msbuild plugin and some windows shell commands are enough to create results for cobertura and junit plugins)
However, for the qnx related part I have the problem:
(For qnx projects I'm using Qnx Momentics) Inside Jenkins, I checkout the project to the windows machine from subversion, and use "mkbuild" command (which works fine for windows). This builds the project automatically and create the executable on windows. But I could not manage to run the executable (on the target qnx machine) to collect the test results from Jenkins.
I have checked many plugins but couldn't find some to solve this problem.
Is there any option to do this?
Thanks in advance :)
One similar question was asked for hudson, and it was proposed there to use virtual machines and creating slaves for each one. Using different slaves may solve the problem, I will try this.
How to use hudson when building for multiple platforms
Hi I have some c/c++ projects under development and version controlled with git. I would like to make/find a web interface program, which should:
one button to build a bleeding edge target of the project.
view build errors/logs of each build.
export the build target (deb file for me) to a public location after a successful build.
Is there any existing/similar tool? or I should build my own one?
What you're talking about is continuous integration and there are many solutions available.
Continuous integration server such as Jenkins is a variant
Any suggestions? Code and artwork/assets are all in SVN, and we don't want to port it to GCC or another compiler before anyone suggests it!
Simplicity and minimising 3rd-party tools is preferred, since we don't have a build-server it'll probably still be run on a developer's PC but we don't want them just doing a build manually and packaging it up.
It's basically just a C++ solution with several projects, plus we have an Inno Setup installer to build.
Right now it's a 3-step process (or 4 if you include uploading the release to FTP):
Get from SVN
Build solution from VC++
Run Inno to create the packaged
installer
You can use MSVC pre, post & custom build steps to do this, they run programs through the windows command line. also see this: http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx
If you can't do it with the VS build steps (see Necrolis' answer), then in the past I've used makefiles run with nmake, which is included with VS (you need to start a command prompt with the right environment settings for VS - there's a shortcut on the start menu.)
Nowadays I use FinalBuilder ( http://www.finalbuilder.com/home.aspx ) for all this sort of stuff, which is expensive and doesn't meet your 'not 3rd party' desire, but is an excellent tool. Once you get into it, you'll realise that there are probably far more steps you'd like to do than merely compiling/packaging - you probably want to be incrementing version numbers, moving files around, creating directories, etc. FB is good at that sort of stuff.
I am adding up to date answer for other users:
Currently there is 3rd party extension available which integrates Inno Setup into Visual Studio and allows you to build installers directly from IDE (or from command line using MSBuild).
It is possible to use pre, post & custom build steps, batch files, code signing, running programs through the windows command line etc.
Check Visual Studio Marketplace for more info about Visual & Installer: https://marketplace.visualstudio.com/items?itemName=unSignedsro.VisualInstaller
We use a teamcity server to do CI for some things, we have started with some sharepoint web part development (again) and would like to integrate this into our CI system
Using WSPBuilder on the desktop works really well but I am not sure how to fire off the tasks on the CI server. Has anyone done this? Are there MSbuild targets around to do it... or how would I go about writing my own? (is that even possible!?)
Thanks
edit: if it is not clear I want WSPBuilder on the CI server to do the building of the WSP (ideally automating the desktop experience also so the CI server and developers machines are doing the same thing)
Yes - WSPBuilder was originally a command line tool and the VS plugin part of WSPBuilder is still just an interface on top of that without much functionality of its own - install WSPBuilder on your build server and you should be able to do everything you need with Exec tasks.