-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (46 loc) · 1.47 KB
/
build-and-test.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
61
name: "Build and test"
on:
pull_request:
branches:
- main
- dev
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
builds-and-tests:
strategy:
matrix:
preset: [
{"os": windows-latest, "name": "msbuild"},
{"os": ubuntu-latest, "name": "gnu"}
]
build-type: ["Debug", "Release"]
fail-fast: false
name: ${{ matrix.preset.os }} / ${{matrix.preset.name}} / ${{matrix.build-type}}
runs-on: ${{ matrix.preset.os }}
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: getcmake
uses: lukka/get-cmake@latest
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'
- name: Windows configure and build
if: matrix.preset.name=='msbuild'
run: |
cmake --preset ${{matrix.preset.name}} -S . -B build
cmake --build build --config ${{matrix.build-type}} -j
- name: Windows Run tests
if: matrix.preset.name=='msbuild'
run: build/bin/${{matrix.build-type}}/tessellator_tests.exe
- name: Ubuntu configure and build
if: matrix.preset.name=='gnu'
run: |
cmake --preset ${{matrix.preset.name}} -S . -B build
cmake --build build -j
- name: Ubuntu Run tests
if: matrix.preset.name=='gnu'
run: build/bin/tessellator_tests