forked from WildKernels/OnePlus_KernelSU_SUSFS
-
Notifications
You must be signed in to change notification settings - Fork 22
353 lines (329 loc) · 11.7 KB
/
Copy pathbuild-kernel-release.yml
File metadata and controls
353 lines (329 loc) · 11.7 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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
name: Build and Release OnePlus Kernels
permissions:
contents: write
actions: write
on:
workflow_dispatch:
inputs:
make_release:
description: 'Do you want to create a release?'
required: true
type: boolean
default: true
ksun_branch:
description: "Choose KernelSU Next Branch"
required: true
type: choice
options:
- stable
- next
default: stable
android12-5_10_susfs_branch:
description: "Choose SusFS Branch for android12-5.10"
type: string
default: ""
android13-5_10_susfs_branch:
description: "Choose SusFS Branch for android13-5.10"
type: string
default: ""
android13-5_15_susfs_branch:
description: "Choose SusFS Branch for android13-5.15"
type: string
default: ""
android14-5_15_susfs_branch:
description: "Choose SusFS Branch for android14-5.15"
type: string
default: ""
android14-6_1_susfs_branch:
description: "Choose SusFS Branch for android14-6.1"
type: string
default: ""
android15-6_6_susfs_branch:
description: "Choose SusFS Branch for android15-6.6"
type: string
default: ""
jobs:
build-batch-1: # Non Bazel Builds
name: build-batch-1 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
strategy:
fail-fast: false
matrix:
include:
- model: OP11
soc: kalama
branch: oneplus/sm8550
manifest: oneplus_11_v.xml
android_version: android13
kernel_version: "5.15"
- model: OP11r
soc: waipio
branch: oneplus/sm8475
manifest: oneplus_11r_v.xml
android_version: android12
kernel_version: "5.10"
- model: OP-OPEN
soc: kalama
branch: oneplus/sm8550
manifest: oneplus_open_v.xml
android_version: android13
kernel_version: "5.15"
- model: OP-ACE-2
soc: waipio
branch: oneplus/sm8475
manifest: oneplus_ace2_v.xml
android_version: android12
kernel_version: "5.10"
- model: OP10t
soc: waipio
branch: oneplus/sm8475
manifest: oneplus_10t_v.xml
android_version: android12
kernel_version: "5.10"
- model: OP10pro
soc: waipio
branch: oneplus/sm8450
manifest: oneplus_10_pro_v.xml
android_version: android12
kernel_version: "5.10"
- model: OP-ACE-2-PRO
soc: kalama
branch: oneplus/sm8550
manifest: oneplus_ace2pro_v.xml
android_version: android13
kernel_version: "5.15"
- model: OP12r
soc: kalama
branch: oneplus/sm8550
manifest: oneplus_12r_v.xml
android_version: android13
kernel_version: "5.15"
runs-on: ubuntu-latest
steps:
- name: Select Appropriate SusFS Branch
id: get-susfs-branch
run: |
KERNEL_STRING="${{ matrix.android_version }}-${{ matrix.kernel_version }}"
case "$KERNEL_STRING" in
"android12-5.10")
SUSFS_BRANCH="${{ inputs.android12-5_10_susfs_branch }}"
;;
"android13-5.10")
SUSFS_BRANCH="${{ inputs.android13-5_10_susfs_branch }}"
;;
"android13-5.15")
SUSFS_BRANCH="${{ inputs.android13-5_15_susfs_branch }}"
;;
"android14-5.15")
SUSFS_BRANCH="${{ inputs.android14-5_15_susfs_branch }}"
;;
"android14-6.1")
SUSFS_BRANCH="${{ inputs.android14-6_1_susfs_branch }}"
;;
"android15-6.6")
SUSFS_BRANCH="${{ inputs.android15-6_6_susfs_branch }}"
;;
*)
echo "Invalid kernel version or unsupported: $KERNEL_STRING"
exit 1
;;
esac
if [[ -z "$SUSFS_BRANCH" ]]; then
SUSFS_BRANCH="gki-${{ matrix.android_version }}-${{ matrix.kernel_version }}"
fi
echo "susfs_branch=$SUSFS_BRANCH" >> $GITHUB_OUTPUT
- name: Checkout Code
uses: actions/checkout@v3
- name: Build Kernel
uses: ./.github/actions/
with:
model: ${{ matrix.model }}
soc: ${{ matrix.soc }}
branch: ${{ matrix.branch }}
manifest: ${{ matrix.manifest }}
android_version: ${{ matrix.android_version }}
kernel_version: ${{ matrix.kernel_version }}
ksun_branch: ${{ inputs.ksun_branch }}
susfs_branch: ${{ steps.get-susfs-branch.outputs.susfs_branch }}
build-batch-2:
# needs: build-batch-1
name: build-batch-2 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
strategy:
fail-fast: false
matrix:
include:
- model: OP13
soc: sun
branch: oneplus/sm8750
manifest: oneplus_13.xml
android_version: android15
kernel_version: "6.6"
- model: OPAce5Pro
soc: sun
branch: oneplus/sm8750
manifest: oneplus_ace5_pro.xml
android_version: android15
kernel_version: "6.6"
- model: OP12
soc: pineapple
branch: oneplus/sm8650
manifest: oneplus12_v.xml
android_version: android14
kernel_version: "6.1"
- model: OP13r
soc: pineapple
branch: oneplus/sm8650
manifest: oneplus_13r.xml
android_version: android14
kernel_version: "6.1"
- model: OP-ACE-5
soc: pineapple
branch: oneplus/sm8650
manifest: oneplus_ace5.xml
android_version: android14
kernel_version: "6.1"
- model: OP-ACE-3V
soc: pineapple
branch: oneplus/sm7675
manifest: oneplus_ace_3v_v.xml
android_version: android14
kernel_version: "6.1"
- model: OP-NORD-4
soc: pineapple
branch: oneplus/sm7675
manifest: oneplus_nord_4_v.xml
android_version: android14
kernel_version: "6.1"
- model: OP-PAD-2
soc: pineapple
branch: oneplus/sm8650
manifest: oneplus_pad2_v.xml
android_version: android14
kernel_version: "6.1"
- model: OP13S
soc: sun
branch: oneplus/sm8750
manifest: oneplus_13s.xml
android_version: android15
kernel_version: "6.6"
runs-on: ubuntu-latest
steps:
- name: Select Appropriate SusFS Branch
id: get-susfs-branch
run: |
KERNEL_STRING="${{ matrix.android_version }}-${{ matrix.kernel_version }}"
case "$KERNEL_STRING" in
"android12-5.10")
SUSFS_BRANCH="${{ inputs.android12-5_10_susfs_branch }}"
;;
"android13-5.10")
SUSFS_BRANCH="${{ inputs.android13-5_10_susfs_branch }}"
;;
"android13-5.15")
SUSFS_BRANCH="${{ inputs.android13-5_15_susfs_branch }}"
;;
"android14-5.15")
SUSFS_BRANCH="${{ inputs.android14-5_15_susfs_branch }}"
;;
"android14-6.1")
SUSFS_BRANCH="${{ inputs.android14-6_1_susfs_branch }}"
;;
"android15-6.6")
SUSFS_BRANCH="${{ inputs.android15-6_6_susfs_branch }}"
;;
*)
echo "Invalid kernel version or unsupported: $KERNEL_STRING"
exit 1
;;
esac
if [[ -z "$SUSFS_BRANCH" ]]; then
SUSFS_BRANCH="gki-${{ matrix.android_version }}-${{ matrix.kernel_version }}"
fi
echo "susfs_branch=$SUSFS_BRANCH" >> $GITHUB_OUTPUT
- name: Checkout Code
uses: actions/checkout@v3
- name: Build Kernel
uses: ./.github/actions
with:
model: ${{ matrix.model }}
soc: ${{ matrix.soc }}
branch: ${{ matrix.branch }}
manifest: ${{ matrix.manifest }}
android_version: ${{ matrix.android_version }}
kernel_version: ${{ matrix.kernel_version }}
ksun_branch: ${{ inputs.ksun_branch }}
susfs_branch: ${{ steps.get-susfs-branch.outputs.susfs_branch }}
trigger-release:
needs:
- build-batch-1
- build-batch-2
runs-on: ubuntu-latest
if: ${{ inputs.make_release }}
env:
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: "*TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.7 *TEST BUILD*"
RELEASE_NOTES: |
This release contains KernelSU Next and SUSFS v1.5.7
Module:
-> https://github.com/sidex15/ksu_module_susfs
Non-Official Managers:
-> https://github.com/KernelSU-Next/KernelSU-Next
Features:
[+] KernelSU-Next
[+] SUSFS v1.5.7
[+] Wireguard Support
[+] Maphide LineageOS Detections
[+] Futile Maphide for jit-zygote-cache Detections
[+] Magic Mount Support
[+] Ptrace message leak fix for kernels < 5.16
[+] CMD_SUSFS_HIDE_SUS_MNTS_FOR_ALL_PROCS Support for all kernels.
[+] Manual Hooks [scope_min_manual_hooks_v1.4]
[+] CONFIG_TMPFS_XATTR Support [Mountify Support]
[+] BBR v1 Support.
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Generate and Create New Tag
run: |
BASE_TAG="v1.5.7-r0"
LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
if [ -z "$LATEST_TAG" ]; then
LATEST_TAG="$BASE_TAG"
else
LATEST_TAG=$(printf "%s\n%s\n" "$LATEST_TAG" "$BASE_TAG" | sort -rV | head -n1)
fi
NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
echo "New tag: $NEW_TAG"
echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
git tag $NEW_TAG
git push origin $NEW_TAG
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./downloaded-artifacts
- name: Create GitHub Release
uses: actions/create-release@v1
with:
tag_name: ${{ env.NEW_TAG }}
prerelease: true
release_name: ${{ env.RELEASE_NAME }}
body: ${{ env.RELEASE_NOTES }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Assets Dynamically
run: |
for file in ./downloaded-artifacts/kernel-*/*; do
if [ -d "$file" ]; then
continue
fi
echo "Uploading $file..."
gh release upload ${{ env.NEW_TAG }} "$file"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_TAG: ${{ env.NEW_TAG }}
- name: Display Files Uploaded
run: |
echo "GitHub release created with the following files:"
ls ./downloaded-artifacts/**/*