Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/actions/setup-vcpkg/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: setup-vcpkg

description: Bootstrap vcpkg and expose the toolchain file path

outputs:
root:
description: Path to the vcpkg root
value: ${{ steps.vars.outputs.root }}
toolchain-file:
description: Path to the vcpkg CMake toolchain file
value: ${{ steps.vars.outputs.toolchain_file }}

runs:
using: composite
steps:
- name: Set vcpkg paths
id: vars
shell: bash
run: |
set -euo pipefail
root="${GITHUB_WORKSPACE}/vcpkg"
echo "root=${root}" >> "${GITHUB_OUTPUT}"
echo "toolchain_file=${root}/scripts/buildsystems/vcpkg.cmake" >> "${GITHUB_OUTPUT}"

- name: Clone vcpkg
shell: bash
run: |
set -euo pipefail
if [[ ! -d "${GITHUB_WORKSPACE}/vcpkg/.git" ]]; then
git clone https://github.com/microsoft/vcpkg "${GITHUB_WORKSPACE}/vcpkg"
fi

- name: Bootstrap vcpkg (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
& "${env:GITHUB_WORKSPACE}\vcpkg\bootstrap-vcpkg.bat" -disableMetrics

- name: Bootstrap vcpkg (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
"${GITHUB_WORKSPACE}/vcpkg/bootstrap-vcpkg.sh" -disableMetrics

4 changes: 4 additions & 0 deletions .github/workflows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!/ci-build-linux.yml
!/ci-build-macos.yml
!/ci-build-tools-linux.yml
!/ci-build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: branch_rules
name: branch-rules

on:
pull_request:
Expand Down
Loading
Loading