Multiple build matrix dimensions from environment variables

ivan_pozdeev's Avatar

ivan_pozdeev

18 Dec, 2017 02:36 AM

It is possible to do subj? I'm thinking of something like this:

environment:
  matrix:
    - PYTHON: "C:/Python27"
    - PYTHON: "C:/Python27-x64"
    - PYTHON: "C:/Python34"
    - PYTHON: "C:/Python34-x64"
    - PYTHON: "C:/Python35"
    - PYTHON: "C:/Python35-x64"
    - PYTHON: "C:/Python36"
    - PYTHON: "C:/Python36-x64"
  matrix:
    - ENABLE_CONTRIB: 0
    - ENABLE_CONTRIB: 1

which would produce all combinations of PYTHON and ENABLE_CONTRIB. The above code gives "duplicate key" error in the appveyor.yml validation tool.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 18 Dec, 2017 10:38 PM

    Ilya Finkelshteyn's Avatar

    Ivan,

    Environment variables are only single dimension in the build matrix. You have to enter those combination manually like in the example below. Also not that you do not need a double quotes (")

    environment:
      matrix:
      - PYTHON: C:/Python27
        ENABLE_CONTRIB: 0
      - PYTHON: C:/Python27
        ENABLE_CONTRIB: 1
      - PYTHON: C:/Python27-x64
        ENABLE_CONTRIB: 0
      - PYTHON: C:/Python27-x64
        ENABLE_CONTRIB: 1
      ...
    

    Ilya.

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:25 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac