# Based on the "trust" template v0.1.1
# https://github.com/japaric/trust/tree/v0.1.1

dist: trusty
language: rust
services: docker
sudo: required

env:
  global:
    - CRATE_NAME=region

matrix:
  include:
    # Linux
    - env: TARGET=i686-unknown-linux-gnu
    - env: TARGET=x86_64-unknown-linux-gnu

    # OSX
    - env: TARGET=i686-apple-darwin
      os: osx
    - env: TARGET=x86_64-apple-darwin
      os: osx

    # Other architectures
    - env: TARGET=aarch64-unknown-linux-gnu
    - env: TARGET=armv7-unknown-linux-gnueabihf

before_install: set -e

install:
  - sh ci/install.sh
  - source ~/.cargo/env || true

script:
  - bash ci/script.sh

after_script: set +e

deploy: off

cache: cargo
before_cache:
  # Travis can't cache files that are not readable by "others"
  - chmod -R a+r $HOME/.cargo

branches:
  only:
    # release tags
    - /^v\d+\.\d+\.\d+.*$/
    - master

notifications:
  email:
    on_success: never
