-
-
Notifications
You must be signed in to change notification settings - Fork 51
89 lines (73 loc) · 2.04 KB
/
Copy pathbuild-cmake.yml
File metadata and controls
89 lines (73 loc) · 2.04 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build with cmake
on:
push:
branches: [master]
paths:
- cmake/**
- src/**
- third_party/**
- CMakeLists.txt
pull_request:
paths:
- cmake/**
- src/**
- third_party/**
- CMakeLists.txt
workflow_dispatch:
jobs:
ubuntu:
name: "Ubuntu (${{ matrix.compiler.cc }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- {cc: gcc, cxx: g++}
- {cc: clang, cxx: clang++}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install --yes cmake libglew-dev libglfw3-dev libglm-dev libopenal-dev xorg-dev
- name: Install clang
run: sudo apt install --yes clang
if: ${{ matrix.compiler.cc == 'clang' }}
- name: cmake
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
cc: ${{ matrix.compiler.cc }}
cxx: ${{ matrix.compiler.cxx }}
build-type: Release
configure-options: -DWITH_BOX2D=Yes
parallel: 2
macos:
name: "macOS (${{ matrix.compiler.cc }}, box2d: ${{ matrix.with_box2d }})"
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
with_box2d: [yes, no]
compiler:
- {cc: clang, cxx: clang++}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies
run: brew install glew glfw3 glm
- name: Install Box2D
run: brew install box2d
if: ${{ matrix.with_box2d == 'no' }}
- name: cmake
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
cc: ${{ matrix.compiler.cc }}
cxx: ${{ matrix.compiler.cxx }}
build-type: Release
configure-options: -DWITH_BOX2D=${{ matrix.with_box2d }}
parallel: 2