mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Codechange: [Actions] Setup vcpkg via a composite action
This commit is contained in:
25
.github/actions/setup-vcpkg/action.yaml
vendored
Normal file
25
.github/actions/setup-vcpkg/action.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: 'Setup vcpkg'
|
||||
description: 'Installs vcpkg and initialises binary caching via NuGet'
|
||||
inputs:
|
||||
vcpkg-location:
|
||||
description: 'Where to install vcpkg'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg "${{ inputs.vcpkg-location }}"
|
||||
cd "${{ inputs.vcpkg-location }}"
|
||||
./bootstrap-vcpkg.$(if [ "${{ runner.os }}" = "Windows" ]; then echo "bat"; else echo "sh"; fi) -disableMetrics
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
Reference in New Issue
Block a user