TRAVIS_COMPILER wrong value?


#1

Description

It seems the export of compiler variable name is ill-formed i.e. it uses ["gcc"] instead of gcc

Protocol

Just create a simple .travis.yml

sudo: false
language: cpp
matrix:
  include:
   - os: linux
      dist: trusty
      compiler:
        - gcc
...

Observed

$ export TRAVIS_COMPILER=["gcc"]
$ export CXX=g++
$ export CC=gcc
$ ["gcc"] --version
[gcc]: command not found

Source log: https://travis-ci.org/Mizux/abseil-cpp/jobs/446079817#L423-L428


#2

My bad, when using Matrix include you must use

  include:
   - os: linux
      dist: trusty
      compiler: gcc

note: for env the interpreter simply call export X for each row
e.g.

 include:
   - os: linux
      dist: trusty
      env:
        - FOO=ON
        - BAR=OFF

you’ll get

...
export FOO=ON
export BAR=OFF