Reputation: 810
I have a solution with 4 projects:
Looking at general documentation, C# Travis CI docs and C++ docs cant get how to solve such multylingual project problem.
I can create CMake project for C++ library and wraper. But what shall I do next, how to solve next problems:
Upvotes: 13
Views: 1981
Reputation: 845
I suggest you to set up your Travis configuration as C# (ie. language: csharp
). With this, your project will be integrated in a C# environment with all the necessary tools. For your two C++ projects, it should not be too difficult to install mandatory tools. It as simple as a sudo apt-get install g++ cmake
(and other required packages). You have to do this in the install
section of your .travis
file.
Note: The exact manner to install missing packages may vary depending if you use the docker-based Travis infrastructure or the legacy one.
Then, in the script
section, you can build your c++ projects with cmake and then build your C# projects.
Upvotes: 0
Reputation: 921
If you are using Visual Studio to build your C++/C#/VB/other solutions, you should use MSBuild as the CI build tool. See: https://msdn.microsoft.com/en-us/library/dd393574.aspx
MSBuild may be used to build project files in Visual Studio (.csproj,.vbproj, vcxproj, and others). However, it is not recommended. Instead, MSBuild should build Visual Studio solutions (.sln) directly. The main reason is that this way the Visual Studio IDE (used by developers) and MSBuild command line (used by CI system) build a solution exactly the same way. Secondly, changing configuration will be in one and only one place when changing projects by using the Configuration Manager in IDE.
MSBuild XML script example:
<Target Name="BUILD_SOLUTION">
<MSBuild Projects="$(SOLUTION_NAME).sln" Properties="Configuration=Release;Platform=Win32"/>
<MSBuild Projects="$(SOLUTION_NAME).sln" Properties="Configuration=Release;Platform=x64"/>
</Target>
Remember to Set Project Dependencies and Check Project Build Order. For examples,
MSBuild Properties="Configuration=x;Platform=y"
maps to Configuration Manager. Remember to set all Configuration and Platform combinations:
Upvotes: 3