language: rust

rust:
    - nightly

cache: 
  cargo: true
  directories:
    - $HOME/qemu

before_script:
  - rustup component add rust-src
  - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
  - (test -x $HOME/.cargo/bin/xargo || cargo install xargo)
  - cargo install-update -a
  # setup qemu
  - bash -e travis-qemu.sh
  - export PATH=$PATH:$HOME/qemu/bin

sudo: false

notifications:
    email:
        on_failure: change

addons:
  apt:
    packages:
      - nasm

env:
  matrix:
    - TASK="build"
    - TASK="run travis=1"

script:
  - make ${TASK}