-
Notifications
You must be signed in to change notification settings - Fork 35
338 lines (274 loc) · 12.6 KB
/
Copy pathmain.yml
File metadata and controls
338 lines (274 loc) · 12.6 KB
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
name: CI
on:
push:
branches:
- master
- next
- dev
pull_request:
branches:
- master
- next
- dev
workflow_dispatch:
branches:
- master
- next
- dev
inputs:
deploy:
description: 'Do you want DEPLOYMENT onto the download page?'
required: false
default: 'false'
jobs:
linux-native:
name: Linux native build
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set custom build variables
uses: ./.github/actions/set-custom-build-variables
- name: Check deployment request status
if: env.should_deploy == 'true'
run: echo "ENABLED (if you see this)"
- name: Current builder/repo info
run: |
echo "Running builder at `pwd` as `whoami`@`hostname` on `uname -a`"
echo "--- GIT INFO ---"
bash build/show-git-info | tee /tmp/show-git-info || true
echo "--- CURRENT DIRECTORY ---"
pwd
ls -la
echo "--- PARENT DIRECTORY ---"
ls -la ..
- name: Show shell variables
run: env | grep -Evi 'SECRET|TOKEN|HOOK|SECURE|_ID|_SHA' || true
- name: Install Ubuntu packages
run: |
sudo apt-get -y -yq update || true
sudo apt-get -y -yq --no-install-suggests --no-install-recommends install alien bash bison build-essential bzip2 coreutils curl deborphan dpkg fakeroot file gawk gcc libc6-dev libc-bin libcurl4-openssl-dev libgtk-3-dev libreadline6-dev libsdl2-dev lsb-release make sed tar util-linux vim-common wget zip jq
- name: List of all installed packages
run: dpkg -l | cat || true
- name: Show build system info
run: bash build/show-sys-info.sh
- name: Show SDL2 status
run: |
ls -l `which sdl2-config` || true
sdl2-config --version --prefix --exec-prefix --cflags --libs --static-libs || true
- name: Configure Xemu
run: make RELEASE=yes OFFICIALBUILD=yes config
- name: Build Xemu
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes
- name: Strip and list of result binaries
run: for a in build/bin/*.native ; do ls -l $a ; strip $a ; ls -l $a ; done
- name: Test run of MEGA65 emulator
run: build/bin/xmega65.native -h || true
- name: Create DEB package to be deployed
if: env.should_deploy == 'true'
run: |
make RELEASE=yes OFFICIALBUILD=yes deb
cp build/bin/*.deb build/bin/*.rpm .
ls -l *.deb *.rpm
- name: Deploy
if: env.should_deploy == 'true'
env:
TARGET_BRANCH: binary-linux-${{ github.ref_name }}
XEMU_DEPLOY_TOKEN: ${{ secrets.XEMU_DEPLOY_TOKEN }}
COMMIT_MESSAGE: Deploy from ${{ github.repository }}@${{ github.sha }}
run: |
git config --global user.name "Xemu Native Linux Builder"
git config --global user.email "lgblgblgb@gmail.com"
build/deploy/before-deploy.sh xemu-deploy Linux
cd xemu-deploy
../build/deploy/git-deploy-forced-push.sh
cd ..
- name: Announce deployment
if: env.should_deploy == 'true'
env:
CI_SYSTEM_OVERRIDE: Github Actions
DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK }}
DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK }}
run: build/deploy/discord-webhook.sh success "Ubuntu Linux DEB" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true
linux-for-windows:
name: Windows build on Linux
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set custom build variables
uses: ./.github/actions/set-custom-build-variables
- name: Check deployment request status
if: env.should_deploy == 'true'
run: echo "ENABLED (if you see this)"
- name: Current builder/repo info
run: |
echo "Running builder at `pwd` as `whoami`@`hostname` on `uname -a`"
echo "--- GIT INFO ---"
bash build/show-git-info | tee /tmp/show-git-info || true
echo "--- CURRENT DIRECTORY ---"
pwd
ls -la
echo "--- PARENT DIRECTORY ---"
ls -la ..
- name: Show shell variables
run: env | grep -Evi 'SECRET|TOKEN|HOOK|SECURE|_ID|_SHA' || true
- name: Install Ubuntu packages
run: |
sudo apt-get -y -yq update || true
sudo apt-get -y -yq --no-install-suggests --no-install-recommends install alien bash binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 bison build-essential bzip2 coreutils curl deborphan dpkg fakeroot file gawk gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 lsb-release make sed tar util-linux vim-common wget zip nsis jq
- name: List of all installed packages
run: dpkg -l | cat || true
- name: Show build system info
run: bash build/show-sys-info.sh
- name: Install Windows SDL2 cross-development components
run: build/install-cross-win-mingw-sdl-on-linux.sh /usr/bin
- name: Show Windows SDL2 status
run: |
echo "*** 64-bit Windows SDL2 status ***"
ls -l `which x86_64-w64-mingw32-sdl2-config` || true
x86_64-w64-mingw32-sdl2-config --version --prefix --exec-prefix --cflags --libs --static-libs || true
echo "*** 32-bit Windows SDL2 status ***"
ls -l `which i686-w64-mingw32-sdl2-config` || true
i686-w64-mingw32-sdl2-config --version --prefix --exec-prefix --cflags --libs --static-libs || true
- name: Configure Xemu (64-bit)
run: make RELEASE=yes OFFICIALBUILD=yes ARCH=win64 config
- name: Build Xemu (64-bit)
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes ARCH=win64
- name: Strip and list of result binaries (64-bit)
run: for a in build/bin/*.win64 ; do ls -l $a ; x86_64-w64-mingw32-strip $a ; ls -l $a ; done
- name: Configure Xemu (32-bit)
if: env.should_deploy == 'true'
run: make RELEASE=yes OFFICIALBUILD=yes ARCH=win32 config
- name: Build Xemu (32-bit)
if: env.should_deploy == 'true'
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes ARCH=win32
- name: Strip and list of result binaries (32-bit)
if: env.should_deploy == 'true'
run: for a in build/bin/*.win32 ; do ls -l $a ; i686-w64-mingw32-strip $a ; ls -l $a ; done
- name: Build ZIP acrhive (64-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `x86_64-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/zipper.sh build/bin xemu-binaries-win64.zip build/bin/*.dll build/bin/*.win64 README.md LICENSE AUTHORS
cp build/bin/xemu-binaries-win64.zip .
- name: Build installer (64-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `x86_64-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/nsi-build-native.sh win64
cp build/bin/install-xemu-win64.exe .
- name: Build ZIP archive (32-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `i686-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/zipper.sh build/bin xemu-binaries-win32.zip build/bin/*.dll build/bin/*.win32 README.md LICENSE AUTHORS
cp build/bin/xemu-binaries-win32.zip .
- name: Build installer (32-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `i686-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/nsi-build-native.sh win32
cp build/bin/install-xemu-win32.exe .
- name: Deploy
if: env.should_deploy == 'true'
env:
TARGET_BRANCH: binary-windows-${{ github.ref_name }}
XEMU_DEPLOY_TOKEN: ${{ secrets.XEMU_DEPLOY_TOKEN }}
COMMIT_MESSAGE: Deploy from ${{ github.repository }}@${{ github.sha }}
run: |
git config --global user.name "Xemu Linux Windows Builder"
git config --global user.email "lgblgblgb@gmail.com"
build/deploy/before-deploy.sh xemu-deploy Windows
cd xemu-deploy
../build/deploy/git-deploy-forced-push.sh
cd ..
- name: Announce deployment
if: env.should_deploy == 'true'
env:
CI_SYSTEM_OVERRIDE: Github Actions
DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK }}
DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK }}
run: build/deploy/discord-webhook.sh success "Windows" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true
macos:
name: MacOS native build
runs-on: macos-15-intel
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set custom build variables
uses: ./.github/actions/set-custom-build-variables
- name: Check deployment request status
if: env.should_deploy == 'true'
run: echo "ENABLED (if you see this)"
- name: Current builder/repo info
run: |
echo "Running builder at `pwd` as `whoami`@`hostname` on `uname -a`"
echo "--- GIT INFO ---"
bash build/show-git-info | tee /tmp/show-git-info || true
echo "--- CURRENT DIRECTORY ---"
pwd
ls -la
echo "--- PARENT DIRECTORY ---"
ls -la ..
- name: Show shell variables
run: env | grep -Evi 'SECRET|TOKEN|HOOK|SECURE|_ID|_SHA' || true
- name: Install build/deployment dependencies
run: build/install-dependencies-osx.sh
- name: Show build system info
run: bash build/show-sys-info.sh
- name: Show Mac SDL2 status
run: |
ls -l `which sdl2-config` || true
sdl2-config --version --prefix --cflags --libs --static-libs || true
- name: Configure Xemu
run: make RELEASE=yes OFFICIALBUILD=yes MACMINVER=10.6 config
- name: Build Xemu
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes MACMINVER=10.6
- name: Mangle, strip and list of result binaries
run: |
for a in build/bin/*.native ; do build/mangle_dylib_osx.sh $a ; strip $a ; ls -l $a ; lipo -info $a ; done
echo "--- DYLIB INFO ---"
ls -l build/bin/*.dylib || true
lipo -info build/bin/*.dylib || true
- name: Test run of MEGA65 emulator
run: build/bin/xmega65.native -h || true
- name: Create ZIP archive
if: env.should_deploy == 'true'
run: |
cp README.md LICENSE AUTHORS build/bin/
build/zipper.sh build/bin xemu-binaries-osx.zip build/bin/*.dylib build/bin/*.native README.md LICENSE AUTHORS
cp build/bin/xemu-binaries-osx.zip .
ls -l *.zip
- name: Create DMG installer
if: env.should_deploy == 'true'
run: build/dmg-osx-creator.sh
- name: Install additional utilities
if: env.should_deploy == 'true'
run: |
for a in jq coreutils ; do echo "Checking if brew package $a is installed" ; brew list $a &>/dev/null || brew install $a ; done
ls -l `which jq` `which md5sum`
- name: Deploy
if: env.should_deploy == 'true'
env:
TARGET_BRANCH: binary-osx-${{ github.ref_name }}
XEMU_DEPLOY_TOKEN: ${{ secrets.XEMU_DEPLOY_TOKEN }}
COMMIT_MESSAGE: Deploy from ${{ github.repository }}@${{ github.sha }}
run: |
git config --global user.name "Xemu Native Mac Builder"
git config --global user.email "lgblgblgb@gmail.com"
build/deploy/before-deploy.sh xemu-deploy MacOS
cd xemu-deploy
../build/deploy/git-deploy-forced-push.sh
cd ..
- name: Announce deployment
if: env.should_deploy == 'true'
env:
CI_SYSTEM_OVERRIDE: Github Actions
DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK }}
DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK }}
run: build/deploy/discord-webhook.sh success "MacOS(x86)" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true