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.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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