tag:help.appveyor.com,2012-11-13:/discussions/questions/15163-multiuple-build-matrix-dimensions-from-environment-variablesAppVeyor: Discussion 2018-08-25T02:25:43Ztag:help.appveyor.com,2012-11-13:Comment/443255362017-12-18T02:36:58Z2017-12-18T02:38:04ZMultiple build matrix dimensions from environment variables<div><p>It is possible to do subj? I'm thinking of something like this:</p>
<pre>
<code>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</code>
</pre>
<p>which would produce all combinations of <code>PYTHON</code> and <code>ENABLE_CONTRIB</code>. The above code gives "duplicate key" error in the <code>appveyor.yml</code> validation tool.</p></div>ivan_pozdeevtag:help.appveyor.com,2012-11-13:Comment/443255362017-12-18T22:38:06Z2017-12-18T22:38:06ZMultiple build matrix dimensions from environment variables<div><p>Ivan,</p>
<p>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 (<code>"</code>)</p>
<pre>
<code>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
...</code>
</pre>
<p>Ilya.</p></div>Ilya Finkelshteyn