-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.6 KB
/
ci.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
name: C++ CI
on:
push:
branches:
- main
- new-ci-workflow-based-on-run-vcpkg
pull_request:
branches:
- main
jobs:
build_with_run_vcpkg:
runs-on: ubuntu-latest
env:
VCPKG_DEFAULT_TRIPLET: x64-linux
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: Dump the content of $RUNNER_TEMP
shell: bash
run: find $RUNNER_TEMP
- name: Dump the content of $RUNNER_WORKSPACE
shell: bash
run: find $RUNNER_WORKSPACE
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch.
vcpkgDirectory: '${{ runner.workspace }}/_vcpkg_'
# The Git commit id of vcpkg to be checked out. This is only needed because we are not using a submodule.
vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da'
# The vcpkg.json file, which will be part of cache key computation.
vcpkgJsonGlob: '${{ runner.workspace }}/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: './CMakeLists.txt'
configurePreset: ninja-multi-vcpkg
buildPreset: ninja-multi-vcpkg