language: generic
dist: trusty
sudo: false
env:
  global:
    - DEVKITPRO=$HOME
    - DEVKITARM=$DEVKITPRO/devkitARM
addons:
  apt:
    packages:
      - gcc-multilib
      - linux-libc-dev
cache:
  apt: true
install:
  - pushd $HOME
  - travis_retry wget https://github.com/devkitPro/buildscripts/releases/download/devkitARM_r50/devkitARM_r50-linux.tar.xz
  - tar xJf devkitARM*.tar.xz
  - travis_retry git clone https://github.com/pret/agbcc.git
  - cd agbcc && ./build.sh && ./install.sh $TRAVIS_BUILD_DIR
  - popd
matrix:
  include:
    - os: linux
      addons:
        apt:
          sources:
              - ubuntu-toolchain-r-test
          packages:
            - g++-7
      env: _="Build"
      script:
        - make -j2 tools CXX=g++-7
        - make -j2 compare
        - make -j2 modern
after_success:
  - .travis/calcrom/webhook.sh pokeemerald