diff --git a/.ci/deps.sh b/.ci/deps.sh index 19a048aafa..817cb4fa32 100644 --- a/.ci/deps.sh +++ b/.ci/deps.sh @@ -5,6 +5,7 @@ set -x case $CIRCLE_NODE_INDEX in 0) dep_versions=( "3.4.3" "3.5.1" ) ;; 1) dep_versions=( "3.4.3" ) ;; + -1) dep_versions=( ) ;; # set by .travis.yml *) dep_versions=( "3.5.1" ) ;; esac @@ -72,12 +73,11 @@ if [[ -z "$(which hlint)" ]]; then fi # NPM commands -sudo rm -rf /opt/alex # Delete ghc-alex as it clashes with npm deps +sudo rm -rf $(which alex) # Delete ghc-alex as it clashes with npm deps npm install # R commands -mkdir -p ~/.RLibrary -echo '.libPaths( c( "~/.RLibrary", .libPaths()) )' >> .Rprofile +echo '.libPaths( c( "'"$R_LIB_USER"'", .libPaths()) )' >> .Rprofile echo 'options(repos=structure(c(CRAN="http://cran.rstudio.com")))' >> .Rprofile R -e "install.packages('lintr', dependencies=TRUE, quiet=TRUE, verbose=FALSE)" R -e "install.packages('formatR', dependencies=TRUE, quiet=TRUE, verbose=FALSE)" @@ -119,7 +119,7 @@ if ! dartanalyzer -v &> /dev/null ; then fi # VHDL Bakalint Installation -if [ ! -e ~/bakalint-0.4.0 ]; then +if [ ! -e ~/bakalint-0.4.0/bakalint.pl ]; then wget "http://downloads.sourceforge.net/project/fpgalibre/bakalint/0.4.0/bakalint-0.4.0.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Ffpgalibre%2Ffiles%2Fbakalint%2F0.4.0%2F&ts=1461844926&use_mirror=netcologne" -O ~/bl.tar.gz tar xf ~/bl.tar.gz -C ~/ fi diff --git a/.ci/deps.shellcheck.sh b/.ci/deps.shellcheck.sh index 9e1b889fe9..7395bff577 100644 --- a/.ci/deps.shellcheck.sh +++ b/.ci/deps.shellcheck.sh @@ -6,7 +6,7 @@ BIN_PATH=~/.cabal/bin/shellcheck function install_shellcheck { cabal update --verbose=0 - cabal install --verbose=0 shellcheck-$VERSION + cabal install --verbose=0 --force-reinstalls shellcheck-$VERSION } function currently_installed_shellcheck_version { diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..b9e79e47ee --- /dev/null +++ b/.travis.yml @@ -0,0 +1,97 @@ +sudo: required + +language: python +python: + - 3.4 + - 3.5 + +dist: trusty + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + - avsm # OPAM stable + - hvr-ghc # Haskell + packages: + - cabal-install + - chktex + - clang-3.4 + - cppcheck + - espeak + - ghc + - haskell-platform + - indent + - libblas-dev + - liblapack-dev + - libxml2-utils + - luarocks + - menhir + - mono-mcs + - oracle-java9-set-default + - php-codesniffer + - verilator + +cache: + pip: true + directories: + # Installed language package caches + - ~/.cabal + - ~/R/Library + - ~/.julia + - $TRAVIS_BUILD_DIR/node_modules + - $TRAVIS_BUILD_DIR/.bundle + - $TRAVIS_BUILD_DIR/vendor + # coala managed data + - ~/nltk_data + - ~/.local/share/coala-bears + # .deb cache + - ~/.apt-cache + # Installed linters + - ~/infer-linux64-v0.7.0 + - ~/pmd-bin-5.4.1 + - ~/bakalint-0.4.0 + - ~/dart-sdk/bin + +env: + global: + - CIRCLE_NODE_INDEX=-1 # Avoid accidentially being a CircleCI worker + - USE_PPAS=true + - R_LIB_USER=~/R/Library + - LINTR_COMMENT_BOT=false + - PATH="$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin:$TRAVIS_BUILD_DIR/vendor/bin:$HOME/dart-sdk/bin:$HOME/.cabal/bin:$HOME/infer-linux64-v0.7.0/infer/bin:$HOME/pmd-bin-5.4.1/bin:/$HOME/bakalint-0.4.0" + +before_install: + - nvm install 4 + - nvm use 4 + # Remove Ruby directive from Gemfile as this image has 2.2.5 + - sed -i '/^ruby/d' Gemfile + - mkdir -p ~/.apt-cache + - bash .ci/deps.sh + - bash .ci/deps.shellcheck.sh + # https://github.com/coala/coala/issues/3183 + # https://github.com/coala/coala/issues/3184 + - pip install -U py==1.4.29 pip + - cat test-requirements.txt docs-requirements.txt >> requirements.txt + - sed -i '/^-r/d' requirements.txt + - echo 'language_check==0.8.*' >> requirements.txt + +before_script: + - julia -e 'Pkg.add("Lint")' + - python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger + +script: + - bash .ci/tests.sh + - python setup.py install + # https://github.com/coala/coala-bears/issues/1037 + - > + if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then + sed -i '/bears = GitCommitBear/d' .coafile + fi + - coala --non-interactive + - bash .ci/deploy.coverage.sh + - rm -rf docs/API && make -C docs clean + - python setup.py docs + +notifications: + email: false diff --git a/circle.yml b/circle.yml index f75738d087..07c372bb6e 100644 --- a/circle.yml +++ b/circle.yml @@ -25,7 +25,9 @@ dependencies: - echo 'export PATH=$PATH:~/infer-linux64-v0.7.0/infer/bin' >> ~/.circlerc - echo 'export PATH=$PATH:~/pmd-bin-5.4.1/bin' >> ~/.circlerc - echo 'export PATH=$PATH:~/bakalint-0.4.0' >> ~/.circlerc + - echo 'export R_LIB_USER=~/.RLibrary' >> ~/.circlerc - sed -i '/source \/home\/ubuntu\/virtualenvs\//d' ~/.circlerc + - mkdir -p ~/.RLibrary - nvm alias default node override: - bash .ci/deps.shellcheck.sh