forked from estraier/tkrzw
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.56 KB
/
cmake.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
59
60
name: CMake Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
autotools:
strategy:
matrix:
include:
- description: "Ninja on Ubuntu"
cmake-preset: ninja
runs-on: ubuntu-latest
- description: "Ninja on OSX"
cmake-preset: ninja
runs-on: macos-13
- description: "Ninja on Windows"
cmake-preset: ninja
runs-on: windows-latest
- description: "MSVC on Windows"
cmake-preset: msvc
runs-on: windows-latest
name: cmake workflow using ${{ matrix.description }}
runs-on: ${{ matrix.runs-on }}
permissions:
contents: read
steps:
- name: "Clone Repository"
uses: actions/checkout@v4
- name: "Setup Ninja"
uses: seanmiddleditch/gha-setup-ninja@master
- name: "Clone vcpkg"
uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
path: vcpkg
- name: Build
run: |
cmake --preset ${{ matrix.cmake-preset }} -DCMAKE_TOOLCHAIN_FILE="${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake --build --preset ${{ matrix.cmake-preset }}-release
working-directory: ${{ github.workspace }}
- name: Test
run: |
ctest --preset ${{ matrix.cmake-preset }}-release
working-directory: ${{ github.workspace }}
- name: Install
run: |
echo make install
working-directory: ${{ github.workspace }}