diff --git a/browser/base/moz.build b/browser/base/moz.build index 16fc0ee82562..e7c2bc30fc85 100644 --- a/browser/base/moz.build +++ b/browser/base/moz.build @@ -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', ] diff --git a/browser/experiments/moz.build b/browser/experiments/moz.build index 6daba345535d..88a630b54e7a 100644 --- a/browser/experiments/moz.build +++ b/browser/experiments/moz.build @@ -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'] diff --git a/browser/moz.build b/browser/moz.build index c6a4843e1e37..1da5d6e76cf6 100644 --- a/browser/moz.build +++ b/browser/moz.build @@ -8,6 +8,9 @@ CONFIGURE_SUBST_FILES += ['installer/Makefile'] SPHINX_TREES['browser'] = 'docs' +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] + DIRS += [ 'base', 'components', diff --git a/build/moz.build b/build/moz.build index 10aed4a0c2ce..d6d46dbdb21b 100644 --- a/build/moz.build +++ b/build/moz.build @@ -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']: diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build index 163244a18158..f961a873f0ce 100644 --- a/dom/bindings/moz.build +++ b/dom/bindings/moz.build @@ -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 diff --git a/gfx/moz.build b/gfx/moz.build index fb1da17f2093..d23e61cabe87 100644 --- a/gfx/moz.build +++ b/gfx/moz.build @@ -40,3 +40,6 @@ if CONFIG['ENABLE_TESTS']: TEST_DIRS += ['tests'] SPHINX_TREES['gfx'] = 'docs' + +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] diff --git a/mobile/android/moz.build b/mobile/android/moz.build index d15d8d799407..1c9a2c836945 100644 --- a/mobile/android/moz.build +++ b/mobile/android/moz.build @@ -67,3 +67,6 @@ TEST_DIRS += [ ] SPHINX_TREES['fennec'] = 'docs' + +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] diff --git a/moz.build b/moz.build index c7aef870f62e..41f477e3aed8 100644 --- a/moz.build +++ b/moz.build @@ -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'] diff --git a/python/moz.build b/python/moz.build index 0bf3aa96e0ef..8ecf55aa05f8 100644 --- a/python/moz.build +++ b/python/moz.build @@ -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', diff --git a/python/mozbuild/mozbuild/schedules.py b/python/mozbuild/mozbuild/schedules.py index 15b67389f756..35afa289fe6f 100644 --- a/python/mozbuild/mozbuild/schedules.py +++ b/python/mozbuild/mozbuild/schedules.py @@ -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', diff --git a/taskcluster/ci/source-test/doc.yml b/taskcluster/ci/source-test/doc.yml index e863de5eed82..67d8ad776481 100644 --- a/taskcluster/ci/source-test/doc.yml +++ b/taskcluster/ci/source-test/doc.yml @@ -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] diff --git a/taskcluster/moz.build b/taskcluster/moz.build index 01f5d3e861fc..447794807bc8 100644 --- a/taskcluster/moz.build +++ b/taskcluster/moz.build @@ -28,3 +28,6 @@ PYTHON_UNITTEST_MANIFESTS += [ ] SPHINX_TREES['taskcluster'] = 'docs' SPHINX_PYTHON_PACKAGE_DIRS += ['taskgraph'] + +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] diff --git a/testing/geckodriver/moz.build b/testing/geckodriver/moz.build index 1556b4250c61..277b6ae5b164 100644 --- a/testing/geckodriver/moz.build +++ b/testing/geckodriver/moz.build @@ -12,3 +12,6 @@ with Files("**"): BUG_COMPONENT = ("Testing", "Marionette") SPHINX_TREES["geckodriver"] = "doc" + +with Files('doc/**'): + SCHEDULES.exclusive = ['docs'] diff --git a/testing/marionette/moz.build b/testing/marionette/moz.build index 785b2eb710a1..4beb356578be 100644 --- a/testing/marionette/moz.build +++ b/testing/marionette/moz.build @@ -18,3 +18,6 @@ with Files("harness/**"): SCHEDULES.exclusive = ["marionette", "firefox-ui"] SPHINX_TREES["marionette"] = "doc" + +with Files('doc/**'): + SCHEDULES.exclusive = ['docs'] diff --git a/testing/mozbase/moz.build b/testing/mozbase/moz.build index 6d705913634c..f6206e129b4c 100644 --- a/testing/mozbase/moz.build +++ b/testing/mozbase/moz.build @@ -50,5 +50,8 @@ TEST_HARNESS_FILES.mozbase += [ SPHINX_TREES['/mozbase'] = 'docs' +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] + with Files('**'): BUG_COMPONENT = ('Testing', 'Mozbase') diff --git a/toolkit/components/crashes/moz.build b/toolkit/components/crashes/moz.build index 4e0c56b463cd..e84bc8f889c0 100644 --- a/toolkit/components/crashes/moz.build +++ b/toolkit/components/crashes/moz.build @@ -6,6 +6,9 @@ SPHINX_TREES['crash-manager'] = 'docs' +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] + XPIDL_MODULE = 'toolkit_crashservice' XPIDL_SOURCES += [ diff --git a/toolkit/components/extensions/moz.build b/toolkit/components/extensions/moz.build index e99eee654fcb..2b0c1a29d367 100644 --- a/toolkit/components/extensions/moz.build +++ b/toolkit/components/extensions/moz.build @@ -92,4 +92,7 @@ XPCSHELL_TESTS_MANIFESTS += [ SPHINX_TREES['webextensions'] = 'docs' +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] + include('/ipc/chromium/chromium-config.mozbuild') diff --git a/toolkit/components/payments/moz.build b/toolkit/components/payments/moz.build index b461b7fb3d18..1230687f244b 100644 --- a/toolkit/components/payments/moz.build +++ b/toolkit/components/payments/moz.build @@ -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', ] diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build index 773d27567b0a..5a7e2be7f507 100644 --- a/toolkit/components/telemetry/moz.build +++ b/toolkit/components/telemetry/moz.build @@ -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'] diff --git a/toolkit/components/url-classifier/moz.build b/toolkit/components/url-classifier/moz.build index 83e995d8d0a2..cd0d010986f1 100644 --- a/toolkit/components/url-classifier/moz.build +++ b/toolkit/components/url-classifier/moz.build @@ -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') diff --git a/toolkit/crashreporter/moz.build b/toolkit/crashreporter/moz.build index 20b98027ed75..dafaefa3f9fd 100644 --- a/toolkit/crashreporter/moz.build +++ b/toolkit/crashreporter/moz.build @@ -6,6 +6,9 @@ SPHINX_TREES['crashreporter'] = 'docs' +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] + EXPORTS += [ 'nsExceptionHandler.h', ] diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build index 19bd7d0651d5..df694260a9ad 100644 --- a/toolkit/modules/moz.build +++ b/toolkit/modules/moz.build @@ -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', diff --git a/toolkit/modules/subprocess/moz.build b/toolkit/modules/subprocess/moz.build index e7a1f526a494..a8268092dfbe 100644 --- a/toolkit/modules/subprocess/moz.build +++ b/toolkit/modules/subprocess/moz.build @@ -30,3 +30,6 @@ else: XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini'] SPHINX_TREES['toolkit_modules/subprocess'] = ['docs'] + +with Files('docs/**'): + SCHEDULES.exclusive = ['docs'] diff --git a/toolkit/mozapps/extensions/moz.build b/toolkit/mozapps/extensions/moz.build index c60e35804ae0..d0e573830d53 100644 --- a/toolkit/mozapps/extensions/moz.build +++ b/toolkit/mozapps/extensions/moz.build @@ -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 diff --git a/tools/moz.build b/tools/moz.build index a4de4c55534e..c050a03eff63 100644 --- a/tools/moz.build +++ b/tools/moz.build @@ -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', ]