Skip to content

Commit

Permalink
[Tests] switch to use Cabal to install ShellCheck
Browse files Browse the repository at this point in the history
1. This can help speed up the apt process since we decrease the
complexity of apt sources and package dependencies resolving by dropping
an additional ppa source.

2. Stack doesn't update ShellCheck to v0.4.5 after it has been released
more than one month, Cabal can provide ShellCheck v0.4.5
  • Loading branch information
PeterDaveHello committed Nov 23, 2016
1 parent 1ffa418 commit 5508f8d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,28 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
- fpcomplete-precise
- llvm-toolchain-precise
- llvm-toolchain-precise-3.8
packages:
- gcc-4.8
- g++-4.8
- clang-3.8
- lldb-3.8
- stack
- bc
- cabal-install
- ghc
- zsh
- ksh
cache:
directories:
- $HOME/.stack
- $HOME/.cabal
- $TRAVIS_BUILD_DIR/.cache
before_install:
- $SHELL --version 2> /dev/null || dpkg -s $SHELL 2> /dev/null || which $SHELL
- curl --version
- wget --version
- clang --version
- clang++ --version
- if [ -n "${SHELLCHECK-}" ]; then stack setup && stack install ShellCheck && shellcheck --version ; fi
- if [ -n "${SHELLCHECK-}" ]; then cabal update && cabal install transformers-0.4.3.0 ShellCheck && shellcheck --version ; fi
- if [ -z "${SHELLCHECK-}" ]; then sudo ln -sf /usr/bin/clang-3.8 /usr/bin/clang && sudo ln -sf /usr/bin/clang++-3.8 /usr/bin/clang++ && clang --version ; fi
install:
- (mkdir /tmp/urchin && cd /tmp/urchin && curl -s "$(curl -s https://registry.npmjs.com/urchin | grep -Eo '"tarball":\s*"[^"]+"' | tail -n 1 | awk -F\" '{ print $4 }')" -O && tar -x -f urchin*)
Expand All @@ -39,7 +38,7 @@ env:
global:
- CXX=g++-4.8
- CC=gcc-4.8
- PATH=$(echo $PATH | sed 's/::/:/')
- PATH="~/.cabal/bin/:$(echo $PATH | sed 's/::/:/')"
- NVM_DIR="${TRAVIS_BUILD_DIR}"
matrix:
- SHELLCHECK=true
Expand Down

0 comments on commit 5508f8d

Please sign in to comment.