Skip to content

Commit 1435564

Browse files
fix: Improves Release Notes generation and feature management (#86)
- Fixed an issue where the 'Built Devices' table displayed only one OS version for devices with identical models built on different OS versions. - Features now reflect what was actually compiled, based on the matrix.json generated by the 'build' job. - Removed declaration and assignment of unused array variables. - Add SUSFS_BASE_VERSION env to make releases notes dynamic and easy to update - Move KSUN version to a 'Build Configuration' table - Fix compiler options: use ccache clang - Add missing Changelogs Co-authored-by: fatalcoder524 <[email protected]>
1 parent 6c3c628 commit 1435564

File tree

2 files changed

+57
-58
lines changed

2 files changed

+57
-58
lines changed

.github/actions/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -907,10 +907,10 @@ runs:
907907
export KCFLAGS="${KCFLAGS:-} $MAP $MPMAP $FPMAP -no-canonical-prefixes -fdiagnostics-color=never -Qunused-arguments -Wno-unused-command-line-argument"
908908
export KCPPFLAGS="${KCPPFLAGS:-} $MAP $MPMAP $FPMAP"
909909
910-
export CC="clang"
911-
export CXX="clang++"
912-
export HOSTCC="clang"
913-
export HOSTCXX="clang++"
910+
export CC="ccache clang"
911+
export CXX="ccache clang++"
912+
export HOSTCC="ccache clang"
913+
export HOSTCXX="ccache clang++"
914914
915915
export LLVM=1 LLVM_IAS=1
916916
export ARCH=arm64 SUBARCH=arm64

.github/workflows/build-kernel-release.yml

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,18 @@ jobs:
150150
echo "Selected devices:"
151151
jq -r '.[] | " - \(.model) (\(.os_version), \(.android_version)-\(.kernel_version))"' <<<"$filtered"
152152
153-
echo "matrix<<MATRIX_EOF" >> "$GITHUB_OUTPUT"
154-
echo "$wrapped" >> "$GITHUB_OUTPUT"
155-
echo "MATRIX_EOF" >> "$GITHUB_OUTPUT"
153+
echo "matrix=$(jq -c . <<< "$wrapped")" >> "$GITHUB_OUTPUT"
156154
echo "count=$count" >> "$GITHUB_OUTPUT"
157155
158156
echo "::endgroup::"
159157
158+
- name: Upload build matrix
159+
uses: actions/upload-artifact@v4
160+
with:
161+
name: build-matrix
162+
path: matrix.json
163+
retention-days: 1
164+
160165
- name: 📊 Build plan summary
161166
run: |
162167
cat >> $GITHUB_STEP_SUMMARY << 'EOF'
@@ -208,6 +213,8 @@ jobs:
208213
strategy:
209214
fail-fast: false
210215
matrix: ${{ fromJSON(needs.set-op-model.outputs.matrix) }}
216+
outputs:
217+
ksun_ver: ${{ steps.build.outputs.ksu_version }}
211218
steps:
212219
- name: 🧹 Emergency Disk Cleanup
213220
run: |
@@ -419,6 +426,7 @@ jobs:
419426
REPO_NAME: ${{ github.event.repository.name }}
420427
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
421428
RELEASE_NAME: '*TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.12 *TEST BUILD*'
429+
SUSFS_BASE_VERSION: 'v1.5.12'
422430
steps:
423431
- name: 📥 Checkout code
424432
uses: actions/checkout@v4
@@ -427,7 +435,7 @@ jobs:
427435

428436
- name: 🏷️ Generate and Create New Tag
429437
run: |
430-
BASE_TAG="v1.5.12-r0"
438+
BASE_TAG="$SUSFS_BASE_VERSION-r0"
431439
LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
432440
if [ -z "$LATEST_TAG" ]; then
433441
LATEST_TAG="$BASE_TAG"
@@ -452,33 +460,16 @@ jobs:
452460
453461
# Collect build metadata
454462
declare -A device_info
455-
declare -A ksu_versions
456-
declare -A susfs_commits
457-
declare -A clang_versions
463+
464+
JSON_BUILD_DATA=$(jq -c '.' ./downloaded-artifacts/build-matrix/matrix.json)
458465
459466
for file in $(find downloaded-artifacts -name "*.txt" -type f | sort); do
460467
if [ -f "$file" ]; then
461468
full_model=$(basename "$file" .txt)
462469
model=$(echo "$full_model" | sed -E 's/_[^_]*$//')
463470
os_version=$(sed -n '2p' "$file")
464471
kernel_version=$(sed -n '1p' "$file")
465-
466-
# Try to extract additional info from artifact directory
467-
artifact_dir=$(dirname "$file")
468-
if [ -f "$artifact_dir/build_info.json" ]; then
469-
ksu_ver=$(jq -r '.ksu_version // "N/A"' "$artifact_dir/build_info.json")
470-
susfs_commit=$(jq -r '.susfs_commit // "N/A"' "$artifact_dir/build_info.json")
471-
clang_ver=$(jq -r '.clang_version // "N/A"' "$artifact_dir/build_info.json")
472-
else
473-
ksu_ver="N/A"
474-
susfs_commit="N/A"
475-
clang_ver="N/A"
476-
fi
477-
478-
device_info["$model"]="$os_version|$kernel_version"
479-
ksu_versions["$model"]="$ksu_ver"
480-
susfs_commits["$model"]="$susfs_commit"
481-
clang_versions["$model"]="$clang_ver"
472+
device_info["$full_model"]="$model|$os_version|$kernel_version"
482473
fi
483474
done
484475
@@ -499,7 +490,7 @@ jobs:
499490
[ -z "$SUSFS_A15" ] && SUSFS_A15="gki-android15-6.6 (auto)"
500491
501492
cat << EOF > release_notes.md
502-
# 🎯 OnePlus Kernels with KernelSU Next & SUSFS v1.5.12
493+
# 🎯 OnePlus Kernels with KernelSU Next & SUSFS $SUSFS_BASE_VERSION
503494
504495
> **Build Date:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')
505496
> **Build ID:** \`${{ github.run_id }}\`
@@ -509,36 +500,37 @@ jobs:
509500
510501
## 📦 Built Devices (${#device_info[@]} total)
511502
512-
| Model | OS Version | Kernel Version | KSU Next | Features |
513-
|-------|------------|----------------|----------|----------|
503+
| Model | OS Version | Kernel Version | Features |
504+
|-------|------------|----------------|----------|
514505
EOF
515506
516-
for model in $(printf '%s\n' "${!device_info[@]}" | sort); do
517-
IFS='|' read -r os_ver kernel_ver <<< "${device_info[$model]}"
518-
ksu_ver="${ksu_versions[$model]}"
507+
for full_key in $(printf '%s\n' "${!device_info[@]}" | sort); do
508+
IFS='|' read -r model os_ver kernel_ver <<< "${device_info[$full_key]}"
519509
520-
# Determine features based on kernel version and config
521-
features=""
510+
# Use jq to extract feature flags for this model from the JSON matrix
511+
feature_flags=$(jq -r --arg MODEL "$model" '
512+
.[] |
513+
select(.model == $MODEL) |
514+
"\(.hmbird // false)\t\(.bbr // false)\t\(.bbg // false)\t\(.ttl // false)\t\(.ip_set // false)"
515+
' <<< "$JSON_BUILD_DATA")
522516
523-
# Check for HMBIRD support (OP13, OPAce5Pro with android15-6.6)
524-
if [[ "$model" =~ ^(OP13|OPAce5Pro)$ ]] && [[ "$kernel_ver" == "android15-6.6"* ]]; then
525-
features="${features}🐦 HMBIRD "
517+
features=""
518+
# If no match found, skip or handle error
519+
if [[ -z "$feature_flags" ]]; then
520+
echo "Warning: No JSON entry found for model: $model" >&2
521+
else
522+
IFS=$'\t' read -r hmbird bbr bbg ttl ip_set <<< "$feature_flags"
523+
524+
# Build features string based on boolean values
525+
[[ "$hmbird" == "true" ]] && features+="🐦 HMBIRD "
526+
[[ "$bbr" == "true" ]] && features+="🚀 BBR "
527+
[[ "$bbg" == "true" ]] && features+="🛡️ BBG "
528+
[[ "$ttl" == "true" ]] && features+="⏱️ TTL "
529+
[[ "$ip_set" == "true" ]] && features+="🔧 IP_SET"
526530
fi
527531
528-
# BBR is enabled for all
529-
features="${features}🚀 BBR "
530-
531-
# BBG is enabled for all
532-
features="${features}🛡️ BBG "
533-
534-
# TTL support for all
535-
features="${features}⏱️ TTL "
536-
537-
# IP_SET support for all
538-
features="${features}🔧 IP_SET"
539-
540-
printf "| %-13s | %-10s | %-16s | v%-8s | %-30s |\n" \
541-
"$model" "$os_ver" "$kernel_ver" "$ksu_ver" "$features" >> release_notes.md
532+
printf "| %-13s | %-10s | %-16s | %-30s |\n" \
533+
"$model" "$os_ver" "$kernel_ver" "$features" >> release_notes.md
542534
done
543535
544536
cat << EOF >> release_notes.md
@@ -550,7 +542,8 @@ jobs:
550542
| Component | Version/Setting |
551543
|-----------|----------------|
552544
| **KernelSU Next Branch** | \`$KSUN_BRANCH\` |
553-
| **SUSFS Version** | v1.5.12 |
545+
| **KernelSU Next Version** | \`${{ needs.build.outputs.ksun_ver }}\` |
546+
| **SUSFS Version** | \`$SUSFS_BASE_VERSION\` |
554547
| **Optimization Level** | \`$OPTIMIZE_LEVEL\` |
555548
| **Clean Build** | $( [ "$CLEAN_BUILD" = "true" ] && echo "✅ Yes (no ccache)" || echo "❌ No (ccache enabled)" ) |
556549
| **Compiler** | Clang (version varies by device) |
@@ -570,7 +563,7 @@ jobs:
570563
571564
### 🔐 Root Management
572565
- **KernelSU Next** - Next-generation kernel-level root solution
573-
- **SUSFS v1.5.12** - Advanced hiding and security features
566+
- **SUSFS $SUSFS_BASE_VERSION** - Advanced hiding and security features
574567
- **Magic Mount Support** - Seamless file system modifications
575568
- **Manual Hooks** - scope_min_manual_hooks_v1.4 for better compatibility
576569
@@ -616,6 +609,10 @@ jobs:
616609
- **KSU SUSFS Module** (Required for SUSFS features)
617610
→ [GitHub Release](https://github.com/sidex15/ksu_module_susfs/releases)
618611
612+
### Recomended Flasher
613+
- **Kernel Flasher** (Required for flashing AnyKernel3 zips and backups and OTA)
614+
→ [GitHub Release](https://github.com/fatalcoder524/KernelFlasher/releases)
615+
619616
---
620617
621618
## 📥 Installation Instructions
@@ -625,11 +622,11 @@ jobs:
625622
- Backup your current boot image
626623
- Have root access using Magisk / KernelSU (Any forks) / Apatch
627624
628-
### Via Custom Recovery
625+
### Via Kernel Flasher
629626
1. Download the appropriate ZIP for your device
630627
2. Flash the ZIP file using Kernel Flasher
631628
3. Reboot system
632-
4. Install KernelSU/WildSU Manager
629+
4. Install KernelSU-Next/WildSU Manager
633630
5. Install SUSFS module from manager
634631
635632
---
@@ -642,7 +639,9 @@ jobs:
642639
- Improved ccache build system
643640
- Enhanced SUSFS hiding capabilities
644641
- Added IP_SET and TTL support
645-
- Compiler optimizations ($OPTIMIZE_LEVEL)
642+
- Added TMPFS_XATTR and TMPFS_POSIX_ACL support for Mountify
643+
- Added Ptrace leak fix for kernels < 5.16
644+
- Compiler optimizations (${{ inputs.optimize_level }})
646645
647646
### Previous Releases
648647
See [Releases Page](${{ github.server_url }}/${{ github.repository }}/releases)

0 commit comments

Comments
 (0)