Here is my .travis.yml config file:
language: cpp
os:
- linux
- osx
dist:
- xenial
- bionic
osx_image:
- xcode10
- xcode11
- xcode12
compiler:
- clang
- gcc
env:
- CMAKE_GENERATOR='Unix Makefiles'
- CMAKE_GENERATOR='Ninja'
- CMAKE_GENERATOR='Xcode'
jobs:
exclude:
- os:
- linux
env:
- CMAKE_GENERATOR='Xcode'
# On MacOS, 'gcc' and 'g++' are just aliases for 'clang' and 'clang++'.
- os:
- osx
compiler:
- gcc
script:
- ./build.sh
What I would like, is for my config to build a 2 (dist) x 2 (compiler) x 2 (env) matrix for Linux, and a 3 (osx_image) x 3 (env) matrix for MacOS. However, there are no jobs created which use the Ubuntu Bionic distribution. I looked at the reference for the os and dist config variables, and found that os can be of type Enum (String) or Sequence of Enum (String), whereas dist can only be of type Enum (String), so it seems that I'm using the dist config variable incorrectly, above.
Could someone please explain how I could properly use the build matrix with multiple Ubuntu distributions?