Skip to content

Commit

Permalink
Updated travis config.
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-heltai committed Jul 26, 2015
1 parent 395ab1e commit 3aaa686
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
@@ -1,11 +1,23 @@
sudo : false

notifications:
email: false

language: C++ language: C++


compiler: 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: branches:
only: only:
Expand Down
2 changes: 0 additions & 2 deletions contrib/utilities/check_indentation.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ else
echo "Running indentation test on Pull Request #${TRAVIS_PULL_REQUEST}" echo "Running indentation test on Pull Request #${TRAVIS_PULL_REQUEST}"
fi fi


export PATH=`pwd`/astyle/build/gcc/bin:$PATH

./contrib/utilities/indent ./contrib/utilities/indent
git diff git diff
git diff-files --quiet git diff-files --quiet
26 changes: 19 additions & 7 deletions contrib/utilities/setup_astyle.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,20 @@
#!/bin/sh #!/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 PRG=$PWD/programs
tar xvfz astyle_2.04_linux.tar.gz > /dev/null
cd astyle/build/gcc if [ ! -d $PRG ]
make -j4 > /dev/null then
cd ../../../ echo "create folder `$PRG`"
export PATH=`pwd`/astyle/build/gcc/bin:$PATH 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.