Skip to content

Instantly share code, notes, and snippets.

@danielpunkass
Last active December 10, 2015 09:28
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danielpunkass/4413977 to your computer and use it in GitHub Desktop.
Save danielpunkass/4413977 to your computer and use it in GitHub Desktop.
The enclosed config.xml file will instruct Jenkins to check out and build llvm + clang, archiving the resulting clang binary.
The configuration will build daily and will retain builds for 5 days.
To add it to your Jenkins install, just copy the config.xml file to e.g.:
jobs/Clang/config.xml
Then "reload configuration" in Jenkins, or stop and start Jenkins to reload it implicitly.
Depending on your use case, you may want to alter the configuration so it builds a debug version of clang. For more information about building clang and the options for controlling optimization, see here:
http://clang.llvm.org/get_started.html#build
Enjoy!
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<logRotator>
<daysToKeep>5</daysToKeep>
<numToKeep>-1</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.SubversionSCM" plugin="subversion@1.39">
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>http://llvm.org/svn/llvm-project/llvm/trunk</remote>
<local>llvm</local>
</hudson.scm.SubversionSCM_-ModuleLocation>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>http://llvm.org/svn/llvm-project/cfe/trunk</remote>
<local>llvm/tools/clang</local>
</hudson.scm.SubversionSCM_-ModuleLocation>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>http://llvm.org/svn/llvm-project/clang-tools-extra/trunk</remote>
<local>llvm/tools/clang/tools/extra</local>
</hudson.scm.SubversionSCM_-ModuleLocation>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>http://llvm.org/svn/llvm-project/compiler-rt/trunk</remote>
<local>llvm/projects/compiler-rt</local>
</hudson.scm.SubversionSCM_-ModuleLocation>
</locations>
<excludedRegions></excludedRegions>
<includedRegions></includedRegions>
<excludedUsers></excludedUsers>
<excludedRevprop></excludedRevprop>
<excludedCommitMessages></excludedCommitMessages>
<workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers class="vector">
<hudson.triggers.TimerTrigger>
<spec>@daily</spec>
</hudson.triggers.TimerTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command># Don&apos;t do the whole configuration dance unless we are building for the first time
if [ ! -d ./build ]; then
mkdir -p build
cd build
../llvm/configure --enable-optimized
else
cd build
fi
make -j4</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>build/Release+Asserts/bin/clang</artifacts>
<latestOnly>false</latestOnly>
</hudson.tasks.ArtifactArchiver>
</publishers>
<buildWrappers/>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment