All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] travis-ci: build documentation
@ 2016-04-29  9:35 larsxschneider
  2016-04-29 12:14 ` Jeff King
  2016-04-29 14:40 ` [PATCH v2] " Matthieu Moy
  0 siblings, 2 replies; 53+ messages in thread
From: larsxschneider @ 2016-04-29  9:35 UTC (permalink / raw)
  To: git; +Cc: Matthieu.Moy, stefan.naewe, gitster, peff, Lars Schneider

From: Lars Schneider <larsxschneider@gmail.com>

Run "make doc" as separate Travis CI build job to check if all
documentation can be built without errors.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---

diff to v1:
* add quick sanity check to documentation results (thanks Matthieu)
* fix typo in commits message (thanks Stefan)
* move 'make doc' into seperate Travis CI build job (thanks Peff)
* started to move CI helper scripts to /ci (thanks Matthieu & Junio)

I really like the idea of the "/ci" directory. Over time I plan to
migrate all non Travis-CI related code from .travis.yml to this directory.
This would ease the transition to or parallel execution with another CI
system (e.g. GitLab CI to test Git on Windows).

Thanks,
Lars


 .travis.yml              | 15 +++++++++++++++
 ci/test-documentation.sh | 23 +++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100755 ci/test-documentation.sh

diff --git a/.travis.yml b/.travis.yml
index 78e433b..9f71d23 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,6 +32,21 @@ env:
     # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
     - GIT_SKIP_TESTS="t9810 t9816"

+matrix:
+  include:
+    - env: Documentation
+      os: linux
+      compiler: clang
+      addons:
+        apt:
+          packages:
+          - asciidoc
+          - xmlto
+      before_install:
+      before_script: make doc
+      script: ci/test-documentation.sh
+      after_failure:
+
 before_install:
   - >
     case "${TRAVIS_OS_NAME:-linux}" in
diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh
new file mode 100755
index 0000000..329ff4b
--- /dev/null
+++ b/ci/test-documentation.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Perform a quick sanity check on documentation generated with 'make doc'.
+#
+
+set -e
+
+test_file_count () {
+    SUFFIX=$1
+    EXPECTED_COUNT=$2
+    ACTUAL_COUNT=$(find Documentation -type f -name "*.$SUFFIX" | wc -l)
+    echo "$ACTUAL_COUNT *.$SUFFIX files found. $EXPECTED_COUNT expected."
+    test $ACTUAL_COUNT -eq $EXPECTED_COUNT
+}
+
+test -s Documentation/git.html
+test -s Documentation/git.xml
+test -s Documentation/git.1
+
+# The follow numbers need to be adjusted when new documentation is added.
+test_file_count html 233
+test_file_count xml 171
+test_file_count 1 152
--
2.5.1

^ permalink raw reply related	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2016-05-13  6:26 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29  9:35 [PATCH v2] travis-ci: build documentation larsxschneider
2016-04-29 12:14 ` Jeff King
2016-04-29 12:21   ` Matthieu Moy
2016-04-29 14:22     ` Lars Schneider
2016-04-29 14:32       ` Jeff King
2016-04-29 17:27     ` Stefan Beller
2016-04-29 17:53       ` Matthieu Moy
2016-04-29 20:44       ` Lars Schneider
2016-04-29 21:05         ` Junio C Hamano
2016-05-02 20:20           ` [PATCH v3 0/2] " larsxschneider
2016-05-02 20:20             ` [PATCH v3 1/2] Documentation: fix linkgit references larsxschneider
2016-05-02 20:34               ` Jeff King
2016-05-03  8:30                 ` Lars Schneider
2016-05-03 15:41                   ` Junio C Hamano
2016-05-03 17:59                     ` Jeff King
2016-05-03 17:58                   ` Jeff King
2016-05-04  8:38                   ` [PATCH v4 0/2] travis-ci: build documentation larsxschneider
2016-05-04  8:38                     ` [PATCH v4 1/2] Documentation: fix linkgit references larsxschneider
2016-05-04  8:43                       ` Lars Schneider
2016-05-04  8:57                         ` Jeff King
2016-05-04 11:38                         ` Ramsay Jones
2016-05-04 17:28                           ` Junio C Hamano
2016-05-04 17:36                             ` Junio C Hamano
2016-05-04 18:52                             ` Junio C Hamano
2016-05-04 19:25                               ` Jeff King
2016-05-04 19:57                                 ` Junio C Hamano
2016-05-04 20:06                                   ` Jeff King
2016-05-04 21:15                                     ` Junio C Hamano
2016-05-04 21:31                                       ` Jeff King
2016-05-04 21:34                                         ` Junio C Hamano
2016-05-04 21:44                                           ` Jeff King
2016-05-04 21:52                                             ` Junio C Hamano
2016-05-04 22:09                                               ` Jeff King
2016-05-04 22:17                                                 ` Junio C Hamano
2016-05-04 22:27                                                   ` Junio C Hamano
2016-05-04 23:28                                                     ` Junio C Hamano
2016-05-04 23:41                                                       ` Jeff King
2016-05-04 23:53                                                         ` Jeff King
2016-05-04 21:54                                     ` Ævar Arnfjörð Bjarmason
2016-05-04 22:11                                       ` Jeff King
2016-05-04  8:38                     ` [PATCH v4 2/2] travis-ci: build documentation larsxschneider
2016-05-10 17:12                       ` Junio C Hamano
2016-05-13  6:26                         ` Lars Schneider
2016-05-02 20:20             ` [PATCH v3 " larsxschneider
2016-05-02 20:45               ` Junio C Hamano
2016-05-03  8:12                 ` Lars Schneider
2016-05-03 15:43                   ` Junio C Hamano
2016-05-04  8:04                     ` Lars Schneider
2016-05-04  8:18                       ` Eric Wong
2016-05-04  8:19                       ` Junio C Hamano
2016-05-04  9:11                       ` Christian Couder
2016-05-04 11:27                         ` Matthieu Moy
2016-04-29 14:40 ` [PATCH v2] " Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.