Bumped vcpkg #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2020-2021-2022 Luca Cappa | |
# Released under the term specified in file LICENSE.txt | |
# SPDX short identifier: MIT | |
# | |
# The peculiarity of this workflow is that assumes vcpkg is NOT stored as a submodule of this repository. | |
# This workflow does the following: | |
# - Restores vcpkg artifacts from cache. | |
# - Using the provided Git commit id, sets up vcpkg if needed, then run CMake with CMakePreset.json using a configuration | |
# that leverages the vcpkg's toolchain file. This will automatically run vcpkg to install dependencies | |
# described by the vcpkg.json manifest file. It will be a no-op if those are restored from cache. | |
# - Finally builds the sources with Ninja. | |
name: hosted-ninja-vcpkg-autocache | |
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@v2 | |
with: | |
submodules: recursive | |
- uses: lukka/get-cmake@latest | |
- name: Dump the content of $RUNNER_TEMP | |
run: find $RUNNER_TEMP | |
shell: bash | |
- name: Dump the content of $RUNNER_WORKSPACE | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
- name: Restore artifacts, or setup vcpkg (do not install any package) | |
uses: lukka/run-vcpkg@main | |
id: runvcpkg | |
with: | |
# The vcpkg.json file, which will be part of cache key computation. | |
vcpkgJsonGlob: '**/vcpkg.json' | |
- 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 with vcpkg.json manifest | |
uses: lukka/run-cmake@v10 | |
with: | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
configurePreset: ninja-multi-vcpkg | |
buildPreset: ninja-multi-vcpkg |