Skip to content

uses run-vcpkg@v11

uses run-vcpkg@v11 #11

# Copyright (c) 2019-2020-2021-2022-2023 Luca Cappa
# Released under the term specified in file LICENSE.txt
# SPDX short identifier: MIT
#
# The workflow does the following:
# - Instead of providing the Git commit id of the vcpkg repository, the registry builtin
# baseline from vcpkg-configuration.json is being used.
name: hosted-ninja-vcpkg-no-submod-nogitcommitid_vcpkgconfjson-cacheoff
on: [push, workflow_dispatch]
jobs:
job:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: true
# This is useful to avoid https://github.com/microsoft/vcpkg/issues/25349
# which is caused by missing Git history on the vcpkg submodule which ports
# try to access.
# Do not use if not needed, since it slows down the checkout of sources.
fetch-depth: 0
- uses: lukka/get-cmake@latest
- name: List $RUNNER_WORKSPACE before vcpkg is setup
run: find $RUNNER_WORKSPACE
shell: bash
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
# This one is deliberately pointing to a non existing directory (so that vcpkg is not identified as a submodule of this repository).
vcpkgDirectory: '${{ github.workspace }}/cmakepresets+vcpkgconfjson/vcpkg'
vcpkgJsonGlob: '**/cmakepresets+vcpkgconfjson/vcpkg-configuration.json'
- name: List $RUNNER_WORKSPACE before build
run: find $RUNNER_WORKSPACE
shell: bash
- name: Prints output of run-vcpkg's action.
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "
- name: Run CMake+vcpkg+Ninja
uses: lukka/run-cmake@v10
id: runcmake
with:
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets+vcpkgconfjson/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
buildPreset: 'ninja-multi-vcpkg'
- name: List $RUNNER_WORKSPACE after build
run: find $RUNNER_WORKSPACE
shell: bash