Possible to have two matrices in the same .drone.yml?

Currently drone supports matrix:

pipeline:
  build:
    image: golang:${TAG}
    commands:
      - go build
      - go test

matrix:
  TAG:
    - 1.7
    - 1.8
    - latest

is it possible to specify multiple matrix so certain command can use one vs the other

For example:

pipeline:
  build:
    image: golang:${TAG}
    matrix: matrix1
    commands:
      - go build
      - go test

  build2:
    image: golang:${TAG}
    matrix: matrix2
    commands:
      - go build
      - go test

matrix:
  name: matrix1
    TAG:
      - 1.7
      - 1.8
  name: matrix2
    TAG:
      - 1.9
      - 2.0

I believe you can use the when clause to limit step execution to specific matrix values:

pipeline:
  build:
    image: golang:${TAG}
    matrix: matrix1
    commands:
      - go build
      - go test

  build2:
    image: golang:${TAG}
    commands:
      - go build
      - go test
+   when:
+     matrix:
+       TAG: 1.9
  
matrix:
  TAG: [ 1.7, 1.8, 1.9, 2.0 ]

I do not think you can specify multiple tag values at this time (e.g. TAG: [ 1.9, 2.0 ]) in the when clause.

Note that one workaround would be to enumerate the matrix as an array (below) and to include a parameter that indicates if the step should be executed. Something like this, for example:

pipeline:
  build:
    image: golang:${TAG}
    matrix: matrix1
    commands:
      - go build
      - go test

  build2:
    image: golang:${TAG}
    commands:
      - go build
      - go test
+   when:
+     matrix:
+       BUILD2: true
  
matrix:
  include:
    - TAG: 1.7
      BUILD2: false
    - TAG: 1.8
      BUILD2: false
    - TAG: 1.9
      BUILD2: true
    - TAG: 2.0
      BUILD2: true

I think it would work. I will try it out and see if it makes things too complex to maintain

does not seem to work. does BUILD2 needs to be caps?

Never mind. It works. Yaml indentations!