Browse Source

package: Jenkins CI configuration.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
efa1647571
  1. 24
      doc/building.dox
  2. 90
      package/ci/jenkins-gltests.xml
  3. 172
      package/ci/jenkins.xml

24
doc/building.dox

@ -385,6 +385,30 @@ depending projects.
If you have Node.js installed, you can also build and run unit tests using
`ctest`. See `BUILD_TESTS` above.
@section building-ci-jenkins Jenkins Continuous Integration
In `package/ci/` there are `jenkins.xml` and `jenkins-gltests.xml` files
containing job configuration, one for build and non-GL tests and the other for
GL tests only. Setup your Jenkins server, enable the **Git** and
**Text-finder** plugin and download the CLI application from here:
http://your-jenkins-server/cli
Then add new jobs or update existing ones (replace `<command>` with `create-job`
or `update-job`).
java -jar jenkins-cli.jar -s http://your-jenkins-server <command> Magnum < jenkins.xml
java -jar jenkins-cli.jar -s http://your-jenkins-server <command> Magnum-GLTests < jenkins-gltests.xml
Build is done using **Ninja** build system and everything possible is enabled,
thus you need also **SDL2**, **GLUT** and **OpenAL** libraries. It expects that
**GCC** >=4.8.2, 4.7, 4.6 and **Clang** are installed and there are **OpenGL**,
**OpenGL ES 2.0** and **OpenGL ES 3.0** librares as it tries to compile the
library with every combination of them. You can add/remove the axes in
`axes/hudson.matrix.TextAxis` or via the web interface later.
Magnum-GLTests depend on active X11 session, thus they should be run from
Jenkins instance running on graphical user session.
*/
}

90
package/ci/jenkins-gltests.xml

@ -0,0 +1,90 @@
<?xml version='1.0' encoding='UTF-8'?>
<matrix-project>
<actions/>
<description></description>
<logRotator class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>10</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<customWorkspace>Magnum</customWorkspace>
<axes>
<hudson.matrix.TextAxis>
<name>compiler</name>
<values>
<string>g++</string>
<string>g++-4.7</string>
<string>g++-4.6</string>
<string>clang++</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>libraries</name>
<values>
<string>static</string>
<string>dynamic</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>compatibility</name>
<values>
<string></string>
<string>deprecated</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>gl</name>
<values>
<string>desktop</string>
<string>es2</string>
<string>es2desktop</string>
<string>es3</string>
</values>
</hudson.matrix.TextAxis>
</axes>
<builders>
<hudson.tasks.Shell>
<command>
<![CDATA[
cd build-${compiler}-${libraries}-${compatibility}-${gl}
ctest --output-on-failure -R GLTest || true
]]>
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.plugins.textfinder.TextFinderPublisher plugin="text-finder@1.9">
<regexp>Errors while running CTest</regexp>
<succeedIfFound>false</succeedIfFound>
<unstableIfFound>true</unstableIfFound>
<alsoCheckConsoleOutput>true</alsoCheckConsoleOutput>
</hudson.plugins.textfinder.TextFinderPublisher>
</publishers>
<buildWrappers/>
<executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
<runSequentially>false</runSequentially>
<touchStoneCombinationFilter>
<![CDATA[
compiler == "g++" && libraries == "dynamic" && compatibility == "deprecated" && gl == "desktop"
]]>
</touchStoneCombinationFilter>
<touchStoneResultCondition>
<name>SUCCESS</name>
<ordinal>0</ordinal>
<color>BLUE</color>
<completeBuild>true</completeBuild>
</touchStoneResultCondition>
</executionStrategy>
<childCustomWorkspace>.</childCustomWorkspace>
</matrix-project>

172
package/ci/jenkins.xml

