forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 0
373 lines (316 loc) · 13.6 KB
/
retro_devices_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
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
name: 🐜 Retro-devices Builds
on: [push, pull_request]
# https://github.saobby.my.eu.orgmunity/t/how-to-use-docker-compose-with-github-actions/16850
# https://github.com/sdt/docker-raspberry-pi-cross-compiler
# https://www.raspberrypi.org/forums/viewtopic.php?t=11629
# https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
# Global Cache Settings
env:
GODOT_BASE_BRANCH: master
SCONS_CACHE_LIMIT: 4096
RPI_IMAGE: rpi_toolchain
VITASDK_PATH: /opt/vitasdk
GCW0_TOOLCHAIN: 2021-03-10
ODROID_TAG: 2020-10-01
ODROID_ARCH: gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu
ODROID_TOOLCHAIN: https://github.com/respeaker/toolchains/raw/master/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
RETENTION_DAYS: 2
jobs:
rpi-template:
runs-on: "ubuntu-20.04"
if: "contains(github.event.head_commit.message, '[ci]')"
name: RPi Template (target=release, tools=no)
steps:
- uses: actions/checkout@v2
# Azure repositories are not reliable, we need to prevent azure giving us packages.
- name: Make apt sources.list use the default Ubuntu repositories
run: |
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install -y wget
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: rpi-template-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
- name: Configure environment
run: |
echo "RPXC_IMAGE=${{env.RPI_IMAGE}}" >> $GITHUB_ENV
- name: Build Docker RPi toolchain and build environment
run: |
cp misc/ci/rpi_dockerfile Dockerfile
docker build -t ${RPXC_IMAGE} .
mkdir ~/bin
docker run ${RPXC_IMAGE} > ~/bin/rpxc
chmod +x ~/bin/rpxc
echo "*** patching rpxc"
sed -i -e 's/run -i/run/' ~/bin/rpxc
~/bin/rpxc -- scons --version
~/bin/rpxc -- bash -c 'ls -l /rpxc/sysroot/opt/vc'
echo "::warning::Using gcc/toolchain version $(~/bin/rpxc -- arm-linux-gnueabihf-gcc --version)"
- name: Checkout FRT platform
uses: actions/checkout@v2
with:
repository: 'ppiecuch/frt'
path: 'platform/frt/'
- name: RPi1 compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
~/bin/rpxc -- scons -j2 platform=frt frt_arch=pi1 verbose=yes warnings=all werror=yes target=release tools=no
- name: RPi2 compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
~/bin/rpxc -- scons -j2 platform=frt frt_arch=pi2 verbose=yes warnings=all werror=yes target=release tools=no
- name: RPi3 compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
~/bin/rpxc -- scons -j2 platform=frt frt_arch=pi3 verbose=yes warnings=all werror=yes target=release tools=no
- name: Upload all templates
uses: actions/upload-artifact@v2
with:
name: all-rpi-templates
path: |
bin/godot.frt.opt.arm.pi1
bin/godot.frt.opt.arm.pi2
bin/godot.frt.opt.arm.pi3
retention-days: ${{env.RETENTION_DAYS}}
odroid-template:
runs-on: "ubuntu-20.04"
name: Odroid Template (target=release, tools=no)
if: "contains(github.event.head_commit.message, '[ci]')"
steps:
- uses: actions/checkout@v2
# Azure repositories are not reliable, we need to prevent azure giving us packages.
- name: Make apt sources.list use the default Ubuntu repositories
run: |
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install -y wget
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: rpi-template-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
- name: Build Docker ODroid toolchain and build environment
run: |
cp misc/ci/odroid_dockerfile Dockerfile
docker build --build-arg version=${{env.ODROID_TAG}} --build-arg toolchain=${{env.ODROID_TOOLCHAIN}} -t odroid_dev:${{env.ODROID_TAG}} .
CROSS="/opt/${{env.ODROID_ARCH}}/bin/aarch64-linux-gnu-gcc"
echo "::warning::Using gcc/toolchain version $(docker run --rm -t odroid_dev:${{env.ODROID_TAG}} $CROSS --version)"
- name: Checkout FRT platform
uses: actions/checkout@v2
with:
repository: 'ppiecuch/frt'
path: 'platform/frt/'
- name: ODroid compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
echo "#!/bin/bash" > wrapper.sh
echo "PATH=$PATH:/opt/${{env.ODROID_ARCH}}/bin" >> wrapper.sh
echo "scons -j2 platform=frt frt_arch=odroid verbose=yes warnings=all werror=yes target=release tools=no" >> wrapper.sh
chmod a+x wrapper.sh
docker run --rm -t -v "$(pwd):/app" odroid_dev:${{env.ODROID_TAG}} ./wrapper.sh
- name: Upload templates
uses: actions/upload-artifact@v2
with:
name: odroid-templates
path: bin/godot.frt.opt.aarch64.odroid
retention-days: ${{env.RETENTION_DAYS}}
psvita-template:
runs-on: "ubuntu-20.04"
name: PSVita Template (target=release, tools=no)
if: "contains(github.event.head_commit.message, '[ci]')"
steps:
- uses: actions/checkout@v2
# Azure repositories are not reliable, we need to prevent azure giving us packages.
- name: Make apt sources.list use the default Ubuntu repositories
run: |
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install -y wget xz-utils cmake
# Checkout and configure VitaSDK package
- name: Checkout VDPM package
uses: actions/checkout@v2
with:
repository: 'vitasdk/vdpm'
path: 'vdpm'
- name: Configure environment
run: |
echo "VITASDK=${{env.VITASDK_PATH}}" >> $GITHUB_ENV
echo "${{env.VITASDK_PATH}}/bin" >> $GITHUB_PATH
- name: Configure VitaSDK and toolchain
run: |
cd vdpm
./bootstrap-vitasdk.sh
./install-all.sh
echo "::warning::Using gcc/toolchain version $(arm-vita-eabi-gcc --version)"
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: psvita-template-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
# You can test your matrix by printing the current Python version
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
python --version
scons --version
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
scons -j2 verbose=yes platform=psvita warnings=all werror=yes disable_3ds=yes target=release tools=no
- name: Upload template
uses: actions/upload-artifact@v2
with:
name: psvita-template
path: bin/godot.psvita.opt.arm
retention-days: ${{env.RETENTION_DAYS}}
gcw0-template:
runs-on: "ubuntu-20.04"
name: GCW0 Template (target=release, tools=no)
if: "contains(github.event.head_commit.message, '[ci]')"
steps:
- uses: actions/checkout@v2
# Azure repositories are not reliable, we need to prevent azure giving us packages.
- name: Make apt sources.list use the default Ubuntu repositories
run: |
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install -y wget
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: gcw0-template-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
# You can test your matrix by printing the current Python version
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
python --version
scons --version
- name: Build Docker GCW0 toolchain
run: |
cp misc/ci/gcw0_dockerfile Dockerfile
docker build --build-arg version=${{env.GCW0_TOOLCHAIN}} -t gcw_zero_dev:${{env.GCW0_TOOLCHAIN}} .
echo "::warning::Using gcc/toolchain version $(docker run --rm -t gcw_zero_dev:${{env.GCW0_TOOLCHAIN}} mipsel-linux-gcc --version)"
- name: Checkout FRT platform
uses: actions/checkout@v2
with:
repository: 'ppiecuch/frt'
path: 'platform/frt/'
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
docker run --rm -t -v "$(pwd):/app" gcw_zero_dev:${{env.GCW0_TOOLCHAIN}} scons -j2 platform=frt frt_arch=gcw0 verbose=yes warnings=all werror=yes target=release tools=no
- name: Upload template
uses: actions/upload-artifact@v2
with:
name: gcw0-template
path: bin/godot.frt.opt.mipsel.gcw0
retention-days: ${{env.RETENTION_DAYS}}
nds-template:
runs-on: "ubuntu-20.04"
container: "devkitpro/devkitarm"
name: 3DS Template (target=release, tools=no)
if: "contains(github.event.head_commit.message, '[ci]')"
steps:
- uses: actions/checkout@v2
# Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get update
sudo apt-get install -y --allow-unauthenticated wget python python-pip
# Environment for devkitPro
- name: Configure devKit
run: |
echo "CTRULIB=${DEVKITPRO}/libctru" >> $GITHUB_ENV
echo "${DEVKITARM}/bin" >> $GITHUB_PATH
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: nds-template-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
# You can test your matrix by printing the current Python version
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
python --version
scons --version
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
scons -j2 platform=3ds verbose=yes warnings=all werror=yes target=release tools=no disable_3d=yes
- name: Upload template
uses: actions/upload-artifact@v2
with:
name: nds-template
path: bin/godot.3ds.opt.arm
retention-days: ${{env.RETENTION_DAYS}}