Support multiple env: (environment variables -- based) axes via a list of lists

travis-build

#1

This feature was requested in e.g. https://stackoverflow.com/questions/46575415/can-i-multiply-options-in-matrix-include-with-the-env-option , https://github.com/travis-ci/travis-ci/issues/1519 .

The stumbling block seems to be that the root level of .travis.yml is a hash table, so it can’t have duplicate keys, nor can it contain list entries.

However, YAML supports lists of lists:

env:
    - - VAR1=foo
      - VAR1=bar
    - - VAR2=baz
      - VAR2=xyzzy

and detecting a list of lists as opposed to a regular list is rather straightforward.

I would not allow both regular list entries and these nested ones, as well as deeper nesting, 'cuz that would rather be submatrices to build matrix – and unrelated complex problems will arise like if parent values should be inherited. For now, I’m only suggesting an equivalent to multiple env: blocks.

(The implementation should be straightforward but I don’t know Ruby so would like to get some feedback before I consider investing significant time into learning it to write a PR.)


#2

Not sure about the implementation you suggest, but I have the same problem so linked to this feature request from the SO question at https://stackoverflow.com/questions/46575415/can-i-multiply-options-in-matrix-include-with-the-env-option.