-
Notifications
You must be signed in to change notification settings - Fork 4
122 lines (115 loc) · 3.4 KB
/
build2.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: build2
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
# Job for building on Ubuntu
Ubuntu:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- name: Ubuntu gcc Debug
os: ubuntu-latest
config_file: gcc.debug.build
- name: Ubuntu clang Debug
os: ubuntu-latest
config_file: clang.debug.build
- name: Ubuntu gcc Release
os: ubuntu-latest
config_file: gcc.release.build
- name: Ubuntu clang Release
os: ubuntu-latest
config_file: clang.release.build
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: build2/setup-build2-github-action@v2
with:
build2-version: staged
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev libxrandr-dev libudev-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev xorg-dev libvulkan-dev
- name: Configure
run: bdep init -C @cc cc config.config.load=build-config/${{matrix.config.config_file}}
- name: Build
run: b -V
- name: Test
run: bdep test -V @cc
# Job for building on MacOS
MacOS:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- name: MacOS clang Debug
os: macos-latest
config_file: clang.debug.build
- name: MacOS clang Release
os: macos-latest
config_file: clang.release.build
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: humbletim/[email protected]
with:
version: latest
cache: true
- uses: build2/setup-build2-github-action@v2
with:
build2-version: staged
- name: Configure
run: bdep init -C @cc cc config.config.load=build-config/${{matrix.config.config_file}}
- name: Build
run: b -V
- name: Test
run: bdep test -V @cc
# Job for building on Windows
Windows:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- name: Windows msvc Debug
os: windows-latest
config_file: msvc.debug.build
compiler_type: msvc
- name: Windows clang Debug
os: windows-latest
config_file: clang.debug.build
compiler_type: clang
- name: Windows msvc Release
os: windows-latest
config_file: msvc.release.build
compiler_type: msvc
- name: Windows clang Release
os: windows-latest
config_file: clang.release.build
compiler_type: clang
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: humbletim/[email protected]
with:
version: latest
cache: true
- uses: build2/setup-build2-github-action@v2
with:
build2-version: staged
build2-windows-compiler: ${{matrix.config.compiler_type}}
- name: Configure
run: bdep init -C ../imgui-cc @cc cc config.config.load=build-config/${{matrix.config.config_file}}
- name: Build
run: b -V
- name: Test
run: bdep test -V @cc