-
Notifications
You must be signed in to change notification settings - Fork 154
237 lines (197 loc) · 6.22 KB
/
cmake.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
name: Build
on: [push, pull_request]
jobs:
build-linux-gcc:
name: Linux (GCC) (Unity)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt -y install libncursesw5-dev libgpm-dev libgtest-dev
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=Release -DTV_BUILD_TESTS=ON -DTV_REDUCE_APP_SIZE=ON -DTV_LIBRARY_UNITY_BUILD=ON
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-linux-gcc5:
name: Linux (GCC 5)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo tee --append /etc/apt/sources.list << EOF
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
EOF
sudo apt -y update
sudo apt -y install libncursesw5-dev g++-5
- name: Configure CMake
shell: bash
env:
CC: gcc-5
CXX: g++-5
run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-linux-clang:
name: Linux (Clang)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt -y install libncursesw5-dev
- name: Configure CMake
shell: bash
env:
CC: clang
CXX: clang++
run: cmake . -DCMAKE_BUILD_TYPE=Release -DTV_OPTIMIZE_BUILD=OFF
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-linux-big-endian:
name: Linux (GCC) (Big Endian)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Build in container
uses: uraimo/run-on-arch-action@v2
with:
arch: s390x
distro: alpine_latest
dockerRunArgs: |
--volume "${PWD}:/app"
env: |
LC_CTYPE: C.UTF-8
shell: /bin/sh
install: apk update && apk add make cmake g++ ncurses-dev gtest-dev linux-headers
run: |
cd /app
cmake . -DCMAKE_BUILD_TYPE= -DTV_BUILD_USING_GPM=OFF -DTV_BUILD_EXAMPLES=OFF -DTV_BUILD_TESTS=ON -DTV_LIBRARY_UNITY_BUILD=ON
cmake --build . -j$(nproc)
build-windows-msvc32:
name: Windows (MSVC) (Win32)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
shell: bash
run: cmake . -A Win32 -DTV_USE_STATIC_RTL=ON
- name: Build (Release) (library, apps)
shell: bash
run: cmake --build . --config Release -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (RelWithDebInfo) (library)
shell: bash
run: cmake --build . --config RelWithDebInfo --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (Debug) (library)
shell: bash
run: cmake --build . --config Debug --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Upload Examples
uses: actions/upload-artifact@v4
with:
name: examples-x86
path: |
Release/tvdemo.exe
Release/tvedit.exe
Release/tvhc.exe
- name: Upload Library
uses: actions/upload-artifact@v4
with:
name: library-x86
path: |
Release/tvision.lib
RelWithDebInfo/tvision-relwithdebinfo.lib
RelWithDebInfo/tvision-relwithdebinfo.pdb
Debug/tvision-debug.lib
Debug/tvision-debug.pdb
build-windows-msvc64:
name: Windows (MSVC) (x64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
shell: bash
run: cmake . -A x64 -DTV_USE_STATIC_RTL=ON
- name: Build (Release) (library, apps)
shell: bash
run: cmake --build . --config Release -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (RelWithDebInfo) (library)
shell: bash
run: cmake --build . --config RelWithDebInfo --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Build (Debug) (library)
shell: bash
run: cmake --build . --config Debug --target tvision -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Upload Examples
uses: actions/upload-artifact@v4
with:
name: examples-x64
path: |
Release/tvdemo.exe
Release/tvedit.exe
Release/tvhc.exe
- name: Upload Library
uses: actions/upload-artifact@v4
with:
name: library-x64
path: |
Release/tvision.lib
RelWithDebInfo/tvision-relwithdebinfo.lib
RelWithDebInfo/tvision-relwithdebinfo.pdb
Debug/tvision-debug.lib
Debug/tvision-debug.pdb
build-windows-mingw:
name: Windows (MinGW)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
shell: bash
run: cmake . -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE= -DCMAKE_CXX_FLAGS="-static" -DTV_LIBRARY_UNITY_BUILD=ON
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-windows-bcc32:
name: Windows (BCC32) (DPMI32)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Build Tools
shell: bash
run: |
curl -LJO "https://github.com/magiblot/tvision/files/5578778/BC45-32.zip"
curl -LJO "https://github.com/magiblot/tvision/files/5578815/tasm4-32.zip"
unzip BC45-32.zip -d C:/BC45
unzip tasm4-32.zip -d C:/tasm
- name: Build
shell: bash
run: |
export PATH="/c/bc45/bin:/c/tasm/bin:$PATH"
cd project
/c/bc45/bin/make.exe -DDOS32
- name: Upload Examples
uses: actions/upload-artifact@v4
with:
name: examples-dos32
path: |
examples/tvdemo/tvdemo.EXE
examples/tvedit/tvedit.EXE
examples/tvhc/tvhc.EXE
- name: Upload Library
uses: actions/upload-artifact@v4
with:
name: library-dos32
path: |
LIB/TV32.LIB
build-macos-clang:
name: MacOS (Clang)
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
run: cmake --build . -j$(sysctl -n hw.logicalcpu)