-
Notifications
You must be signed in to change notification settings - Fork 9
78 lines (55 loc) · 1.74 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
68
69
70
71
72
73
74
75
76
77
78
name: CMake
on:
push:
branches: [ master, PBR ]
pull_request:
branches: [ master, PBR ]
env:
BUILD_TYPE: Debug
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install mesa-common-dev
run: sudo apt-get install mesa-common-dev
- name: Install libglu1-mesa-dev
run: sudo apt-get install libglu1-mesa-dev
- name: Install libgl1-mesa-dev
run: sudo apt-get install libgl1-mesa-dev
- name: Install libx11-dev
run: sudo apt-get install libx11-dev
- name: Install libxcursor-dev
run: sudo apt-get install libxcursor-dev
- name: Install libxrandr-dev
run: sudo apt-get install libxrandr-dev
- name: Install libxi-dev
run: sudo apt-get install libxi-dev
- name: Install uuid-dev
run: sudo apt-get install uuid-dev
- name: Install libglfw3
run: sudo apt-get install libglfw3
- name: Install libglfw3-dev
run: sudo apt-get install libglfw3-dev
- name: Install gcc-12
run: sudo apt-get install gcc-12
- name: Install g++-12
run: sudo apt-get install g++-12
- name: Change compiler to use GCC 12
run: CC=gcc-11 CXX=g++-12
- name: Configure CMake
run: |
mkdir build && cd build
cmake -G "Unix Makefiles" .. -D CMAKE_C_COMPILER=gcc-12 -D CMAKE_CXX_COMPILER=g++-12 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: |
cd build
make
Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}