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:

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

  - matrix:
        - image: Visual Studio 2017
      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:

    - 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.

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

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

Keyboard shortcuts


? 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