From 2958b00b455cc810aa47e79ff71398d6e1183c8b Mon Sep 17 00:00:00 2001 From: Jonas Coch Date: Wed, 18 Oct 2017 09:53:40 +0200 Subject: [PATCH] Use sysconfcpus to speed up travis builds See --- .travis.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1c78e2..f249b75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,20 +2,34 @@ sudo: false language: node_js node_js: - - "5" + - node # latest stable cache: directories: - - node_modules - - tests/elm-stuff - - elm-stuff + - sysconfcpus + - node_modules + - tests/elm-stuff + - elm-stuff install: - npm install -g elm - npm install - elm-package install -y - cd tests && elm-package install -y && cd .. + # Travis exposes a few more CPUs (like... 14 more) than the code can actually + # use. This program allows us to lie to the compiler about how many CPUs it + # can use. In this case, we're actually telling the truth about the number of + # usable CPUs, so build times go way down. + - | + if [ ! -d sysconfcpus/bin ]; + then + git clone https://github.com/obmarg/libsysconfcpus.git; + cd libsysconfcpus; + ./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus; + make && make install; + cd ..; + fi script: - - make build - - make test + - $TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 make build + - $TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 make test