Build and Release OnePlus Kernels #433
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: false | |
ksun_branch: | |
description: "Choose KernelSU Next Branch" | |
required: true | |
type: choice | |
options: | |
- stable | |
- next | |
default: next | |
susfs_branch: | |
required: true | |
type: string | |
default: "gki-android13-5.15" | |
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: OP11u | |
soc: kalama | |
branch: oneplus/sm8550 | |
manifest: oneplus_11_u.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" | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
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: ${{ inputs.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" | |
# uses: ./.github/workflows/build.yml | |
# secrets: inherit | |
# 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 }} | |
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/**/* |