diff --git a/servo/.gitignore b/servo/.gitignore
index cefa264519623..bb153da94e2c4 100644
--- a/servo/.gitignore
+++ b/servo/.gitignore
@@ -14,7 +14,7 @@
servo-test
Servo.app
.config.mk.last
-build*
+/build*
objdir
parser.out
src/components/script/dom/bindings/codegen/*.rs
diff --git a/servo/.travis.yml b/servo/.travis.yml
index ea999fec51c02..378711ad95129 100644
--- a/servo/.travis.yml
+++ b/servo/.travis.yml
@@ -9,13 +9,15 @@ install:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./travis.osx.install.deps.sh; fi
before_script:
-- mkdir -p build
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./travis.linux.before_script.sh; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./travis.osx.before_script.sh; fi
script:
-- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./travis.linux.script.sh; fi
-- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./travis.osx.script.sh; fi
+- mkdir -p build
+- cd build
+- ../mk/build.sh
+- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ../travis.linux.script.sh $AFTER_BUILD; fi
+- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ../travis.osx.script.sh $AFTER_BUILD; fi
git:
submodules: true
@@ -28,4 +30,17 @@ notifications:
use_notice: true
env:
- - secure: qSjs06HEBF6A7ZyCWdltko+LkVz6OpNZQnEbr0nHB3rSl9mzwwjjH6v0VOKYNgvSPTgD8eHa/nnTeTcUJPaBB3mok+X43xkEUQWHLnW/X30QU0c8Xn+7db4hCgsaUupc1XaJhzpLDj3qV8dqDiGNKIwXJHlMzIuxSW424XL1CNc=
+ global:
+ - secure: qSjs06HEBF6A7ZyCWdltko+LkVz6OpNZQnEbr0nHB3rSl9mzwwjjH6v0VOKYNgvSPTgD8eHa/nnTeTcUJPaBB3mok+X43xkEUQWHLnW/X30QU0c8Xn+7db4hCgsaUupc1XaJhzpLDj3qV8dqDiGNKIwXJHlMzIuxSW424XL1CNc=
+ matrix:
+ - AFTER_BUILD=content
+ - AFTER_BUILD=ref
+
+matrix:
+ include:
+ - os: linux
+ env: AFTER_BUILD=unit-doc
+ - os: osx
+ env: AFTER_BUILD=unit
+ - os: osx
+ env: AFTER_BUILD=wpt
diff --git a/servo/mk/build.sh b/servo/mk/build.sh
new file mode 100755
index 0000000000000..a6fbf3fc29672
--- /dev/null
+++ b/servo/mk/build.sh
@@ -0,0 +1,4 @@
+set -e
+../configure
+make tidy
+make -j2
diff --git a/servo/travis.linux.script.sh b/servo/travis.linux.script.sh
index a05e754a232df..c6cb2ff8a5362 100755
--- a/servo/travis.linux.script.sh
+++ b/servo/travis.linux.script.sh
@@ -1,22 +1,27 @@
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
+case $1 in
+content)
+ make check-content
+;;
+ref)
+ make check-ref-cpu
+;;
+unit-doc)
+ make check-servo
-mv x86_64-unknown-linux-gnu/rust_snapshot/rust-*/doc .
-cp ../src/etc/doc.servo.org/* doc
-make doc
+ mv x86_64-unknown-linux-gnu/rust_snapshot/rust-*/doc .
+ cp ../src/etc/doc.servo.org/* doc
+ 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/servo/doc.servo.org.git gh-pages
-fi
+ 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
+;;
+*) echo "Task $1 not enabled for Linux"
+esac
diff --git a/servo/travis.osx.script.sh b/servo/travis.osx.script.sh
index f7d9953f6b724..66ec0639979c3 100755
--- a/servo/travis.osx.script.sh
+++ b/servo/travis.osx.script.sh
@@ -1,9 +1,8 @@
set -e
-cd build
-../configure
-make tidy
-make -j2
-make check-servo
-make check-content
-make check-ref-cpu
-WPTARGS="--processes=4" make check-wpt
+case $1 in
+unit) make check-servo ;;
+content) make check-content ;;
+ref) make check-ref-cpu ;;
+wpt) WPTARGS="--processes=4" make check-wpt ;;
+*) echo "Task $1 not enabled for OSX"
+esac