runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

[all OSs] The VCPKG_ROOT variable will be removed from runner images

Open ddobranic opened this issue 1 year ago • 2 comments

Breaking changes

The VCPKG_ROOT variable will be removed from runner images.

Target date

October, 31. The propagation will take 2-3 days.

The motivation for the changes

In accordance with the reaction of the VCPKG developers and community to the recent changes regarding the setting of the VCPKG_ROOT variable, it was decided to abandon such breaking changes so that users can independently control the contents of this environment variable.

The history of changes and reasons for cancellation can be found here: #6146, #6192, #6195, #6196.

Possible impact

Users who have already started using the VCPKG_ROOT variable in accordance with the latest changes may encounter some difficulties.

Platforms affected

  • [X] Azure DevOps
  • [X] GitHub Actions

Runner images affected

  • [X] Ubuntu 18.04
  • [X] Ubuntu 20.04
  • [X] Ubuntu 22.04
  • [X] macOS 10.15
  • [X] macOS 11
  • [X] macOS 12
  • [X] Windows Server 2019
  • [X] Windows Server 2022

Mitigation ways

Users who have already started using the VCPKG_ROOT variable in accordance with the latest changes should revert to using the VCPKG_INSTALLATION_ROOT variable to avoid errors.

ddobranic avatar Oct 10 '22 09:10 ddobranic

Removal date shifted one week.

mikhailkoliada avatar Oct 25 '22 07:10 mikhailkoliada

Now that VCPKG_ROOT is not defined anymore,

For people that use the installation that comes with the image you can set VCPKG_ROOT to VCPKG_INSTALLATION_ROOT with this step.

    - name: "Set environmental variables"
      shell: bash
      run: |
        echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV

monamimani avatar Nov 05 '22 23:11 monamimani

Deployed

mikhailkoliada avatar Nov 25 '22 08:11 mikhailkoliada

This documentation: https://github.com/actions/runner-images/blob/win22/20231023.1/images/win/Windows2022-Readme.md#environment-variables

promises an environment variable VCPKG_INSTALLATION_ROOT. However, when I try to use this in a build step like so:

- name: Configure CMake
  if: runner.os == 'Windows'
  run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --toolchain="${{env.VCPKG_INSTALLATION_ROOT}}/scripts/buildsystems/vcpkg.cmake"

The variable seems to be not there. I tried a few variations:

  • ${{env.VCPKG_INSTALLATION_ROOT}}
  • $VCPKG_INSTALLATION_ROOT

mcourteaux avatar Oct 26 '23 14:10 mcourteaux