language: cpp
cache: apt
env:
  matrix:
     #- UBUNTU_DIST=trusty
     #  BUILD_TYPE=Release  
     - UBUNTU_DIST=xenial
       BUILD_TYPE=Release
     - UBUNTU_DIST=bionic
       BUILD_TYPE=Release
       
services:
  - docker

install: true

script:
  - docker build --build-arg UBUNTU=${UBUNTU_DIST} --build-arg BUILD_TYPE=${BUILD_TYPE} -t seahorn/crab_${UBUNTU_DIST}_rel -f docker/crab.Dockerfile .
  
  - 'if [ "$TRAVIS_EVENT_TYPE" = "cron" ] ;
        then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
          && docker push seahorn/crab_${UBUNTU_DIST}_rel:latest ;
     fi '
  
notifications:
  email:
    recipients:
     - navasjorgea@gmail.com
    on_success: always
    on_failure: always

language: cpp
cache: apt
branches:
  except:
  - crab_language
env:
  matrix:
     #- UBUNTU_DIST=trusty
     #  BUILD_TYPE=Release  
     - UBUNTU_DIST=xenial
       BUILD_TYPE=Release
     - UBUNTU_DIST=bionic
       BUILD_TYPE=Release
       
services:
  - docker

install: true

script:
  - docker build --build-arg UBUNTU=${UBUNTU_DIST} --build-arg BUILD_TYPE=${BUILD_TYPE} -t seahorn/crab:${UBUNTU_DIST} -f docker/crab.Dockerfile .
  
  - 'if [ "$TRAVIS_EVENT_TYPE" = "cron" ] ;
        then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
          && docker push seahorn/crab:${UBUNTU_DIST};
     fi '
  
notifications:
  email:
    recipients:
     - navasjorgea@gmail.com
    on_success: always
    on_failure: always

Create tag names using UBUNTU_DIST
Create tag names using UBUNTU_DIST
