refactor: Improve vcpkg installation step in build-project.yaml

- Separate cloning vcpkg and running the bootstrap script into individual steps
- Set the VCPKG_ROOT environment variable and add the vcpkg executable to the PATH
- Install necessary packages after cloning vcpkg
This commit is contained in:
Roy Shilkrot
2024-07-11 12:32:23 -04:00
parent de587d61ea
commit 94453d1937

View File

@@ -271,18 +271,18 @@ jobs:
"pluginName=${ProductName}" >> $env:GITHUB_OUTPUT
"pluginVersion=${ProductVersion}" >> $env:GITHUB_OUTPUT
-name: Install vcpkg
- name: Install vcpkg
id: vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
# cd vcpkg
# # run bootstrap-vcpkg.bat
# .\bootstrap-vcpkg.bat
# # Configure the VCPKG_ROOT and PATH environment variables
# Add-Content $env:GITHUB_ENV "VCPKG_ROOT=${{ github.workspace }}/vcpkg"
# Add-Content $env:GITHUB_PATH "${{ github.workspace }}/vcpkg"
# # Install the necessary packages
# cd ..
# vcpkg install
cd vcpkg
.\bootstrap-vcpkg.bat
# Configure the VCPKG_ROOT and PATH environment variables
Add-Content $env:GITHUB_ENV "VCPKG_ROOT=${{ github.workspace }}/vcpkg"
Add-Content $env:GITHUB_PATH "${{ github.workspace }}/vcpkg"
# Install the necessary packages
cd ..
vcpkg install
- name: Build Plugin 🧱
uses: ./.github/actions/build-plugin