-
Notifications
You must be signed in to change notification settings - Fork 28
310 lines (258 loc) · 8.39 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
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
name: Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events for the specified branches.
push:
branches:
- ci
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
- ci
paths-ignore:
- 'docs/**'
# Allow running this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
Windows:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.name }}
strategy:
matrix:
cfg:
- { os: windows-latest, name: 'Windows 64-bit', pkg: 'Windows_64-bit', opt: '--enable-werror' }
#- { os: windows-latest, name: 'Windows 32-bit', opt: '--build=i686-w64-mingw32 --host=i686-w64-mingw32' }
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-diffutils
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-libpng
mingw-w64-ucrt-x86_64-libjpeg-turbo
make
git
- run: git config --global core.autocrlf input
shell: bash
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: sh configure ${{ matrix.cfg.opt }}
- name: Make
run: make
- name: HtmlDoc
run: make htmldoc
- name: Test
run: make Test
- name: TestReport
run: make -C tests Report
- name: Summary
run: |
cat unicon-config.log
cat unicon-features.log
macOS:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.name }}
strategy:
matrix:
cfg:
- { os: macos-13, name: 'macOS', opt: '--enable-werror CC=clang CXX=clang++' }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: sh configure ${{ matrix.cfg.opt }}
- name: Make
run: make
- name: HtmlDoc
run: make htmldoc
- name: Test
run: make Test
- name: TestReport
run: make -C tests Report
- name: Summary
run: |
cat unicon-config.log
cat unicon-features.log
Linux:
runs-on: ubuntu-latest
name: ${{ matrix.cfg.name }}
container: ${{ matrix.cfg.os }}
strategy:
matrix:
cfg:
- { os: 'ubuntu:20.04', name: 'Ubuntu 20.04', opt: '--enable-werror' }
- { os: 'ubuntu:22.04', name: 'Ubuntu 22.04', opt: '--enable-werror' }
- { os: 'fedora:latest', name: 'Fedora Latest', opt: '--enable-werror' }
- { os: 'debian:11', name: 'Debian 11', opt: '--enable-werror' }
- { os: 'debian:12', name: 'Debian 12', opt: '--enable-werror' }
- { os: 'oraclelinux:8', name: 'Oracle Linux 8', opt: '--enable-werror' }
- { os: 'alpine:latest', name: 'Alpine Latest', opt: '' }
steps:
- name: Install dependencies
run: |
case "${{ matrix.cfg.os }}" in
ubuntu*|debian*)
apt-get update -q -y
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y build-essential make autotools-dev libc6 libgcc1 libgl1-mesa-glx
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y libssl-dev libx11-dev libjpeg-dev libpng-dev libglu1-mesa-dev libxft-dev
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y libopenal-dev libalut-dev libogg-dev libvorbis-dev unixodbc-dev libfreetype6-dev
;;
oracle*)
dnf -y update
dnf -y install git gcc make diffutils libjpeg-turbo-devel libpng-devel libX11-devel mesa-libGL-devel mesa-libGLU-devel
dnf -y install openssl-devel unixODBC-devel freetype-devel libXft-devel
;;
fedora*)
dnf -y update
dnf -y install gcc make diffutils libjpeg-turbo-devel libpng-devel libX11-devel mesa-libGL-devel mesa-libGLU-devel
dnf -y install openal-devel freealut-devel libogg-devel libvorbis-devel openssl-devel unixODBC-devel freetype-devel libXft-devel
;;
alpine*)
apk update
apk add build-base diffutils
;;
esac
- name: Checkout
uses: actions/checkout@v3
- name: Configure
run: ./configure ${{ matrix.cfg.opt }}
- name: Make
run: make
- name: HtmlDoc
run: make htmldoc
- name: Test
run: make Test
- name: TestReport
run: make -C tests Report
- name: Summary
run: |
cat unicon-config.log
cat unicon-features.log
Alpine:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- { arch: aarch64 }
- { arch: armv7 }
- { arch: x86 }
steps:
- name: alpine
uses: jirutka/setup-alpine@v1
with:
arch: ${{ matrix.platform.arch }}
branch: v3.19
packages: >
build-base
diffutils
- name: Checkout
uses: actions/checkout@v3
- name: Configure
run: ./configure --disable-iconc
shell: alpine.sh {0}
- name: Make
run: make
shell: alpine.sh {0}
- name: Test
run: make Test
shell: alpine.sh {0}
- name: TestReport
run: make -C tests Report
shell: alpine.sh {0}
- name: Summary
run: |
cat unicon-config.log
cat unicon-features.log
shell: alpine.sh {0}
Features:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.name }}
strategy:
matrix:
cfg:
#- { os: ubuntu-latest, name: 'Ubuntu 32-bit', opt: '--host=i686-pc-linux-gnu' }
- { os: ubuntu-latest, name: 'Clang', opt: 'CC=clang CXX=clang++ --enable-werror' }
- { os: ubuntu-latest, name: 'No Graphics', opt: '--disable-graphics --enable-werror' }
- { os: ubuntu-latest, name: 'No 3D Graphics', opt: '--disable-graphics3d --enable-werror' }
- { os: ubuntu-latest, name: 'No Concurrency', opt: '--disable-concurrency --enable-werror' }
- { os: ubuntu-latest, name: 'Heap Test', opt: '--enable-debugheap --enable-verifyheap --enable-werror' }
- { os: ubuntu-latest, name: 'Thin Build', opt: '--enable-thin --enable-werror' }
- { os: ubuntu-latest, name: 'Dev Mode', opt: '--enable-devmode' }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -q -y
if [[ "${{ matrix.cfg.name }}" = "Ubuntu 32-bit" ]]
then
# Install tools to cross compile 32-bit
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -q -y gcc-multilib g++-multilib
sudo apt install libssl-dev:i386
fi
# Easy way to install all dependencies
sudo apt-get install -q -y devscripts equivs
sudo mk-build-deps --install debian/control
- name: Configure
run: ./configure ${{ matrix.cfg.opt }}
- name: Make
run: make
# set VRFY globally even though it is only needed in the debug test
env:
VRFY: -2
- name: HtmlDoc
run: make htmldoc
- name: Test
run: make Test
# set VRFY globally even though it is only needed in the debug test
env:
VRFY: -2
- name: TestReport
run: make -C tests Report
- name: Summary
run: |
cat unicon-config.log
cat unicon-features.log
DebianPkg:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.name }}
strategy:
matrix:
cfg:
- { os: ubuntu-22.04, name: 'Debian-Pkg', opt: '' }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y build-essential fakeroot devscripts equivs dh-autoreconf
sudo mk-build-deps --install debian/control
- name: Configure
run: ./configure ${{ matrix.cfg.opt }}
- name: Deb
run: |
make debin
mkdir debian-pkg
cp ../unicondist/unicon_*.deb debian-pkg/
cp ../unicondist/unicon_*.changes debian-pkg/
cp ../unicondist/unicon_*.dsc debian-pkg/
cp ../unicondist/unicon_*.debian.tar.xz debian-pkg/
cp ../unicondist/unicon_*.orig.tar.gz debian-pkg/
- name: Install
run: sudo apt install ./debian-pkg/*.deb
- name: Test
run: make Test
env:
UC: unicon