xargo 0.1.13

Effortless cross compilation to custom bare-metal targets like ARM Cortex-M
cache: cargo
language: rust
os: linux
rust: stable
sudo: false
env:
  global:
    - PROJECT_NAME=xargo

matrix:
  exclude:
    - rust: stable
  include:
    # Stable channel
    - env: TARGET=i686-apple-darwin
      os: osx
    - env: TARGET=i686-unknown-linux-gnu PKG_CONFIG_ALLOW_CROSS=yes
      addons:
        apt:
          packages: &i686_unknown_linux_gnu
            # Cross compiler and required cross compiled C libraries
            - gcc-multilib
            - libssl-dev:i386
            - libssh2-1-dev:i386
    - env: TARGET=x86_64-apple-darwin
      os: osx
    - env: TARGET=x86_64-unknown-linux-gnu
      addons:
        apt:
          packages: &x86_64_unknown_linux_gnu
            # required C libraries
            - libssh2-1-dev
    # Nightly channel
    - env: TARGET=i686-apple-darwin
      os: osx
      rust: nightly
    - env: TARGET=i686-unknown-linux-gnu PKG_CONFIG_ALLOW_CROSS=yes
      rust: nightly
      addons:
        apt:
          packages: *i686_unknown_linux_gnu
    - env: TARGET=x86_64-apple-darwin
      os: osx
      rust: nightly
    - env: TARGET=x86_64-unknown-linux-gnu
      rust: nightly
      addons:
        apt:
          packages: *x86_64_unknown_linux_gnu

install:
  - curl https://static.rust-lang.org/rustup.sh |
     sh -s -- --add-target=$TARGET --disable-sudo -y --prefix=`rustc --print sysroot`

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

before_deploy:
  - bash ci/before_deploy.sh

deploy:
  provider: releases
  api_key:
    secure: hZg6JAGVDCpRI5qbxpuJcYmo+0OGZyCjuxiwXgSC537HCwri4a0gypJFubZO3NwUTvu03Ibgk0Nj/tSOyjy71A7nCKwrZnGBPzy4Q/G7lT5uIEtpqgS4WjOqWg7tMm/VaXkapi3m72gEEIp/hdaBj7l+d1hBstz4c7L1oJAwixE5e+0MVbEh+v2ISahXOWz0nt1E8tDKNSPRg5jFhZy+gboTLmKVJpBkHqVEn+K+A8CAxtA6dc26GZK6x4jLuvu7gXj9T91RpLO9b8+AQylFKNLFCbeyDVC3+GakPxxU5zVuUat0LXvpWB+kiBW2NUxI15kki+PaOoHItQOUKaeRWNeSZk2sKo43oy51Z1EWrhj0ukB0q2Nu1JLUFv/sMaIJNBauAhYPLneqIyfv8cJguf6JiOLDkFq8E1K90gswlgB8u91nXCIqOyXYcv9H2A+m0A9ZbdPEP6KDuPlqpVUaTnTfH+9RIZw4hIVFSwAQCWz3NvyF1/Mc1kKoOOvXo/wZOwshOMu3eiyIeXvNEPrnwE+9zZFHs5FQ8Q/+qe+0exrVGyMRZxuGZt+FSy/XIJ+cHkyGYVgB76O/hsHaG4ojH991p10zXKKMPr2xOl5QssKLF8CUw+QZFV4XGhUEd85dWNtYNqJwr2hnj/4YhNgyGUNEXVJlMoNqTxtZciPvzWQ=
  file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz
  # don't delete the artifacts from previous phases
  skip_cleanup: true
  # deploy when a new tag is pushed
  on:
    condition: $TRAVIS_RUST_VERSION = stable
    tags: true

branches:
  only:
    - auto
    - try
    - /^v\d+\.\d+\.\d+.*$/

notifications:
  email:
    on_success: never
  notifications:
      webhooks: https://homu.herokuapp.com/travis