58 lines (55 loc) · 2.21 KB
/
hosted-advanced-setup-vcpkg_submod-manifest.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
48
49
50
51
52
53
54
55
56
57
58
# Copyright (c) 2020-2021 Luca Cappa
# Released under the term specified in file LICENSE.txt
# SPDX short identifier: MIT
name: hosted-advanced-setup-vcpkg_submod-with-manifest-autocache
on: [push]
jobs:
job:
name: ${{ matrix.os }}-hosted-advanced-setup-vcpkg_submod-with-manifest-autocache
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
triplet: x64-windows
- os: ubuntu-latest
triplet: x64-linux
- os: macos-latest
triplet: x64-osx
env:
buildDir: '${{ github.workspace }}/b/vcpkg_submod_manifest'
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: lukka/get-cmake@latest
- name: dir
run: find $RUNNER_TEMP
shell: bash
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@fixes
id: runvcpkg
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
# Ensure the cache key changes any time the content of the manifest file changes.
appendedCacheKey: ${{ hashFiles( '**/vcpkg_manifest/vcpkg.json' ) }}
# Ensure the vcpkg artifacts are cached, they are generated in the 'CMAKE_BINARY_DIR/vcpkg_installed'.
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
vcpkgTriplet: ${{ matrix.triplet }}
- name: Prints output of run-vcpkg's action
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}'"
- name: Run CMake with vcpkg.json manifest
uses: lukka/run-cmake@main
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/vcpkg_manifest/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: ${{ env.buildDir }}
cmakeAppendedArgs: '"-GNinja Multi-Config" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet}} '
buildWithCMake: true