-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.14 KB
/
cmake-single-platform.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
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake on a single platform
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- uses: actions/checkout@v4
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 73964f854d0d6424f335e9515b61b3a2dad5e15b
vcpkgJsonGlob: '**/vcpkg.json'
- name: Run CMake consuming CMakePreset.json and run vcpkg to build packages
uses: lukka/run-cmake@v10
with:
configurePreset: 'linux-x64'
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure