Bug 1395752 - Define and use sparse profile for Sphinx docs; r=dustin
authorGregory Szorc <gps@mozilla.com>
Tue, 22 Aug 2017 22:25:38 -0700
changeset 428558 5ecc8d4b725a2974260eb5bef495b91771fadbb0
parent 428557 fc8ba9723756b65083bcd03817eb6e984af956af
child 428559 4f8769251cec1d748485ea50063bfa0ff6520837
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1395752
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1395752 - Define and use sparse profile for Sphinx docs; r=dustin The Sphinx documentation only needs access to a relatively small number of files in the repo in order to be generated. It is a good candidate for using sparse profiles. This commit defines and uses a "sphinx-docs" sparse profile containing only the files relevant to Sphinx documentation generation. There are some quirks with the profile: * All moz.build files are included. This bloats the profile by >1000 files. Worse, it realizes directories that have no business being realized. This clutters the checkout and makes it harder to find things. There is a moz.build reader that knows how to retrive file data from Mercurial. We could use that. This feels like follow-up fodder. * All mach_commands.py files are included. `mach help` says you can do things that you aren't able to do in the sparse checkout. There isn't a good way to add all *.py files while excluding mach_commands.py files. We /could/ do it with regular expressions. But those are slow. Let's leave it as is for now and come up with a better solution later. MozReview-Commit-ID: 7yiqGGE1nAh
build/sparse-profiles/sphinx-docs
taskcluster/ci/source-test/doc.yml
new file mode 100644
--- /dev/null
+++ b/build/sparse-profiles/sphinx-docs
@@ -0,0 +1,17 @@
+%include build/sparse-profiles/mach
+
+[include]
+# Code for generating docs.
+glob:tools/docs/**
+
+# Potential docs sources
+glob:**/*.rst
+
+# Python API docs.
+glob:**/*.py
+
+# moz.build files are read to discover location of docs.
+glob:**/moz.build
+
+# Read to set the version of the docs.
+path:config/milestone.txt
--- a/taskcluster/ci/source-test/doc.yml
+++ b/taskcluster/ci/source-test/doc.yml
@@ -13,16 +13,17 @@ doc-generate:
             - type: file
               name: public/docs.tar.gz
               path: /builds/worker/checkouts/gecko/docs-out/main.tar.gz
     run:
         using: run-task
         command: >
             cd /builds/worker/checkouts/gecko &&
             ./mach doc --outdir docs-out --no-open --archive
+        sparse-profile: sphinx-docs
     when:
         files-changed:
             - '**/*.py'
             - '**/*.rst'
             - 'tools/docs/**'
 
 doc-upload:
     description: Generate and upload the Sphinx documentation
@@ -35,15 +36,16 @@ doc-upload:
     worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
     worker:
         docker-image: {in-tree: "lint"}
         max-run-time: 1800
         taskcluster-proxy: true
     run:
         using: run-task
         command: cd /builds/worker/checkouts/gecko && ./mach doc --upload --no-open
+        sparse-profile: sphinx-docs
     scopes:
         - secrets:get:project/releng/gecko/build/level-{level}/gecko-docs-upload
     when:
         files-changed:
             - '**/*.py'
             - '**/*.rst'
             - 'tools/docs/**'