Multi-OS build matrix not working

Can someone enlighten me as to why the following build matrix is not producing any macOS builds (but still attempting to build on Linux)?

language: cpp

env:
  LINUX_DEPS="cmake libopencv-dev libopencv-contrib-dev libopencv-imgcodecs-dev libprotobuf-dev protobuf-compiler qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev qtquickcontrols2-5-dev"
  MACOS_DEPS="cmake opencv protobuf qt"

matrix:
  include:
    # ubuntu lacks dnn support in OpenCV
    #- os: linux
    #  dist: bionic
    #  compiler: clang
    - os: osx
      compiler: clang

before_install:
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -y; fi
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y $LINUX_DEPS; fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install $MACOS_DEPS; fi

jobs:
  include:
    - stage: lint
      script:
        - make format
    - stage: build
      script:
        - make build

stages:
  #- lint
  - build

A misbehaving build with that config can be found at: https://travis-ci.org/raymanfx/seraphim/builds/564598607.
I have been following the docs at https://docs.travis-ci.com/user/multi-os/#example-multi-os-build-matrix, but the approach does not appear to work out for me.

You have both matrix and jobs, which are aliases of each other, and only the latter is effective.

Thank you very much, I was not aware of that.
Two more questions: I modified my config like this:

language: cpp

env:
LINUX_DEPS=“cmake libopencv-dev libopencv-contrib-dev libopencv-imgcodecs-dev libprotobuf-dev protobuf-compiler qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev qtquickcontrols2-5-dev”
MACOS_DEPS=“cmake opencv protobuf qt”

matrix:
  include:
    # ubuntu lacks dnn support in OpenCV
    #- os: linux
    #  dist: bionic
    #  compiler: clang
    #  stage: lint
    #    script:
    #      - make format
    #  stage: build
    #    script:
    #      - make build
    - os: osx
      compiler: clang
      stage: lint
        script:
          - make format
      stage: build
        script:
          - make build

before_install:
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -y; fi
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y $LINUX_DEPS; fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install $MACOS_DEPS; fi

stages:
  #- lint
  - build

Is there a way to make the two stages expand to every matrix entry so I don’t have to specify them for each os/dist?

Furthermore, a job with that config just failed: https://travis-ci.org/raymanfx/seraphim/jobs/564653333. Any idea why the “brew install” command returned exit code 1? I can’t seem to spot the point where the error occured.

Imprint