forked from libretro/RetroArch
-
Notifications
You must be signed in to change notification settings - Fork 7
208 lines (185 loc) · 7.89 KB
/
Copy pathwebOS.yml
File metadata and controls
208 lines (185 loc) · 7.89 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
name: CI webOS
on:
push:
tags-ignore:
- '*'
branches:
- '*'
pull_request:
release:
types: [ published ]
repository_dispatch:
types: [ run_build ]
env:
PACKAGE_NAME: com.retroarch.webos
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v7
- name: Download ares-cli-rs
uses: robinraju/release-downloader@v1
with:
repository: "webosbrew/ares-cli-rs"
latest: true
fileName: "ares-package_*_amd64.deb"
out-file-path: "temp"
- name: Download Manifest Generator
uses: robinraju/release-downloader@v1
with:
repository: "webosbrew/dev-toolbox-cli"
latest: true
fileName: "webosbrew-toolbox-gen-manifest_*_amd64.deb"
out-file-path: "temp"
- name: Update packages
run: sudo apt-get -yq update
- name: Install webOS CLI
run: |
sudo apt-get -yq install \
./temp/ares-package_*_amd64.deb \
./temp/webosbrew-toolbox-gen-manifest_*.deb
- name: Download webOS (arm) NDK
uses: robinraju/release-downloader@v1
with:
repository: "openlgtv/buildroot-nc4"
latest: true
fileName: "arm-webos-linux-gnueabi_sdk-buildroot-x86_64.tar.gz"
out-file-path: "/tmp"
- name: Download webOS (aarch64) NDK
uses: robinraju/release-downloader@v1
with:
repository: "cscd98/buildroot-nc4"
latest: true
fileName: "aarch64-webos-linux-gnu_sdk-buildroot-x86_64.tar.gz"
out-file-path: "/tmp"
- name: Extract webOS NDKs
shell: bash
working-directory: /tmp
run: |
tar xzf arm-webos-linux-gnueabi_sdk-buildroot-x86_64.tar.gz
./arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
tar xzf aarch64-webos-linux-gnu_sdk-buildroot-x86_64.tar.gz
./aarch64-webos-linux-gnu_sdk-buildroot/relocate-sdk.sh
- name: Load RARCH_VERSION from version.all
id: version
shell: bash
run: |
RARCH_VERSION=$(grep -Po '(?<=#define PACKAGE_VERSION ")[^"]+' version.all)
echo "RARCH_VERSION=$RARCH_VERSION" >> "$GITHUB_ENV"
- name: Resolve SDL2 prebuilt archive
id: sdl2
shell: bash
run: |
URL=$(sed -n 's/^SDL2_PREBUILT_ARCHIVE *?= *//p' Makefile.webos)
echo "url=$URL" >> "$GITHUB_OUTPUT"
echo "name=$(basename "$URL")" >> "$GITHUB_OUTPUT"
- name: Cache SDL2 prebuilt
id: sdl2-cache
uses: actions/cache@v4
with:
path: /tmp/sdl2-prebuilt
key: sdl2-prebuilt-${{ steps.sdl2.outputs.name }}
restore-keys: |
sdl2-prebuilt-
- name: Download SDL2 prebuilt
if: steps.sdl2-cache.outputs.cache-hit != 'true'
shell: bash
env:
SDL2_URL: ${{ steps.sdl2.outputs.url }}
SDL2_NAME: ${{ steps.sdl2.outputs.name }}
run: |
mkdir -p /tmp/sdl2-prebuilt
curl -fsSL --retry 5 --retry-all-errors --retry-delay 5 \
--connect-timeout 30 -o "/tmp/sdl2-prebuilt/$SDL2_NAME" "$SDL2_URL"
- name: Compile RA (GLES2, no wayland legacy variant)
shell: bash
run: |
. /tmp/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
export SDK_PATH=/tmp/arm-webos-linux-gnueabi_sdk-buildroot
make -f Makefile.webos clean
make -f Makefile.webos ipk PACKAGE_NAME=${PACKAGE_NAME} ADD_SDL2_LIB=1 \
SDL2_PREBUILT_ARCHIVE="file:///tmp/sdl2-prebuilt/${SDL2_NAME}" \
-j"$(getconf _NPROCESSORS_ONLN)"
mkdir -p webos/arm
mv webos/com.retroarch.webos_${RARCH_VERSION}_arm.ipk \
webos/arm/com.retroarch.webos-legacy-gles2-no-wayland_${RARCH_VERSION}_arm.ipk
env:
DEBUG: ${{ github.event_name == 'release' && '0' || '1' }}
SDL2_NAME: ${{ steps.sdl2.outputs.name }}
- name: Upload GLES2 artifact
uses: actions/upload-artifact@v7
with:
name: com.retroarch.webos-legacy-gles2-no-wayland_${{ env.RARCH_VERSION }}_${{ github.sha }}_arm.ipk
path: webos/arm/com.retroarch.webos-legacy-gles2-no-wayland_${{ env.RARCH_VERSION }}_arm.ipk
archive: false
- name: Compile RA (default)
shell: bash
run: |
. /tmp/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
export SDK_PATH=/tmp/arm-webos-linux-gnueabi_sdk-buildroot
make -f Makefile.webos clean
bash gfx/common/wayland/generate_wayland_protos.sh
make -f Makefile.webos ipk PACKAGE_NAME=${PACKAGE_NAME} ADD_SDL2_LIB=1 \
SDL2_PREBUILT_ARCHIVE="file:///tmp/sdl2-prebuilt/${SDL2_NAME}" \
HAVE_XKBCOMMON=1 HAVE_USERLAND=1 HAVE_EGL=1 HAVE_WAYLAND=1 \
HAVE_OPENGLES3=1 HAVE_OPENGLES3_1=1 HAVE_OPENGLES3_2=1 -j"$(getconf _NPROCESSORS_ONLN)"
mkdir -p webos/arm
mv webos/com.retroarch.webos_${RARCH_VERSION}_arm.ipk \
webos/arm/com.retroarch.webos_${RARCH_VERSION}_arm.ipk
env:
DEBUG: ${{ github.event_name == 'release' && '0' || '1' }}
SDL2_NAME: ${{ steps.sdl2.outputs.name }}
- name: Upload default artifact
uses: actions/upload-artifact@v7
with:
name: com.retroarch.webos_${{ env.RARCH_VERSION }}_${{ github.sha }}_arm.ipk
path: webos/arm/com.retroarch.webos_${{ env.RARCH_VERSION }}_arm.ipk
archive: false
- name: Generate Manifest (default only)
if: github.repository == 'webosbrew/Retroarch'
shell: bash
run: |
webosbrew-gen-manifest -o webos/${PACKAGE_NAME}.manifest.json \
-p webos/arm/${PACKAGE_NAME}_${RARCH_VERSION}_arm.ipk \
-i https://github.com/webosbrew/RetroArch/raw/webos/webos/icon160.png \
-l https://github.com/webosbrew/RetroArch
- name: Compile RA (aarch64)
shell: bash
run: |
. /tmp/aarch64-webos-linux-gnu_sdk-buildroot/environment-setup
export SDK_PATH=/tmp/aarch64-webos-linux-gnu_sdk-buildroot
make -f Makefile.webos clean
bash gfx/common/wayland/generate_wayland_protos.sh
make -f Makefile.webos ipk PACKAGE_NAME=${PACKAGE_NAME} ADD_SDL2_LIB=0 \
HAVE_XKBCOMMON=1 HAVE_USERLAND=1 HAVE_EGL=1 HAVE_WAYLAND=1 \
HAVE_OPENGLES3=1 HAVE_OPENGLES3_1=1 HAVE_OPENGLES3_2=1 \
HAVE_WAYLAND_BACKPORT=0 HAVE_64TO32BIT_BRIDGE=1 SET_ELF_INTERPRETER=1 HAVE_UDEV=1 \
ARES_PACKAGE_ARGS="-A arm" -j"$(getconf _NPROCESSORS_ONLN)"
mkdir -p webos/aarch64
mv webos/com.retroarch.webos_${{ env.RARCH_VERSION }}_arm.ipk \
webos/aarch64/com.retroarch.webos_${{ env.RARCH_VERSION }}_aarch64.ipk
env:
DEBUG: ${{ github.event_name == 'release' && '0' || '1' }}
- name: Upload aarch64 artifact
uses: actions/upload-artifact@v7
with:
name: com.retroarch.webos_${{ env.RARCH_VERSION }}_${{ github.sha }}_aarch64.ipk
path: webos/aarch64/com.retroarch.webos_${{ env.RARCH_VERSION }}_aarch64.ipk
archive: false
- name: Release
if: github.event_name == 'release' && github.repository == 'webosbrew/Retroarch'
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}
allowUpdates: true
omitNameDuringUpdate: true
omitBody: true
omitPrereleaseDuringUpdate: true
artifacts: |
webos/arm/com.retroarch.webos_${{ env.RARCH_VERSION }}_arm.ipk
webos/arm/com.retroarch.webos-legacy-gles2-no-wayland_${{ env.RARCH_VERSION }}_arm.ipk
webos/aarch64/com.retroarch.webos_${{ env.RARCH_VERSION }}_aarch64.ipk
webos/${{ env.PACKAGE_NAME }}.manifest.json