-
-
Notifications
You must be signed in to change notification settings - Fork 46
221 lines (182 loc) · 6.35 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
name: Build package
on:
push:
paths-ignore:
- "**/*.md"
- '**/*.txt'
pull_request:
paths-ignore:
- "**/*.md"
- '**/*.txt'
workflow_dispatch:
jobs:
build_pkg:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set env vars
run: |
echo "llvm_ver=12.0" >> $GITHUB_ENV
echo "sha_name=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
echo "sdl_path=SDL-PS4" >> $GITHUB_ENV
echo "curl_path=oosdk_libraries/curl-7.64.1" >> $GITHUB_ENV
echo "OO_PS4_TOOLCHAIN=${GITHUB_WORKSPACE}/OpenOrbis/PS4Toolchain" >> $GITHUB_ENV
- name: Cache OpenOrbis Toolchain
id: cache-oosdk
uses: actions/cache@v3
with:
path: ${{ env.OO_PS4_TOOLCHAIN }}
key: ${{ runner.os }}-oosdk-llvm-${{ env.llvm_ver }}
# temporary release until 0.53 is released
- name: Download OpenOrbis Toolchain
run: curl -sL https://github.com/illusion0001/OpenOrbis-PS4-Toolchain/releases/download/0.0.1.416/toolchain.tar.gz | tar xz -C ./
- name: Checkout oosdk_libraries
uses: actions/checkout@v3
with:
repository: bucanero/oosdk_libraries
path: oosdk_libraries
- name: Copy makerules
run: cp oosdk_libraries/build_rules.mk OpenOrbis/PS4Toolchain/build_rules.mk
- name: TEMP def update
run: |
curl https://raw.githubusercontent.com/OpenOrbis/OpenOrbis-PS4-Toolchain/master/include/orbis/UserService.h > OpenOrbis/PS4Toolchain/include/orbis/UserService.h
curl https://raw.githubusercontent.com/OpenOrbis/OpenOrbis-PS4-Toolchain/master/include/orbis/_types/user.h > OpenOrbis/PS4Toolchain/include/orbis/_types/user.h
- name: Checkout dbglogger
uses: actions/checkout@v3
with:
repository: bucanero/dbglogger
path: dbglogger
- name: Checkout apollo-lib
uses: actions/checkout@v3
with:
repository: bucanero/apollo-lib
path: apollo-lib
- name: Checkout SQLite
uses: actions/checkout@v3
with:
repository: bucanero/libSQLite-ps4
path: libSQLite-ps4
- name: Checkout SDL-PS4
uses: actions/checkout@v3
with:
repository: bucanero/SDL-PS4
path: ${{ env.sdl_path }}
ref: ps4
- name: Checkout mxml
uses: actions/checkout@v3
with:
repository: bucanero/mxml
path: mxml
- name: Checkout libunrar
uses: actions/checkout@v3
with:
repository: bucanero/libunrar-ps3
path: libunrar-ps3
- name: Checkout libun7zip
uses: actions/checkout@v3
with:
repository: bucanero/libun7zip
path: libun7zip
- name: Checkout libjbc
uses: actions/checkout@v3
with:
repository: bucanero/ps4-libjbc
path: ps4-libjbc
- name: Checkout libs3m
uses: actions/checkout@v3
with:
repository: bucanero/s3mplay
path: s3mplay
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v3
with:
path: ./llvm
key: llvm-${{ env.llvm_ver }}
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ env.llvm_ver }}
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install zlib
working-directory: oosdk_libraries/zlib_partial
run: make install
- name: Install polarssl
working-directory: oosdk_libraries/polarssl-1.3.9
run: make install
- name: Install libzip
working-directory: oosdk_libraries/libzip-1.9.2
run: |
cmake --toolchain ../../SDL-PS4/cmake/openorbis.cmake -DBUILD_SHARED=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TOOLS=OFF -DBUILD_REGRESS=OFF -DBUILD_DOC=OFF -DENABLE_LZMA=OFF -DENABLE_ZSTD=OFF -DENABLE_MBEDTLS=OFF .
make
cp zipconf.h ${OO_PS4_TOOLCHAIN}/include/zipconf.h
cp lib/zip.h ${OO_PS4_TOOLCHAIN}/include/zip.h
cp lib/libzip.a ${OO_PS4_TOOLCHAIN}/lib/libzip.a
- name: Install dbglogger
working-directory: dbglogger
run: make -f Makefile.PS4 install
- name: Install apollo-lib
working-directory: apollo-lib
run: make -f Makefile.PS4 install
- name: Install SQLite
working-directory: libSQLite-ps4
run: make install
- name: Install libun7zip
working-directory: libun7zip
run: make -f Makefile.PS4 install
- name: Install libunrar-ps3
working-directory: libunrar-ps3
run: make -f Makefile.PS4 install
- name: Install mini xml
working-directory: mxml/ps4
run: make install
- name: Install libjbc
working-directory: ps4-libjbc
run: make install
- name: Install libs3m
working-directory: s3mplay
run: make -f Makefile.ps4 install
- name: Cache SDL2
id: cache-sdl2
uses: actions/cache@v3
with:
path: ${{ env.sdl_path }}/orbis/libSDL2.a
key: ${{ runner.os }}-sdl2
- name: Install SDL2 library
if: steps.cache-sdl2.outputs.cache-hit != 'true'
working-directory: ${{ env.sdl_path }}
run: |
mkdir orbis && cd orbis
cmake --toolchain ../cmake/openorbis.cmake ..
make
- name: Cache curl
id: cache-curl
uses: actions/cache@v3
with:
path: ${{ env.curl_path }}/orbis/lib/libcurl.a
key: ${{ runner.os }}-curl
- name: Install libcurl library
if: steps.cache-curl.outputs.cache-hit != 'true'
working-directory: ${{ env.curl_path }}
run: |
mkdir orbis && cd orbis
cmake --toolchain ../../../SDL-PS4/cmake/openorbis.cmake .. -DCMAKE_USE_POLARSSL=1 -DUSE_UNIX_SOCKETS=0 -DENABLE_THREADED_RESOLVER=0 -DENABLE_IPV6=0
make libcurl
- name: Copy cached libraries
run: |
cp ${sdl_path}/orbis/libSDL2.a "${OO_PS4_TOOLCHAIN}/lib"
cp ${curl_path}/orbis/lib/libcurl.a "${OO_PS4_TOOLCHAIN}/lib"
cp -R ${curl_path}/include/curl "${OO_PS4_TOOLCHAIN}/include/"
- name: Add save patches to Package
run: make createzip
- name: Build Apollo App Package
run: |
make
mv IV0000-APOL00004_00-APOLLO0000000PS4.pkg apollo-ps4-build_${{ env.sha_name }}.pkg
- name: Push package artifact
uses: actions/upload-artifact@v3
with:
name: apollo-ps4-build_${{ env.sha_name }}
path: apollo-ps4-build_${{ env.sha_name }}.pkg
if-no-files-found: error