Bug 1403519 - only build docs when necessary r=gps

This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.

That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks.  The tasks do not run by default.

MozReview-Commit-ID: G9tOK0AwtrI
This commit is contained in:
Dustin J. Mitchell
2017-10-02 18:22:56 +00:00
parent bacf14536b
commit cb2823906c
25 changed files with 105 additions and 14 deletions

View File

@@ -37,8 +37,14 @@ SPHINX_PYTHON_PACKAGE_DIRS += [
'mozversioncontrol/mozversioncontrol',
]
with Files('**.py'):
SCHEDULES.inclusive += ['docs']
SPHINX_TREES['mach'] = 'mach/docs'
with Files('mach/docs/**'):
SCHEDULES.exclusive = ['docs']
PYTHON_UNITTEST_MANIFESTS += [
'mach/mach/test/python.ini',
'mozbuild/dumbmake/test/python.ini',

View File

@@ -11,7 +11,12 @@ from __future__ import absolute_import, unicode_literals, print_function
# TODO: ideally these lists could be specified in moz.build itself
# Inclusive components are those which are scheduled when certain files are
# changed, but do not run by default. These are generally added to
# `SCHEDULES.inclusive` using `+=`, but can also be used as exclusive
# components for files which *only* affect the named component.
INCLUSIVE_COMPONENTS = [
'docs',
'py-lint',
'js-lint',
'yaml-lint',
@@ -23,6 +28,10 @@ INCLUSIVE_COMPONENTS = [
]
INCLUSIVE_COMPONENTS = sorted(INCLUSIVE_COMPONENTS)
# Exclusive components are those which are scheduled by default, but for which
# some files *only* affect that component. For example, most files affect all
# platforms, but platform-specific files exclusively affect a single platform.
# These components are assigned to `SCHEDULES.exclusive` with `=`.
EXCLUSIVE_COMPONENTS = [
# os families
'android',