-
Notifications
You must be signed in to change notification settings - Fork 17
67 lines (53 loc) · 1.32 KB
/
build.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
62
63
64
65
66
67
name: CI
on:
create:
tags:
push:
branches:
- main
pull_request:
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- uses: actions/checkout@v1
with:
submodules: true
- name: install ninja (ubuntu)
run: sudo apt-get install ninja-build
if: matrix.os == 'ubuntu-latest'
- name: install ninja (macos)
run: brew install ninja
if: matrix.os == 'macos-latest'
- name: mkdir
run: mkdir -p out
- name: cmake (ubuntu)
env:
CC: gcc-9
CXX: g++-9
run: cmake .. -G Ninja
working-directory: out
if: matrix.os == 'ubuntu-latest'
- name: cmake (macos)
run: cmake .. -G Ninja
working-directory: out
if: matrix.os == 'macos-latest'
- name: cmake (windows)
run: cmake ..
working-directory: out
if: matrix.os == 'windows-latest'
- name: build
run: cmake --build out
- name: unittests
run: cmake --build out --target test
if: matrix.os != 'windows-latest'
- name: unittests (windows)
run: cmake --build out --target RUN_TESTS
if: matrix.os == 'windows-latest'