Specializing the environment based on the image via for: is not working

Alex Grund's Avatar

Alex Grund

21 May, 2018 10:10 AM

I have to set some environment variables based on e.g. the image used (For example the Boost version, or the CMake Generator). This is described here: https://www.appveyor.com/docs/build-configuration/#specializing-mat...

However this is not working. The "Specialization" is always applied.

Example from yml:

environment:
  BOOST_ROOT: C:\Libraries\boost_1_60_0
  GENERATOR: Visual Studio 14 2015

for:
  - matrix:
      only:
        - image: Visual Studio 2017
    environment:
      BOOST_ROOT: C:\Libraries\boost_1_64_0
      GENERATOR: Visual Studio 15 2017

When run in the VS 2015 image I still get the VS 2017 generator environment variable. See https://ci.appveyor.com/project/Flow86/s25client/build/job/sk7w33yj...

Image: Visual Studio 2015; Configuration: Debug; Platform: Win32

echo "Configuring %GENERATOR% for %configuration% on %platform% with boost=%BOOST_ROOT%\%BOOST_LIBDIR%"

"Configuring Visual Studio 15 2017 for Debug on Win32 with boost=C:\Libraries\boost_1_64_0\lib32-msvc-15.0 "

Is this a bug on AppVeyor or did I use the feature wrong?

  1. 1 Posted by Alex Grund on 21 May, 2018 11:20 AM

    Alex Grund's Avatar

    Additionally: Is it possible to use this feature (if fixed) to set environment variables along multiple dimensions? Like:

    for:
    - matrix:
      only: image: Visual Studio 2017
    environment: GENERATOR: Visual Studio 15 2017
    - matrix:
      only: platform: Win32
    environment: LIB: LIB32
    

    This way one could use multiple images and multiple platforms and adjust the variables based specific features.

    Generally: A sandbox appveyor.yml evaluator would be great. One that shows the resulting configurations: A list of build-jobs and for each job the environment and scripts to be executed.

  2. Support Staff 2 Posted by Ilya Finkelshte... on 22 May, 2018 03:33 PM

    Ilya Finkelshteyn's Avatar

    Thank you for that catch! Please watch this issue. Will work on it asap.

  3. Support Staff 3 Posted by Ilya Finkelshte... on 24 May, 2018 04:54 AM

    Ilya Finkelshteyn's Avatar

    This is deployed, thanks again for the catch.

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

 

16 Jun, 2018 09:22 AM
15 Jun, 2018 09:31 PM
15 Jun, 2018 08:31 PM
15 Jun, 2018 04:29 PM
15 Jun, 2018 12:39 PM
15 Jun, 2018 12:37 PM