Commit b4d2c7cb3afbed611091784ef1abe9a546f8ed82

Carlos Martín Nieto 2015-06-27T20:34:04

Merge pull request #3264 from arthurschreiber/fast-builds Fast builds?

diff --git a/.travis.yml b/.travis.yml
index 7608479..9022fde 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,6 +20,17 @@ env:
   - OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release"
   - OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON"
 
+addons:
+  apt:
+    packages:
+    - cmake
+    - libssh2-1-dev
+    - openssh-client
+    - openssh-server
+    - valgrind
+
+sudo: false
+
 matrix:
  fast_finish: true
  exclude:
@@ -44,7 +55,7 @@ matrix:
          OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Debug"
 
 install:
-  - ./script/install-deps-${TRAVIS_OS_NAME}.sh
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./script/install-deps-${TRAVIS_OS_NAME}.sh; fi
 
 # Run the Build script and tests
 script:
@@ -52,7 +63,6 @@ script:
 
 # Run Tests
 after_success:
- - if [ "$TRAVIS_OS_NAME" = "linux" -a -n "$VALGRIND" ]; then sudo apt-get -qq install valgrind; fi
  - if [ "$TRAVIS_OS_NAME" = "linux" -a -n "$VALGRIND" ]; then valgrind --leak-check=full --show-reachable=yes --suppressions=./libgit2_clar.supp _build/libgit2_clar -ionline; fi
 
 # Only watch the development and master branches
diff --git a/script/cibuild.sh b/script/cibuild.sh
index a11e798..de5df9e 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -34,8 +34,6 @@ killall git-daemon
 
 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
     echo 'PasswordAuthentication yes' | sudo tee -a /etc/sshd_config
-else
-    sudo start ssh
 fi
 
 ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q
diff --git a/script/install-deps-linux.sh b/script/install-deps-linux.sh
deleted file mode 100755
index 347922b..0000000
--- a/script/install-deps-linux.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-set -x
-
-sudo apt-get -qq update &&
-sudo apt-get -qq install cmake libssh2-1-dev openssh-client openssh-server