Permalink
Browse files

Updated travis config.

  • Loading branch information...
1 parent 395ab1e commit 3aaa6860418f17174fb10004473a465c0a649cb0 @luca-heltai luca-heltai committed Jul 26, 2015
Showing with 34 additions and 12 deletions.
  1. +15 −3 .travis.yml
  2. +0 −2 contrib/utilities/check_indentation.sh
  3. +19 −7 contrib/utilities/setup_astyle.sh
View
@@ -1,11 +1,23 @@
+sudo : false
+
+notifications:
+ email: false
+
language: C++
compiler:
-- gcc
+ - gcc
+
+cache:
+ directories:
+ - programs
-before_install: ./contrib/utilities/setup_astyle.sh
+install:
+ - export PATH=$PWD/programs/astyle/build/gcc/bin:$PATH
+ - ./contrib/utilities/setup_astyle.sh
-script: ./contrib/utilities/check_indentation.sh
+script:
+ - ./contrib/utilities/check_indentation.sh
branches:
only:
@@ -6,8 +6,6 @@ else
echo "Running indentation test on Pull Request #${TRAVIS_PULL_REQUEST}"
fi
-export PATH=`pwd`/astyle/build/gcc/bin:$PATH
-
./contrib/utilities/indent
git diff
git diff-files --quiet
@@ -1,8 +1,20 @@
#!/bin/sh
-echo "Downloading and installing astyle."
-wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null
-tar xvfz astyle_2.04_linux.tar.gz > /dev/null
-cd astyle/build/gcc
-make -j4 > /dev/null
-cd ../../../
-export PATH=`pwd`/astyle/build/gcc/bin:$PATH
+
+PRG=$PWD/programs
+
+if [ ! -d $PRG ]
+then
+ echo "create folder `$PRG`"
+ mkdir $PRG
+fi
+
+# astyle
+if [ ! -d $PRG/astyle ]
+then
+ echo "Downloading and installing astyle."
+ mkdir $PRG/astyle
+ wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null
+ tar xfz astyle_2.04_linux.tar.gz -C $PRG > /dev/null
+ cd $PRG/astyle/build/gcc
+ make -j4 > /dev/null
+fi

0 comments on commit 3aaa686

Please sign in to comment.