sudo: required
dist: xenial

addons:
  apt:
    sources:
      - sourceline: 'ppa:ondrej/php'
    packages:
      - mysql-server

services:
  - mysql

stages:
  - test
  # - deploy

language: node_js
node_js: 10

cache:
  directories:
    - $HOME/haxe

os:
  - linux
  # - osx

env:
  - HAXE_VERSION=3.4.7
  - HAXE_VERSION=latest
  - HAXE_VERSION=nightly
  
install:
  - npm i -g lix
  - npm install
  - lix install haxe $HAXE_VERSION
  - lix download
  - if [[ "$(haxe -version)" =~ ^4.* ]]; then sudo apt-get install php7.0-cli php7.0-mysql; else sudo apt-get install php5.6-cli php5.6-mysql; fi

  
script:
  - lix run travix node
  - lix run travix php

# jobs:
#   include:
#     # - stage: test # should uncomment this when there is no matrix above (e.g. only one os, one env, etc)
#     - stage: deploy
#       os: linux
#       install:
#         - npm i -g lix
#         - lix download
#       script: skip
#       env:
#         secure: xxxxxxxx
#       after_success:
#         - lix run travix install
#         - lix run travix release

sudo: required
dist: xenial

addons:
  apt:
    sources:
      - sourceline: 'ppa:ondrej/php'
    packages:
      - mysql-server

services:
  - mysql

stages:
  - test
  # - deploy

language: node_js
node_js: 10

cache:
  directories:
    - $HOME/haxe

os:
  - linux
  # - osx

env:
  - HAXE_VERSION=latest
  - HAXE_VERSION=nightly
  
install:
  - npm i -g lix
  - npm install
  - lix install haxe $HAXE_VERSION
  - lix download
  - if [[ "$(haxe -version)" =~ ^4.* ]]; then sudo apt-get install php7.0-cli php7.0-mysql; else sudo apt-get install php5.6-cli php5.6-mysql; fi

  
script:
  - lix run travix node
  # - lix run travix php

# jobs:
#   include:
#     # - stage: test # should uncomment this when there is no matrix above (e.g. only one os, one env, etc)
#     - stage: deploy
#       os: linux
#       install:
#         - npm i -g lix
#         - lix download
#       script: skip
#       env:
#         secure: xxxxxxxx
#       after_success:
#         - lix run travix install
#         - lix run travix release

Disable haxe3 and php test for now
Disable haxe3 and php test for now
