Skip to content

Commit

Permalink
Merge pull request #33 from danrmiller/fileisimportant
Browse files Browse the repository at this point in the history
Only build when code files change. Resolves #11
  • Loading branch information
luigi1111 authored Jan 9, 2017
2 parents 690bce4 + 0d844b2 commit c2c16bc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions buildbot/master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ c['change_source'].append(changes.GitPoller(
workdir='gitpoller-workdir', branch='master',
pollinterval=400))

#

def startCompile(change):
'''Determine whether we want to start a compile pass based on the files that
have changed. Only skip compile if ALL changes are in the ignore criteria.
'''
compile = True
for fn in change.files:
# ignore all changes to gpg keys and markdown and text files
if fn.endswith('.asc') or fn.endswith('.md') or fn.endswith('.txt') or fn.endswith('.conf'):
compile = False
# don't ignore changes to CMakeLists.txt files
if re.match('CMakeLists.txt', fn):
compile = True
else:
return True
return compile

####### SCHEDULERS

# Configure the Schedulers, which decide how to react to incoming changes.
Expand All @@ -89,6 +107,7 @@ c['schedulers'].append(schedulers.SingleBranchScheduler(

c['schedulers'].append(schedulers.SingleBranchScheduler(
name='kovri PR builder',
fileIsImportant=startCompile,
builderNames=['kovri-all-win32','kovri-all-win64','kovri-all-freebsd64','kovri-all-osx-10.12','kovri-all-osx-10.10','kovri-all-osx-10.11','kovri-all-ubuntu-amd64','kovri-all-ubuntu-i686','kovri-all-ubuntu-arm7','kovri-all-debian-arm8'],
change_filter=util.ChangeFilter(repository='https://github.com/monero-project/kovri.git')
))
Expand Down

0 comments on commit c2c16bc

Please sign in to comment.