# c.f. https://github.com/commercialhaskell/stack/wiki/Travis
sudo: false

before_install:
  # stack
  - mkdir -p bin
  - mkdir -p ~/.local/bin
  - mkdir -p ~/.local/lib
  - export PATH=~/.local/bin:$PATH
  - export LD_LIBRARY_PATH=~/.local/lib:$LD_LIBRARY_PATH
  - ./scripts/install-z3.sh
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
  - export PATH=/opt/ghc/7.10.3/bin:./bin/:$PATH

addons:
  apt:
    sources:
    - hvr-ghc
    packages:
    - ghc-7.10.3
    - libgmp-dev
    - openmpi-bin
    - libopenmpi-dev
script:
  - stack --no-terminal --skip-ghc-check build --ghc-options=-ferror-spans
  - stack install .
  - stack exec formura -- examples/pearson.fmr
  - ./cmake-for-x86.sh
  - make bin/pearson.out
  - travis_wait 30 stack exec formura -- examples/3d-mhd.fmr
  - mpicxx -c examples/3d-mhd.c
  - stack test
  - echo "done test"

# c.f. https://github.com/commercialhaskell/stack/wiki/Travis
sudo: false

before_install:
  # stack
  - mkdir -p bin
  - mkdir -p ~/.local/bin
  - mkdir -p ~/.local/lib
  - export PATH=~/.local/bin:$PATH
  - export LD_LIBRARY_PATH=~/.local/lib:$LD_LIBRARY_PATH
  - ./scripts/install-z3.sh
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
  - export PATH=/opt/ghc/7.10.3/bin:./bin/:$PATH

addons:
  apt:
    sources:
    - hvr-ghc
    packages:
    - ghc-7.10.3
    - libgmp-dev
    - openmpi-bin
    - libopenmpi-dev
script:
  - stack --no-terminal --skip-ghc-check build --ghc-options=-ferror-spans
  - stack install .
  - stack exec formura -- examples/pearson.fmr
  - ./cmake-for-x86.sh
  - make bin/pearson.out
  - travis_wait 30 stack exec formura -- examples/3d-localsun.fmr
  - travis_wait 30 mpicxx -I fj_dummy -c examples/3d-localsun.*c*
  - stack test
  - echo "done test"

Test for compilability of localsun application
Test for compilability of localsun application
