1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00
semantic/.travis.yml

57 lines
1.8 KiB
YAML

language: c
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
- $TRAVIS_BUILD_DIR/dist-newstyle
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv $HOME/.cabal/packages/head.hackage
matrix:
include:
- compiler: "ghc-8.6.5"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5], sources: [hvr-ghc]}}
before_install:
- mkdir -p $HOME/.local/bin
- curl -L -o /tmp/hlint.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v2.2.3/hlint-2.2.3-x86_64-linux.tar.gz"
- tar -xf /tmp/hlint.tar.gz -C /tmp
- cp /tmp/hlint-2.2.3/hlint $HOME/.local/bin
- cp -r /tmp/hlint-2.2.3/data $HOME/.local/bin
- "PATH=/opt/ghc/bin:$HOME/local/bin:$PATH"
- ghc --version
- cabal --version
- hlint --version
install:
- cabal v2-update -v
- cabal v2-configure --enable-tests --enable-benchmarks --disable-optimization --write-ghc-environment-files=always --jobs=2
- cabal v2-build --only-dependencies
script:
- hlint src semantic-python
- cabal v2-build
- cabal v2-run semantic:test
- cabal v2-run semantic-core:test
- cabal v2-run semantic-python:test
- cd semantic-source; cabal v2-run semantic-source:test; cd ..
- cd semantic-source; cabal v2-run semantic-source:doctest; cd ..
# parse-examples is disabled because it slaughters our CI
# - cabal v2-run semantic:parse-examples
# Any branch linked with a pull request will be built, as well as the non-PR
# branches listed below:
branches:
only:
- master