-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathaction.yml
31 lines (29 loc) · 944 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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: |
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
echo "$VCPKG_ROOT" >> $GITHUB_PATH
- 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
echo "$env:VCPKG_ROOT" >> $env:GITHUB_PATH