Skip to content

Commit

Permalink
travis: use pip for cpp/gaplint
Browse files Browse the repository at this point in the history
  • Loading branch information
James Mitchell authored and james-d-mitchell committed Apr 24, 2018
1 parent 73dbb99 commit c80da22
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ matrix:
include:
- env:
- SUITE=lint
sudo:
true
addons:

- env:
Expand Down
12 changes: 4 additions & 8 deletions scripts/travis-build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ mv Digraphs $HOME/digraphs

if [ "$SUITE" == "lint" ]; then

# Check-out most recent release of cpplint from GitHub
# Install cpplint using pip
cd $HOME
git clone -b master https://github.com/cpplint/cpplint.git lint/cpplint
cd lint/cpplint
git checkout `git tag | tail -1`
sudo pip install cpplint

# Check out most recent commit of gaplint from GitHub
cd $HOME
git clone -b master --depth=1 https://github.com/james-d-mitchell/gaplint lint/gaplint
# Install gaplint using pip
sudo pip install gaplint

# Move Digraphs package into a GAP folder structure, so that cpplint is happy
cd $HOME
mkdir gap gap/.git gap/pkg
mv digraphs $HOME/gap/pkg/digraphs

Expand Down
11 changes: 3 additions & 8 deletions scripts/travis-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ touch testlog.txt
TESTLOG="`pwd`/testlog.txt"

if [ "$SUITE" == "lint" ]; then

cd $HOME/lint/gaplint
GAPLINT="`pwd`/gaplint.py"
cd $HOME/lint/cpplint
CPPLINT="`pwd`/cpplint.py"


cd $HOME/gap/pkg/digraphs

for FILE in `grep "^\s\+gaplint" Makefile.am | cut -d " " -f2-`; do
$GAPLINT $FILE
gaplint $FILE
done
for FILE in `grep "^\s\+cpplint" Makefile.am | cut -d " " -f2-`; do
$CPPLINT --extensions=c,cc,h $FILE
cpplint --extensions=c,cc,h $FILE
done

elif [ ! -z "$GAP" ]; then
Expand Down

0 comments on commit c80da22

Please sign in to comment.