From c5e8eb4d5f8c30549e08b312d5c4bd13675fd5f8 Mon Sep 17 00:00:00 2001
From: Chris Wong <lambda.fairy@gmail.com>
Date: Wed, 27 Mar 2019 19:42:02 +1300
Subject: [PATCH] Travis: split build into jobs

- Change benchmarks build to use `cargo test --benches`. This runs the
  benchmarks and compiles faster than `cargo bench`.

Closes #169
---
 .travis.yml | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7dc5f62..25e819e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,19 +2,22 @@ language: rust
 rust: nightly
 sudo: false
 
-before_script:
-  - |
-    RUN_CLIPPY=true
-    rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false
-
-script:
-  - cargo test --all --all-features
-  - (cd benchmarks && cargo bench --no-run)
-  - |
-    if $RUN_CLIPPY; then
-      CLIPPY_STATUS=0
-      for package in maud_htmlescape maud_macros maud; do
-        (cd $package && cargo clippy -- -D warnings) || CLIPPY_STATUS=$?
-      done
-      (exit $CLIPPY_STATUS)
-    fi
+jobs:
+  include:
+    - name: "Main"
+      script:
+        - |
+          RUN_CLIPPY=true
+          rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false
+        - cargo test --all --all-features
+        - |
+          if $RUN_CLIPPY; then
+            CLIPPY_STATUS=0
+            for package in maud_htmlescape maud_macros maud; do
+              (cd $package && cargo clippy -- -D warnings) || CLIPPY_STATUS=$?
+            done
+            (exit $CLIPPY_STATUS)
+          fi
+    - name: "Benchmarks"
+      script:
+        - (cd benchmarks && cargo test --benches)