language: rust
services: docker
sudo: required

matrix:
  include:
    - env: TARGET=aarch64-unknown-linux-gnu
    - env: TARGET=armv7-unknown-linux-gnueabihf
    - env: TARGET=i686-unknown-linux-gnu
    - env: TARGET=mips-unknown-linux-gnu
    - env: TARGET=mips64-unknown-linux-gnuabi64
    - env: TARGET=mips64el-unknown-linux-gnuabi64
    - env: TARGET=mipsel-unknown-linux-gnu
    - env: TARGET=powerpc-unknown-linux-gnu
    - env: TARGET=powerpc64-unknown-linux-gnu
    - env: TARGET=powerpc64le-unknown-linux-gnu
    - env: TARGET=x86_64-unknown-linux-gnu
    - env: TARGET=cargo-fmt
      rust: beta

before_install: set -e

install:
  - bash ci/install.sh

script:
  - bash ci/script.sh

after_script: set +e

cache: cargo

before_cache:
  - chmod -R a+r $HOME/.cargo;

branches:
  only:
    - staging
    - trying
