47 lines (44 loc) · 1.69 KB
/
hosted-msbuild-vcpkg_submod.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (c) 2019-2020-2021 Luca Cappa
# Released under the term specified in file LICENSE.txt
# SPDX short identifier: MIT
#
# Setup vcpkg (which is stored in a Git submodule), then run CMake with CMakePreset.json and vcpkg's toolchain file,
# to automatically run vcpkg to install dependencies described by the vcpkg.json manifest file, and build the sources with MSBuild.
name: hosted-msbuild-vcpkg_submod-autocache
on: [push, workflow_dispatch]
jobs:
job:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: lukka/get-cmake@latest
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@fixes
id: runvcpkg
with:
vcpkgJsonGlob: '**/cmakepresets/vcpkg.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+MSBuild
uses: lukka/run-cmake@v10
if: contains( matrix.os, 'windows')
with:
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets/CMakeLists.txt'
configurePreset: 'msbuild-vcpkg'
buildPreset: 'msbuild-vcpkg'
- name: List $RUNNER_WORKSPACE after build
run: find $RUNNER_WORKSPACE
shell: bash