# adapted from
# https://github.com/greghendershott/travis-racket/blob/master/.travis.yml
# Thanks Greg!

language: c
sudo: false

env:
  global:
    - RACKET_DIR=~/racket
  matrix:
    # natipkg builds for 6.12 and 7.0 have ssl but (see https://github.com/racket/racket/issues/2184)
    #- RACKET_VERSION=6.12
    #- RACKET_VERSION=7.0
    - RACKET_VERSION=7.1
    - RACKET_VERSION=7.2
    # natipkg builds not available for HEAD or HEADCS
    #- RACKET_VERSION=HEAD
    #- RACKET_VERSION=HEADCS

# You may want to test against certain versions of Racket, without
# having them count against the overall success/failure.
matrix:
  allow_failures:
    #- env: RACKET_VERSION=HEAD
  # Fast finish: Overall build result is determined as soon as any of
  # its rows have failed, or, all of its rows that aren't allowed to
  # fail have succeeded.
  fast_finish: true

before_install:
  - git clone https://github.com/mbutterick/travis-racket.git
  - cat travis-racket/install-racket.sh | RACKET_NATIPKG=1 bash # pipe to bash not sh!
  - export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us

script:
 - cd ..   # Travis did a cd into the dir. Back up, for the next:
 - travis_retry raco pkg install --deps search-auto https://github.com/mbutterick/xenomorph.git
 - travis_retry raco pkg install --deps search-auto https://github.com/mbutterick/fontland.git
 - travis_retry raco pkg install --deps search-auto https://github.com/mbutterick/pitfall.git
 - travis_retry raco pkg install --deps search-auto https://github.com/mbutterick/quad.git
 - raco test -p quad
