language: cpp
sudo: required

services:
  - docker

matrix:
  include:
    - env: BUILD_TYPE=gcc CXX=g++-8
    - env: BUILD_TYPE=clang CXX=clang++-6.0 CONFIG_FLAGS="-DSLANG_COVERAGE=ON -DSLANG_SANITIZERS=undefined,address"

before_install:
  - docker pull mpopoloski/slang:latest
  - docker run -itd --name build mpopoloski/slang:latest
  - docker exec build git clone https://github.com/MikePopoloski/slang.git

install:
  - docker exec build /bin/sh -c "cd slang && mkdir build && cd build && cmake $BUILD_FLAGS .."

script:
  - export ci_env=`bash <(curl -s https://codecov.io/env)`
  - if [ "$BUILD_TYPE" == "clang" ]; then docker exec $ci_env build slang/scripts/build_clang.sh; fi
  - if [ "$BUILD_TYPE" == "gcc" ]; then docker exec $ci_env build slang/scripts/build_gcc.sh; fi

branches:
  only:
    - /.*/

git:
  depth: 1
language: cpp
sudo: required

services:
  - docker

matrix:
  include:
    - env: BUILD_TYPE=gcc MATRIX_ENV="CC=gcc-8 && CXX=g++-8"
    - env: BUILD_TYPE=clang MATRIX_ENV="CC=clang-6.0 && CXX=clang++-6.0" CONFIG_FLAGS="-DSLANG_COVERAGE=ON -DSLANG_SANITIZERS=undefined,address"

before_install:
  - docker pull mpopoloski/slang:latest
  - docker run -itd --name build mpopoloski/slang:latest
  - docker exec build git clone https://github.com/MikePopoloski/slang.git

install:
  - docker exec build /bin/sh -c "$MATRIX_ENV; cd slang && mkdir build && cd build && cmake $CONFIG_FLAGS .."

script:
  - export ci_env=`bash <(curl -s https://codecov.io/env)`
  - if [ "$BUILD_TYPE" == "clang" ]; then docker exec $ci_env build slang/scripts/build_clang.sh; fi
  - if [ "$BUILD_TYPE" == "gcc" ]; then docker exec $ci_env build slang/scripts/build_gcc.sh; fi

branches:
  only:
    - /.*/

git:
  depth: 1
Set build vars correctly in Travis build
Set build vars correctly in Travis build
