# Use container-based infrastructure
sudo: false

language: scala

jdk: oraclejdk8

scala:
  - 2.11.7

# These directories are cached to S3 at the end of the build
cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt/boot/

before_cache:
  # Tricks to avoid unnecessary cache updates
  - find $HOME/.sbt -name "*.lock" | xargs rm
  - find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm

before_install:
  - wget https://bitcoincore.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-x86_64-linux-gnu.tar.gz
  - tar -xzf bitcoin-0.16.3-x86_64-linux-gnu.tar.gz
  - cd bitcoin-0.16.3/bin
  - export PATH=$PATH:$(pwd)
  - cd ../..

addons:
  apt:
    packages: libgmp-dev

install:
  - mkdir lib && cd secp256k1
  - ./autogen.sh
  - ./configure --enable-jni --enable-experimental --enable-module-ecdh
  - sudo make install
  - cd ../
script:
  - sbt clean coverage test &&
    sbt coverageReport &&
    sbt coverageAggregate
after_success:
  - sbt coveralls

# Use container-based infrastructure
sudo: false

language: scala

jdk: oraclejdk8

scala:
  - 2.11.7

# These directories are cached to S3 at the end of the build
cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt/boot/

before_cache:
  # Tricks to avoid unnecessary cache updates
  - find $HOME/.sbt -name "*.lock" | xargs rm
  - find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm

before_install:
  - wget https://bitcoincore.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-x86_64-linux-gnu.tar.gz
  - tar -xzf bitcoin-0.16.3-x86_64-linux-gnu.tar.gz
  - cd bitcoin-0.16.3/bin
  - export PATH=$PATH:$(pwd)
  - cd ../..

addons:
  apt:
    packages: libgmp-dev

install:
  - mkdir lib && cd secp256k1
  - ./autogen.sh
  - ./configure --enable-jni --enable-experimental --enable-module-ecdh
  - sudo make install
  - cd ../
script:
  - sbt clean coverage test &&
    sbt core/coverageReport &&
    sbt coverageAggregate
after_success:
  - sbt coveralls

Make core the only module covered by code coverage
Make core the only module covered by code coverage
