-
Notifications
You must be signed in to change notification settings - Fork 34
349 lines (337 loc) · 12.2 KB
/
cd.yaml
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
name: CD
on:
push:
branches:
- cd_*
- master
- release*
env:
WX_WIDGETS_VERSION: 3.2.2.1
TARGET_OSX_VERSION: 10.14
jobs:
# ############################################################################
# The build_wxwidgets_<platform> jobs handle building and caching wxWidgets.
#
# This reduces total build time by a measurable amount, as wxWidgets can take
# over 30 minutes to build.
# ############################################################################
build_wxwidgets_linux:
name: Build wxWidgets for Linux
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Cache wxWidgets
uses: actions/cache@v4
id: wxwidgets-cache
with:
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }}
- name: Update Package Info
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update
- name: Install Dependencies
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
run: >
sudo apt-get install libgtk-3-dev
- name: Download wxWidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}
run: |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2
tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2
- name: Build wxwidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
run: |
mkdir gtk-build
cd gtk-build
../configure
make -j2
build_wxwidgets_osx:
strategy:
matrix:
architecture: [ x86_64, arm64 ]
name: Build wxWidgets for OSX ${{ matrix.architecture }}
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Cache wxWidgets
uses: actions/cache@v4
id: wxwidgets-cache
with:
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }}-${{ matrix.architecture }}
- name: Download wxWidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}
run: |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2
tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2
- name: Build wxwidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
run: |
mkdir build-static
cd build-static
../configure --disable-shared --disable-sys-libs --enable-unicode --enable-macosx_arch=${{ matrix.architecture }} --with-macosx-version-min=${{ env.TARGET_OSX_VERSION }}
make -j2
build_wxwidgets_windows:
name: Build wxWidgets for Windows
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Cache wxWidgets
uses: actions/cache@v4
id: wxwidgets-cache
with:
path: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }}
- name: Install Dependencies
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
install: >
git
base-devel
mingw-w64-i686-toolchain
unzip
- name: Download wxWidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}
shell: msys2 {0}
run: |
mkdir wxWidgets-${{ env.WX_WIDGETS_VERSION }}
cd wxWidgets-${{ env.WX_WIDGETS_VERSION }}
wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip
unzip -q wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip
rm wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip
- name: Build wxWidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}\build\msw
shell: msys2 {0}
# NOTE: prebuilding setup.h using the setup_h tag allows the main build to use multiple cores
run: |
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release setup_h
mingw32-make -j2 -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release
# ############################################################################
# The build_<platform> jobs handle building Logo for each platform.
#
# Linux is run first as it produces the PDF for the other platform builds
# to use.
# ############################################################################
build_linux:
name: Build Logo for Linux
needs: [ build_wxwidgets_linux ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Update Package Info
run: |
sudo apt-get update
- name: Install Dependencies
run: >
sudo apt-get install
autoconf-archive
libgtk-3-dev
texlive
zip
- name: wxWidgets Cache
uses: actions/cache@v4
id: wxwidgets-cache
with:
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }}
- name: Install wxwidgets
# Install wxwidgets from cache on build machine so autoconf has WX_CONFIG_CHECK
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
run: |
cd gtk-build
sudo make install
sudo cp ../wxwin.m4 /usr/share/aclocal/
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Logo
run: |
autoreconf --install
./configure --enable-gitid
make -j2 dist
make -j2 dist-zip
- name: Archive ucblogo.tar.gz
uses: actions/upload-artifact@v4
with:
name: ucblogo.tar.gz
path: >
*.tar.gz
- name: Archive ucblogo.zip
uses: actions/upload-artifact@v4
with:
name: ucblogo.zip
path: >
*.zip
- name: Archive ucblogo.pdf
uses: actions/upload-artifact@v4
with:
name: ucblogo.pdf
path: docs/ucblogo.pdf
build_architecure_specific_osx:
strategy:
matrix:
architecture: [ x86_64, arm64 ]
name: Build Logo for OSX ${{ matrix.architecture }}
needs: [ build_wxwidgets_osx, build_linux ]
runs-on: macos-latest
timeout-minutes: 15
steps:
- name: Install Dependencies
run: >
brew install
autoconf-archive
automake
- name: wxWidgets Cache
uses: actions/cache@v4
id: wxwidgets-cache
with:
path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }}-${{ matrix.architecture }}
- name: Install wxwidgets
# Install wxwidgets from cache on build machine so autoconf has WX_CONFIG_CHECK
working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}
run: |
cd build-static
sudo make install
sudo cp ../wxwin.m4 /opt/homebrew/share/aclocal/
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download PDF manual
uses: actions/[email protected]
with:
name: ucblogo.pdf
path: docs
- name: Build Logo
env:
WX_CONFIG_PATH: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}/build-static/wx-config
CFLAGS: ${{ matrix.architecture == 'x86_64' && '-arch x86_64 -masm=intel' || '' }} -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }}
CPPFLAGS: ${{ matrix.architecture == 'x86_64' && '-arch x86_64 -masm=intel' || '' }} -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }}
CXXFLAGS: ${{ matrix.architecture == 'x86_64' && '-arch x86_64 -masm=intel' || '' }} -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }}
LDFLAGS: ${{ matrix.architecture == 'x86_64' && '-arch x86_64 -masm=intel' || '' }} -mmacosx-version-min=${{ env.TARGET_OSX_VERSION }}
run: |
autoreconf --install
./configure --enable-gitid --with-wx-config=$WX_CONFIG_PATH
make -j2 ucblogo.dmg
- name: Archive ucblogo.dmg ${{ matrix.architecture }}
uses: actions/upload-artifact@v4
with:
name: ucblogo-${{ matrix.architecture }}.dmg
path: ucblogo.dmg
build_universal_binary_osx:
name: Build universal binary for OSX
needs: [ build_architecure_specific_osx ]
runs-on: macos-latest
timeout-minutes: 15
steps:
- name: Download PDF manual
uses: actions/[email protected]
with:
name: ucblogo.pdf
path: docs
- name: Download x86_64 disk image
uses: actions/[email protected]
with:
name: ucblogo-x86_64.dmg
path: ucblogo-x86_64
- name: Extract x86_64 application
run: |
hdiutil attach ucblogo-x86_64/ucblogo.dmg
cp -r /Volumes/UCBLogo/UCBLogo.app ucblogo-x86_64/UCBLogo.app
hdiutil detach /Volumes/UCBLogo
- name: Download arm64 disk image
uses: actions/[email protected]
with:
name: ucblogo-arm64.dmg
path: ucblogo-arm64
- name: Extract arm64 application
run: |
hdiutil attach ucblogo-arm64/ucblogo.dmg
cp -r /Volumes/UCBLogo/UCBLogo.app ucblogo-arm64/UCBLogo.app
hdiutil detach /Volumes/UCBLogo
- name: Build universal application
run: |
lipo -create -output ucblogo ucblogo-x86_64/UCBLogo.app/Contents/MacOS/UCBLogo ucblogo-arm64/UCBLogo.app/Contents/MacOS/UCBLogo
cp -r ucblogo-arm64/UCBLogo.app UCBLogo.app
cp ucblogo UCBLogo.app/Contents/MacOS/UCBLogo
- name: Build Logo disk image
run: |
hdiutil create -size 20m -fs HFS+ -volname "UCBLogo" ucblogo_base.dmg
hdiutil attach ucblogo_base.dmg
cp -a UCBLogo.app /Volumes/UCBLogo/
cp docs/ucblogo.pdf /Volumes/UCBLogo/UCBLogoUserManual.pdf
hdiutil detach /Volumes/UCBLogo/
hdiutil convert ucblogo_base.dmg -format UDZO -o ucblogo.dmg
- name: Archive universal ucblogo.dmg
uses: actions/upload-artifact@v4
with:
name: ucblogo.dmg
path: ucblogo.dmg
build_windows:
name: Build Logo for Windows
needs: [ build_wxwidgets_windows, build_linux ]
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Install Dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
install: >
git
base-devel
mingw-w64-i686-toolchain
unzip
- name: wxWidgets Cache
uses: actions/cache@v4
id: wxwidgets-cache
with:
path: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}
key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare Repository
shell: msys2 {0}
run: |
git clean -x -d -f .
mingw32-make -f makefile.msys git.c
rm libloc.c
- name: Download PDF manual
uses: actions/[email protected]
with:
name: ucblogo.pdf
path: docs
- name: Find MinGW bin directory
shell: msys2 {0}
run: |
echo "MINGW_BIN_DIR=`dirname $(command -v gcc)`" >> $GITHUB_ENV
- name: Build Logo
shell: msys2 {0}
env:
WX_DIR: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}
run: |
mingw32-make -f makefile.msys MINGW_BIN_DIR=$MINGW_BIN_DIR WX_DIR=$WX_DIR install_win
- name: Run Inno
working-directory: ${{ github.workspace }}\inno
shell: pwsh
run: |
iscc ucblogo.iss
- name: Archive installer
uses: actions/upload-artifact@v4
with:
name: ucblogosetup.exe
path: inno/ucblogo*setup.exe