@ -0,0 +1,172 @@
<?xml version='1.0' encoding='UTF-8'?>
<matrix-project>
<actions/>
<description></description>
<logRotator class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>10</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>git://github.com/mosra/magnum.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions>
<hudson.plugins.git.extensions.impl.CloneOption>
<shallow>true</shallow>
<reference></reference>
</hudson.plugins.git.extensions.impl.CloneOption>
</extensions>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<customWorkspace>Magnum</customWorkspace>
<axes>
<hudson.matrix.TextAxis>
<name>compiler</name>
<values>
<string>g++</string>
<string>g++-4.7</string>
<string>g++-4.6</string>
<string>clang++</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>libraries</name>
<values>
<string>static</string>
<string>dynamic</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>compatibility</name>
<values>
<string></string>
<string>deprecated</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>gl</name>
<values>
<string>desktop</string>
<string>es2</string>
<string>es2desktop</string>
<string>es3</string>
</values>
</hudson.matrix.TextAxis>
</axes>
<builders>
<hudson.tasks.Shell>
<command>
<![CDATA[
mkdir -p build-${compiler}-${libraries}-${compatibility}-${gl}
cd build-${compiler}-${libraries}-${compatibility}-${gl}
if [ ${libraries} = "static" ] ; then
static_build_flag="-DBUILD_STATIC=ON -DBUILD_STATIC_PIC=ON"
fi
if [ "${compatibility}" = "deprecated" ] ; then
deprecated_build_flag=ON
else
deprecated_build_flag=OFF
fi
if [ ${gl} = "desktop" ] ; then
desktop_flag=ON
windowless_flag=ON
elif [ ${gl} = "es2" ] ; then
gl_flags="-DTARGET_GLES=ON -DTARGET_GLES2=ON"
desktop_flag=OFF
windowless_flag=OFF
elif [ ${gl} = "es2desktop" ] ; then
gl_flags="-DTARGET_GLES=ON -DTARGET_GLES2=ON -DTARGET_DESKTOP_GLES=ON"
desktop_flag=OFF
windowless_flag=ON
elif [ ${gl} = "es3" ] ; then
gl_flags="-DTARGET_GLES=ON -DTARGET_GLES2=OFF"
desktop_flag=OFF
windowless_flag=OFF
fi
cmake .. \
-DCMAKE_FIND_ROOT_PATH=${JENKINS_HOME}/filesystem/${compiler}-${libraries} \
-DCMAKE_INSTALL_PREFIX=${JENKINS_HOME}/filesystem/${compiler}-${libraries}-${compatibility}-${gl} \
-DCMAKE_CXX_COMPILER=${compiler} \
-DBUILD_TESTS=ON \
-DBUILD_GL_TESTS=${windowless_flag} \
-DBUILD_DEPRECATED=${deprecated_build_flag} \
${static_build_flag} \
${gl_flags} \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_MAGNUMFONT=ON \
-DWITH_MAGNUMFONTCONVERTER=${desktop_flag} \
-DWITH_TGAIMAGECONVERTER=ON \
-DWITH_TGAIMPORTER=ON \
-DWITH_WAVAUDIOIMPORTER=ON \
-DWITH_DISTANCEFIELDCONVERTER=${desktop_flag} \
-DWITH_FONTCONVERTER=${desktop_flag} \
-DWITH_MAGNUMINFO=${windowless_flag} \
-G Ninja
ninja
ctest --output-on-failure -E GLTest || true
ninja install
]]>
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.tasks.BuildTrigger>
<childProjects>Magnum-GLTests</childProjects>
<threshold>
<name>SUCCESS</name>
<ordinal>0</ordinal>
<color>BLUE</color>
<completeBuild>true</completeBuild>
</threshold>
</hudson.tasks.BuildTrigger>
<hudson.plugins.textfinder.TextFinderPublisher plugin="text-finder@1.9">
<regexp>Errors while running CTest</regexp>
<succeedIfFound>false</succeedIfFound>
<unstableIfFound>true</unstableIfFound>
<alsoCheckConsoleOutput>true</alsoCheckConsoleOutput>
</hudson.plugins.textfinder.TextFinderPublisher>
</publishers>
<buildWrappers/>
<executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
<runSequentially>true</runSequentially>
<touchStoneCombinationFilter>
<![CDATA[
compiler == "g++" && libraries == "dynamic" && compatibility == "deprecated" && gl == "desktop"
]]>
</touchStoneCombinationFilter>
<touchStoneResultCondition>
<name>SUCCESS</name>
<ordinal>0</ordinal>
<color>BLUE</color>
<completeBuild>true</completeBuild>
</touchStoneResultCondition>
</executionStrategy>
<childCustomWorkspace>.</childCustomWorkspace>
</matrix-project>
Loading…
Cancel
Save