11
11
contents : write
12
12
steps :
13
13
- name : Check out
14
- uses : actions/checkout@v4
14
+ uses : actions/checkout@v3
15
15
with :
16
16
submodules : " recursive"
17
17
fetch-depth : 0
@@ -38,16 +38,19 @@ jobs:
38
38
- name : Build kpimg
39
39
run : |
40
40
export TARGET_COMPILE=`pwd`/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
41
-
42
41
cd kernel
43
- make
44
- mv kpimg kpimg-linux
45
- mv kpimg.elf kpimg.elf-linux
46
- make clean
42
+
47
43
export ANDROID=1
48
44
make
49
45
mv kpimg kpimg-android
50
46
mv kpimg.elf kpimg.elf-android
47
+ make clean
48
+
49
+ unset ANDROID
50
+ make
51
+ mv kpimg kpimg-linux
52
+ mv kpimg.elf kpimg.elf-linux
53
+ make clean
51
54
52
55
cd ..
53
56
cd kpms
@@ -65,15 +68,15 @@ jobs:
65
68
mv syscallhook.kpm demo-syscallhook.kpm
66
69
67
70
- name : Upload elf
68
- uses : actions/upload-artifact@v4
71
+ uses : actions/upload-artifact@v3
69
72
with :
70
73
path : |
71
74
kernel/kpimg.elf-linux
72
75
kernel/kpimg.elf-android
73
76
name : kpimg.elf
74
77
75
78
- name : Release
76
- uses : ncipollo/release-action@v1.14 .0
79
+ uses : ncipollo/release-action@v1.12 .0
77
80
with :
78
81
token : ${{ secrets.GITHUB_TOKEN }}
79
82
tag : ${{ steps.parse_version.outputs.VERSION }}
95
98
contents : write
96
99
steps :
97
100
- name : Check out
98
- uses : actions/checkout@v4
101
+ uses : actions/checkout@v3
99
102
- name : Generate version
100
103
id : parse_version
101
104
run : |
@@ -115,7 +118,7 @@ jobs:
115
118
zip -r kpuser.zip user
116
119
117
120
- name : Release
118
- uses : ncipollo/release-action@v1.14 .0
121
+ uses : ncipollo/release-action@v1.12 .0
119
122
with :
120
123
token : ${{ secrets.GITHUB_TOKEN }}
121
124
tag : ${{ steps.parse_version.outputs.VERSION }}
@@ -125,13 +128,13 @@ jobs:
125
128
replacesArtifacts : true
126
129
omitBodyDuringUpdate : true
127
130
128
- Build-android-kpatch- kptools :
131
+ Build-android-kptools :
129
132
runs-on : ubuntu-latest
130
133
permissions :
131
134
contents : write
132
135
steps :
133
136
- name : Check out
134
- uses : actions/checkout@v4
137
+ uses : actions/checkout@v3
135
138
with :
136
139
submodules : " recursive"
137
140
fetch-depth : 0
@@ -149,7 +152,7 @@ jobs:
149
152
uses : nttld/setup-ndk@v1
150
153
id : setup-ndk
151
154
with :
152
- ndk-version : r26d
155
+ ndk-version : r26b
153
156
add-to-path : true
154
157
155
158
- name : Make hdr
@@ -158,21 +161,6 @@ jobs:
158
161
cd kernel
159
162
make hdr
160
163
161
- - name : Build kpatch-android
162
- run : |
163
- cd user
164
- export ANDROID=1
165
- mkdir -p build/android && cd build/android
166
- echo ${{ steps.setup-ndk.outputs.ndk-path }}
167
- cmake \
168
- -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
169
- -DCMAKE_BUILD_TYPE=Release \
170
- -DANDROID_PLATFORM=android-33 \
171
- -DANDROID_ABI=arm64-v8a ../..
172
- cmake --build .
173
- unset ANDROID
174
- mv kpatch kpatch-android
175
-
176
164
- name : Build kptools-android
177
165
run : |
178
166
cd tools
@@ -187,13 +175,11 @@ jobs:
187
175
mv kptools kptools-android
188
176
189
177
- name : Release
190
- uses : ncipollo/release-action@v1.14 .0
178
+ uses : ncipollo/release-action@v1.12 .0
191
179
with :
192
180
token : ${{ secrets.GITHUB_TOKEN }}
193
181
tag : ${{ steps.parse_version.outputs.VERSION }}
194
182
artifacts : |
195
- user/build/android/kpatch-android
196
- user/build/android/libapjni.so
197
183
tools/build/android/kptools-android
198
184
allowUpdates : true
199
185
replacesArtifacts : true
@@ -205,7 +191,7 @@ jobs:
205
191
contents : write
206
192
steps :
207
193
- name : Check out
208
- uses : actions/checkout@v4
194
+ uses : actions/checkout@v3
209
195
- name : Generate version
210
196
id : parse_version
211
197
run : |
@@ -232,7 +218,7 @@ jobs:
232
218
mv kptools kptools-linux
233
219
234
220
- name : Release
235
- uses : ncipollo/release-action@v1.14 .0
221
+ uses : ncipollo/release-action@v1.12 .0
236
222
with :
237
223
token : ${{ secrets.GITHUB_TOKEN }}
238
224
tag : ${{ steps.parse_version.outputs.VERSION }}
@@ -248,7 +234,7 @@ jobs:
248
234
contents : write
249
235
steps :
250
236
- name : Checkout
251
- uses : actions/checkout@v4
237
+ uses : actions/checkout@v3
252
238
- name : Generate version
253
239
shell : pwsh
254
240
run : |
@@ -267,6 +253,7 @@ jobs:
267
253
install : >-
268
254
msys/make
269
255
msys/gcc
256
+ msys/zlib-devel
270
257
- name : Copyfile
271
258
shell : pwsh
272
259
run : |
@@ -283,10 +270,13 @@ jobs:
283
270
- name : Copyfile2
284
271
shell : pwsh
285
272
run : |
286
- cp .\tools\kptools.exe .\tools\kptools-msys2.exe
287
- 7z a kptools-msys2-win .\tools\kptools-msys2.exe D:\a\_temp\msys64\usr\bin\msys-2.0.dll
273
+ mkdir .\win
274
+ cp .\tools\kptools.exe .\win\kptools-msys2.exe
275
+ cp D:\a\_temp\msys64\usr\bin\msys-2.0.dll .\win
276
+ cp D:\a\_temp\msys64\usr\bin\msys-z.dll .\win
277
+ 7z a kptools-msys2-win .\win
288
278
- name : Release
289
- uses : ncipollo/release-action@v1.14 .0
279
+ uses : ncipollo/release-action@v1.12 .0
290
280
with :
291
281
token : ${{ secrets.GITHUB_TOKEN }}
292
282
tag : ${{ env.VERSION }}
@@ -295,60 +285,13 @@ jobs:
295
285
allowUpdates : true
296
286
replacesArtifacts : true
297
287
298
- Build-kptools-windows-llvm :
299
- runs-on : ubuntu-latest
300
- permissions :
301
- contents : write
302
- steps :
303
- - name : Check out
304
- uses : actions/checkout@v4
305
- - name : Install mingw32 cross toolchains
306
- run : |
307
- MINGW_LLVM_URL="https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-msvcrt-ubuntu-20.04-x86_64.tar.xz"
308
- mkdir -p $HOME/mingw-llvm
309
- wget $MINGW_LLVM_URL -O $HOME/mingw-llvm/llvm.tar.xz
310
- cd $HOME/mingw-llvm
311
- tar -xvf llvm.tar.xz --strip-components 1
312
- - name : Generate version
313
- id : parse_version
314
- run : |
315
- MAJOR=$(grep '#define MAJOR' version | awk '{print $3}')
316
- MINOR=$(grep '#define MINOR' version | awk '{print $3}')
317
- PATCH=$(grep '#define PATCH' version | awk '{print $3}')
318
- VERSION="$MAJOR.$MINOR.$PATCH"
319
- echo "Generated Version: $VERSION"
320
- echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
321
- - name : Build kptools
322
- run : |
323
- export PATH="$HOME/mingw-llvm/bin:$PATH"
324
- export ANDROID=1
325
- ABIS="x86_64 i686 aarch64 armv7"
326
- for i in $ABIS; do
327
- make -C kernel hdr TARGET_COMPILE=placeholder
328
- echo "- Compiling kptools-$i-win.exe"
329
- make -C tools CC=$i-w64-mingw32-clang
330
- mv tools/kptools.exe kptools-$i-win.exe
331
- make -C tools clean
332
- done
333
- 7za a kptools-llvm-win.zip -tZIP *.exe
334
- - name : Release
335
-
336
- with :
337
- token : ${{ secrets.GITHUB_TOKEN }}
338
- tag : ${{ steps.parse_version.outputs.VERSION }}
339
- artifacts : |
340
- kptools-llvm-win.zip
341
- allowUpdates : true
342
- replacesArtifacts : true
343
- omitBodyDuringUpdate : true
344
-
345
288
Build-kptools-mac :
346
289
runs-on : macos-latest
347
290
permissions :
348
291
contents : write
349
292
steps :
350
293
- name : Check out
351
- uses : actions/checkout@v4
294
+ uses : actions/checkout@v3
352
295
- name : Generate version
353
296
id : parse_version
354
297
run : |
@@ -374,7 +317,7 @@ jobs:
374
317
make
375
318
mv kptools kptools-mac
376
319
- name : Release
377
- uses : ncipollo/release-action@v1.14 .0
320
+ uses : ncipollo/release-action@v1.12 .0
378
321
with :
379
322
token : ${{ secrets.GITHUB_TOKEN }}
380
323
tag : ${{ steps.parse_version.outputs.VERSION }}
0 commit comments