Commit e523826c4ec2b7e8757f31490ba41005420d1c52

Edward Thomson 2017-10-07T01:38:53

Merge pull request #4321 from libgit2/ethomson/libcurl_build travis: add custom apt sources

diff --git a/.travis.yml b/.travis.yml
index 08289aa..1314345 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,6 @@
 # see travis-ci.org for details
 
 language: c
-dist: trusty
 
 os:
   - linux
@@ -22,7 +21,23 @@ env:
   - OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DENABLE_WERROR=ON"
 
 dist: trusty
-sudo: true
+sudo: false
+
+addons:
+ apt:
+  sources:
+   - sourceline: 'deb http://libgit2deps.edwardthomson.com trusty libgit2deps'
+     key_url: 'https://pgp.mit.edu/pks/lookup?op=get&search=0x5656187599131CD5'
+  packages:
+   cmake
+   curl
+   libcurl3
+   libcurl3-gnutls
+   libcurl4-gnutls-dev
+   libssh2-1-dev
+   openssh-client
+   openssh-server
+   valgrind
 
 matrix:
  fast_finish: true
@@ -44,7 +59,7 @@ matrix:
    - env: COVERITY=1
 
 install:
-  - ./script/install-deps-${TRAVIS_OS_NAME}.sh
+  - if [ -f ./script/install-deps-${TRAVIS_OS_NAME}.sh ]; then ./script/install-deps-${TRAVIS_OS_NAME}.sh; fi
 
 # Run the Build script and tests
 script:
diff --git a/script/install-deps-linux.sh b/script/install-deps-linux.sh
deleted file mode 100755
index 15bac4d..0000000
--- a/script/install-deps-linux.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -x
-
-if [ -z "$PRECISE" ]; then
-    echo "deb http://libgit2deps.edwardthomson.com trusty libgit2deps" | sudo tee -a /etc/apt/sources.list
-    sudo apt-key adv --keyserver pgp.mit.edu --recv 99131CD5
-    sudo apt-get update -qq
-    sudo apt-get install -y curl libcurl3 libcurl3-gnutls libcurl4-gnutls-dev
-fi
-
-sudo apt-get install -y cmake libssh2-1-dev openssh-client openssh-server valgrind