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

--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
This commit is contained in:
Dustin J. Mitchell 2017-10-02 18:22:56 +00:00
Родитель 92c96346cb
Коммит 00f03c413e
25 изменённых файлов: 105 добавлений и 14 удалений

Просмотреть файл

@ -9,6 +9,9 @@ with Files("**"):
SPHINX_TREES['sslerrorreport'] = 'content/docs/sslerrorreport'
with Files('content/docs/sslerrorreport/**'):
SCHEDULES.exclusive = ['docs']
MOCHITEST_MANIFESTS += [
'content/test/general/mochitest.ini',
]

Просмотреть файл

@ -19,3 +19,6 @@ EXTRA_JS_MODULES.experiments += [
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
SPHINX_TREES['experiments'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -8,6 +8,9 @@ CONFIGURE_SUBST_FILES += ['installer/Makefile']
SPHINX_TREES['browser'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
DIRS += [
'base',
'components',

Просмотреть файл

@ -10,6 +10,9 @@ with Files('**'):
# This cannot be named "build" because of bug 922191.
SPHINX_TREES['buildsystem'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['win32']
if CONFIG['WIN64_CARGO_LINKER']:

Просмотреть файл

@ -149,8 +149,15 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
SPHINX_TREES['webidl'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
SPHINX_PYTHON_PACKAGE_DIRS += ['mozwebidlcodegen']
with Files('mozwebidlcodegen/**.py'):
SCHEDULES.inclusive += ['docs']
if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
# This is needed for Window.webidl
DEFINES['HAVE_SIDEBAR'] = True

Просмотреть файл

@ -40,3 +40,6 @@ if CONFIG['ENABLE_TESTS']:
TEST_DIRS += ['tests']
SPHINX_TREES['gfx'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -67,3 +67,6 @@ TEST_DIRS += [
]
SPHINX_TREES['fennec'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -56,7 +56,16 @@ with Files('**/Makefile.in'):
FINAL = True
with Files("**/*.js"):
SCHEDULES.inclusive += ['test-verify']
SCHEDULES.inclusive += ['test-verify', 'docs']
with Files("**/*.jsm"):
SCHEDULES.inclusive += ['docs']
with Files("**/*.rst"):
SCHEDULES.inclusive += ['docs']
with Files("**/*.md"):
SCHEDULES.inclusive += ['docs']
with Files("**/*.html"):
SCHEDULES.inclusive += ['test-verify']

Просмотреть файл

@ -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',

Просмотреть файл

@ -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',

Просмотреть файл

@ -19,14 +19,8 @@ generate:
cd /builds/worker/checkouts/gecko &&
./mach doc --outdir docs-out --no-open --archive
sparse-profile: sphinx-docs
when:
files-changed:
- '**/*.py'
- '**/*.rst'
- '**/*.md'
- 'tools/docs/**'
- '**/*.js'
- '**/*.jsm'
optimization:
skip-unless-schedules: [docs]
upload:
description: Generate and upload the Sphinx documentation
@ -47,8 +41,5 @@ upload:
sparse-profile: sphinx-docs
scopes:
- secrets:get:project/releng/gecko/build/level-{level}/gecko-docs-upload
when:
files-changed:
- '**/*.py'
- '**/*.rst'
- 'tools/docs/**'
optimization:
skip-unless-schedules: [docs]

Просмотреть файл

@ -28,3 +28,6 @@ PYTHON_UNITTEST_MANIFESTS += [
]
SPHINX_TREES['taskcluster'] = 'docs'
SPHINX_PYTHON_PACKAGE_DIRS += ['taskgraph']
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -12,3 +12,6 @@ with Files("**"):
BUG_COMPONENT = ("Testing", "Marionette")
SPHINX_TREES["geckodriver"] = "doc"
with Files('doc/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -18,3 +18,6 @@ with Files("harness/**"):
SCHEDULES.exclusive = ["marionette", "firefox-ui"]
SPHINX_TREES["marionette"] = "doc"
with Files('doc/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -50,5 +50,8 @@ TEST_HARNESS_FILES.mozbase += [
SPHINX_TREES['/mozbase'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
with Files('**'):
BUG_COMPONENT = ('Testing', 'Mozbase')

Просмотреть файл

@ -6,6 +6,9 @@
SPHINX_TREES['crash-manager'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
XPIDL_MODULE = 'toolkit_crashservice'
XPIDL_SOURCES += [

Просмотреть файл

@ -92,4 +92,7 @@ XPCSHELL_TESTS_MANIFESTS += [
SPHINX_TREES['webextensions'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
include('/ipc/chromium/chromium-config.mozbuild')

Просмотреть файл

@ -20,6 +20,9 @@ MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
SPHINX_TREES['docs'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
TESTING_JS_MODULES += [
'test/PaymentTestUtils.jsm',
]

Просмотреть файл

@ -24,6 +24,9 @@ LOCAL_INCLUDES += [
SPHINX_TREES['telemetry'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
CXXFLAGS += ['-Wno-error=shadow']

Просмотреть файл

@ -93,4 +93,7 @@ if CONFIG['NIGHTLY_BUILD'] or CONFIG['MOZ_DEBUG']:
SPHINX_TREES['url-classifier'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
include('/ipc/chromium/chromium-config.mozbuild')

Просмотреть файл

@ -6,6 +6,9 @@
SPHINX_TREES['crashreporter'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
EXPORTS += [
'nsExceptionHandler.h',
]

Просмотреть файл

@ -165,6 +165,9 @@ TESTING_JS_MODULES += [
SPHINX_TREES['toolkit_modules'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
EXTRA_JS_MODULES += [
'addons/MatchURLFilters.jsm',
'addons/WebNavigation.jsm',

Просмотреть файл

@ -30,3 +30,6 @@ else:
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
SPHINX_TREES['toolkit_modules/subprocess'] = ['docs']
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']

Просмотреть файл

@ -6,6 +6,9 @@
SPHINX_TREES['addon-manager'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':
DEFINES['MOZ_FENNEC'] = True

Просмотреть файл

@ -21,6 +21,7 @@ with Files("coverity/**"):
with Files("docs/**"):
BUG_COMPONENT = ("Core", "Build Config")
SCHEDULES.exclusive = ['docs']
with Files("lint/**"):
BUG_COMPONENT = ("Testing", "Lint")
@ -47,9 +48,20 @@ with Files("update-packaging/**"):
BUG_COMPONENT = ("Release Engineering", "Other")
SPHINX_TREES['lint'] = 'lint/docs'
with Files('lint/docs/**'):
SCHEDULES.exclusive = ['docs']
SPHINX_TREES['compare-locales'] = 'compare-locales/docs'
with Files('compare-locales/docs/**'):
SCHEDULES.exclusive = ['docs']
SPHINX_TREES['try'] = 'tryselect/docs'
with Files('tryselect/docs/**'):
SCHEDULES.exclusive = ['docs']
CRAMTEST_MANIFESTS += [
'tryselect/test/cram.ini',
]