language: c

sudo: false

env:
  matrix:
    - LUA=lua-5.1.5
    - LUA=lua-5.2.4
    - LUA=lua-5.3.2 URN_COVERAGE=1

before_install:
  - source .build/setup_env.sh

script:
  - echo -e "\033[36mBuilding initial compiler\033[0m"
  - make LUA=lua all
  - echo -e "\033[36mBuilding compiler using new compiler\033[0m"
  - make LUA=lua all
  - echo -e "\033[36mComparing output of compiler\033[0m"
  - export TEMP_DIR=$(mktemp -d)
  - make LUA=lua OUT_DIR="$TEMP_DIR" TIME=1 all
  - "! (diff -rq \"$TEMP_DIR\" bin | grep \"$TEMP_DIR\")"
  - echo -e "\033[36mRunning tests\033[0m"
  - if [ -n "$URN_COVERAGE" ]; then make LUA=lua TEST_FLAGS=--profile=coverage -k test; else make LUA=lua -k test; fi
  - echo -e "\033[36mBuilding docs\033[0m"
  - make LUA=lua docs

after_success:
  - if [ -n "$URN_COVERAGE" ]; then make LUA=lua gen_coverage > /dev/null && bash <(curl -s https://codecov.io/bash); fi

language: c

sudo: false

env:
  matrix:
    - LUA=lua-5.1.5
    - LUA=lua-5.2.4
    - LUA=lua-5.3.2 URN_COVERAGE=1

before_install:
  - source .build/setup_env.sh

script:
  - echo -e "\033[36mBuilding initial compiler\033[0m"
  - make LUA=lua all
  - echo -e "\033[36mBuilding compiler using new compiler\033[0m"
  - make LUA=lua all
  - echo -e "\033[36mComparing output of compiler\033[0m"
  - export TEMP_DIR=$(mktemp -d)
  - make LUA=lua OUT_DIR="$TEMP_DIR" TIME=1 all
  - "! (diff -rq \"$TEMP_DIR\" bin | grep \"$TEMP_DIR\")"
  - echo -e "\033[36mRunning tests\033[0m"
  - if [ -n "$URN_COVERAGE" ]; then make LUA=lua TEST_FLAGS=--profile=coverage -k test; else make LUA=lua -k test; fi
  - echo -e "\033[36mBuilding docs\033[0m"
  - make LUA=lua docs

after_success:
  - if [ -n "$URN_COVERAGE" ]; then make LUA=lua gen_coverage > /dev/null && bash <(curl -s https://codecov.io/bash); fi

notifications:
  email:
    on_success: never
    on_failure: change
  irc: "chat.freenode.net#urn"

Reduce number of emails sent by Travis
Reduce number of emails sent by Travis
