From 54773d3ccdd86db6faf92c755e5fb1e88844cceb Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 25 Jul 2014 16:52:23 +0100 Subject: [PATCH] Build docs on Travis and upload them to GitHub Pages. http://servo.github.io/servo/servo/index.html --- .travis.yml | 3 +++ mk/doc.mk | 8 ++++++-- travis.linux.script.sh | 16 +++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58b791ed4c1..9284646b362 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,3 +30,6 @@ notifications: branches: only: - master + +env: + - secure: qSjs06HEBF6A7ZyCWdltko+LkVz6OpNZQnEbr0nHB3rSl9mzwwjjH6v0VOKYNgvSPTgD8eHa/nnTeTcUJPaBB3mok+X43xkEUQWHLnW/X30QU0c8Xn+7db4hCgsaUupc1XaJhzpLDj3qV8dqDiGNKIwXJHlMzIuxSW424XL1CNc= diff --git a/mk/doc.mk b/mk/doc.mk index 266bb7f64ef..20648070e0d 100644 --- a/mk/doc.mk +++ b/mk/doc.mk @@ -1,11 +1,15 @@ -# These crates make rustdoc fail for undetermined reasons. +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# FIXME(#2924) These crates make rustdoc fail for undetermined reasons. DOC_BLACKLISTED := style layout define DEF_DOC_RULES .PHONY: doc-$(1) doc-$(1): doc/$(1)/index.html -ifeq (,$(findstring $(1),$(DOC_BLACKLISTED))) +ifeq (,$(filter $(1),$(DOC_BLACKLISTED))) doc/$(1)/index.html: $$(DEPS_$(1)) @$$(call E, rustdoc: $$@) diff --git a/travis.linux.script.sh b/travis.linux.script.sh index 445400db040..3c2ae557f0c 100755 --- a/travis.linux.script.sh +++ b/travis.linux.script.sh @@ -1,5 +1,19 @@ +set -e cd build ../configure export DISPLAY=:1.0 export RUST_TEST_TASKS=1 -make tidy && make -j2 && make check-servo && make check-content && make check-ref-cpu +make tidy +make -j2 +make check-servo +make check-content +make check-ref-cpu +make doc + +if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] +then + echo '' > doc/index.html + sudo pip install ghp-import + ghp-import -n doc + git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages +fi