34 lines
1.2 KiB
YAML
Raw Normal View History

2024-10-06 15:36:31 +02:00
name: Setup Vcpkg
description: Initialize vcpkg tool, does not checkout the registry
# TODO, set VCPKG_BASE_VERSION based on this
# inputs:
# vcpkg-version:
# description: Enter vcpkg version tag or stable or latest
# required: false
# default: latest
# type: string
runs:
using: composite
steps:
- name: Setup vcpkg
if: runner.os != 'Windows'
shell: bash
run: |
2024-10-09 09:01:12 +02:00
export VCPKG_ROOT=$HOME/.vcpkg
wget https://aka.ms/vcpkg-init.sh -O /tmp/vcpkg-init.sh
. /tmp/vcpkg-init.sh
echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV
2024-10-06 15:36:31 +02:00
echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV
2024-10-09 14:30:39 +02:00
# Integrate patch from https://github.com/microsoft/vcpkg/pull/41146
wget https://raw.githubusercontent.com/microsoft/vcpkg/6271c9bfab7ff6dbf3444c3600a28e7c6b0ea462/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake -O /Users/runner/.vcpkg/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake
2024-10-06 15:36:31 +02:00
- name: Setup vcpkg
if: runner.os == 'Windows'
shell: powershell
run: |
$env:VCPKG_ROOT = "C:/.vcpkg"
iex (iwr -useb https://aka.ms/vcpkg-init.ps1)
echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $env:GITHUB_ENV
2024-10-09 09:01:12 +02:00
echo "PATH=$env:VCPKG_ROOT;$env:PATH" >> $env:GITHUB_ENV