language: generic
dist: bionic
sudo: false
env:
  global:
    - DEVKITPRO=$HOME
    - DEVKITARM=$DEVKITPRO/devkitARM
addons:
  apt:
    packages:
      - gcc-multilib
      - linux-libc-dev
      - zlib-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 && sh build.sh && 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 tools CXX=g++-7
        - make -j2 compare
        - make -j2 compare_leafgreen
        - make -j2 compare_firered_rev1
        - make -j2 compare_leafgreen_rev1
after_success:
  - .travis/calcrom/webhook.sh pokefirered
