diff --git a/.github/workflows/build-kernel-release.yml b/.github/workflows/build-kernel-release.yml index 9d2628c2..6b5e089f 100644 --- a/.github/workflows/build-kernel-release.yml +++ b/.github/workflows/build-kernel-release.yml @@ -12,6 +12,38 @@ on: required: true type: boolean default: false + op_model: + description: 'Select the OnePlus kernels to build' + required: true + type: choice + options: + - OP13-CPH + - OP13-PJZ + - OP13r + - OP13S + - OP13T + - OP12 + - OP12r + - OP11 + - OP11r + - OP10pro + - OP10t + - OP-Nord-5 + - OP-NORD-4 + - OP-NORD-4-CE + - OP-NORD-CE4-LITE + - OP-ACE-5-PRO + - OP-ACE-5 + - OP-ACE-3-PRO + - OP-ACE-3V + - OP-ACE-2-PRO + - OP-ACE-2 + - OP-OPEN + - OP-PAD-3 + - OP-PAD-2-PRO + - OP-PAD-2 + - OP-PAD-PRO + default: OP11 ksun_branch: description: 'Enter KernelSU Next Branch or commit hash (blank for stable tag)' required: true @@ -49,20 +81,64 @@ on: default: '' jobs: + set-op-model: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout Code (to access configs/) + uses: actions/checkout@v4 + with: + sparse-checkout: | + configs/ + sparse-checkout-cone-mode: false + + - name: Setup OnePlus Model + id: set-matrix + shell: bash + run: | + set -euo pipefail + declare -a models=() + while IFS= read -r -d '' file; do + model=$(basename "$file" .json) + models+=("$model") + done < <(find configs/ -name "*.json" -print0) + + if [ ${#models[@]} -eq 0 ]; then + echo "Error: No config files found in configs/ directory!" + exit 1 + fi + + echo "[" > matrix.json + for i in "${!models[@]}"; do + model="${models[$i]}" + file="configs/$model.json" + if [ -f "$file" ]; then + jq -r '.' "$file" >> matrix.json + if [ $((i+1)) -lt ${#models[@]} ]; then + echo "," >> matrix.json + fi + fi + done + echo "]" >> matrix.json + + input="${{ github.event.inputs.op_model }}" + jq_filter="map(select(.model == \"$input\"))" + + filtered=$(jq -c "$jq_filter" matrix.json) + wrapped=$(jq -n --argjson items "$filtered" '{ include: $items }') + + echo "matrix<> "$GITHUB_OUTPUT" + echo "$wrapped" >> "$GITHUB_OUTPUT" + echo "MATRIX_EOF" >> "$GITHUB_OUTPUT" + build: name: build (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }}) + needs: set-op-model runs-on: ubuntu-latest 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' - + matrix: ${{ fromJSON(needs.set-op-model.outputs.matrix) }} steps: - name: Resolve SUSFS branch from inputs id: susfs @@ -78,7 +154,6 @@ jobs: ["android14-6.1"]="${{ inputs.android14-6_1_susfs_branch_or_commit }}" ["android15-6.6"]="${{ inputs.android15-6_6_susfs_branch_or_commit }}" ) - # Only validate mapping presence; allow empty string value to be passed through. if [[ -z "${map[$key]+_exists}" ]]; then echo "Unsupported combo (no mapping): $key" >&2 exit 1 @@ -93,10 +168,7 @@ jobs: - name: Build Kernel uses: WildKernels/OnePlus_KernelSU_SUSFS/.github/actions@main with: - model: ${{ matrix.model }} - soc: ${{ matrix.soc }} - branch: ${{ matrix.branch }} - manifest: ${{ matrix.manifest }} + op_config_json: ${{ toJSON(matrix) }} ksun_branch: ${{ inputs.ksun_branch }} susfs_commit_hash_or_branch: ${{ steps.susfs.outputs.susfs_branch }} optimize_level: ${{ inputs.optimize_level }} @@ -115,10 +187,10 @@ jobs: Module: -> https://github.com/sidex15/ksu_module_susfs - + Non-Official Managers: -> https://github.com/KernelSU-Next/KernelSU-Next - + Features: [+] KernelSU-Next / WildKSU Manager Support [+] SUSFS v1.5.12 @@ -130,7 +202,6 @@ jobs: [+] BBR v1 Support. [+] HMBIRD scx support for OnePlus 13 & OnePlus Ace 5 Pro. [+] Baseband Guard Support (BBG). - [+] xx_maps hide. steps: - name: Checkout code @@ -182,4 +253,4 @@ jobs: - name: Display Files Uploaded run: | echo "GitHub release created with the following files:" - ls ./downloaded-artifacts/**/* \ No newline at end of file + ls ./downloaded-artifacts/**/* diff --git a/configs/OP-ACE-2-PRO.json b/configs/OP-ACE-2-PRO.json new file mode 100644 index 00000000..c97863b8 --- /dev/null +++ b/configs/OP-ACE-2-PRO.json @@ -0,0 +1,9 @@ +{ + "model": "OP-ACE-2-PRO", + "soc": "kalama", + "branch": "oneplus/sm8550", + "manifest": "oneplus_ace2_pro_v.xml", + "android_version": "android13", + "kernel_version": "5.15", + "hmbird": false +} diff --git a/configs/OP-ACE-2.json b/configs/OP-ACE-2.json new file mode 100644 index 00000000..3e97bc49 --- /dev/null +++ b/configs/OP-ACE-2.json @@ -0,0 +1,9 @@ +{ + "model": "OP-ACE-2", + "soc": "waipio", + "branch": "oneplus/sm8475", + "manifest": "oneplus_ace2_v.xml", + "android_version": "android12", + "kernel_version": "5.10", + "hmbird": false +} diff --git a/configs/OP-ACE-3-PRO.json b/configs/OP-ACE-3-PRO.json new file mode 100644 index 00000000..e2d4e4c7 --- /dev/null +++ b/configs/OP-ACE-3-PRO.json @@ -0,0 +1,9 @@ +{ + "model": "OP-ACE-3-PRO", + "soc": "pineapple", + "branch": "oneplus/sm8650", + "manifest": "oneplus_ace3_pro_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-ACE-3V.json b/configs/OP-ACE-3V.json new file mode 100644 index 00000000..311dc2f4 --- /dev/null +++ b/configs/OP-ACE-3V.json @@ -0,0 +1,9 @@ +{ + "model": "OP-ACE-3V", + "soc": "pineapple", + "branch": "oneplus/sm7675", + "manifest": "oneplus_ace_3v_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-ACE-5-PRO.json b/configs/OP-ACE-5-PRO.json new file mode 100644 index 00000000..4e43965a --- /dev/null +++ b/configs/OP-ACE-5-PRO.json @@ -0,0 +1,9 @@ +{ + "model": "OP-ACE-5-PRO", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_ace5_pro.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": true +} diff --git a/configs/OP-ACE-5.json b/configs/OP-ACE-5.json new file mode 100644 index 00000000..79a39ec0 --- /dev/null +++ b/configs/OP-ACE-5.json @@ -0,0 +1,9 @@ +{ + "model": "OP-ACE-5", + "soc": "pineapple", + "branch": "oneplus/sm8650", + "manifest": "oneplus_ace5.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-NORD-4-CE.json b/configs/OP-NORD-4-CE.json new file mode 100644 index 00000000..c3074309 --- /dev/null +++ b/configs/OP-NORD-4-CE.json @@ -0,0 +1,9 @@ +{ + "model": "OP-NORD-4-CE", + "soc": "crow", + "branch": "oneplus/sm7550", + "manifest": "oneplus_nord_ce4_v.xml", + "android_version": "android13", + "kernel_version": "5.15", + "hmbird": false +} diff --git a/configs/OP-NORD-4.json b/configs/OP-NORD-4.json new file mode 100644 index 00000000..2744c816 --- /dev/null +++ b/configs/OP-NORD-4.json @@ -0,0 +1,9 @@ +{ + "model": "OP-NORD-4", + "soc": "pineapple", + "branch": "oneplus/sm7675", + "manifest": "oneplus_nord_4_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-NORD-5.json b/configs/OP-NORD-5.json new file mode 100644 index 00000000..ec026bbb --- /dev/null +++ b/configs/OP-NORD-5.json @@ -0,0 +1,9 @@ +{ + "model": "OP-NORD-5", + "soc": "cliffs", + "branch": "oneplus/sm8635", + "manifest": "oneplus_nord_5.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-NORD-CE4-LITE.json b/configs/OP-NORD-CE4-LITE.json new file mode 100644 index 00000000..16aac6ef --- /dev/null +++ b/configs/OP-NORD-CE4-LITE.json @@ -0,0 +1,9 @@ +{ + "model": "OP-NORD-CE4-LITE", + "soc": "blair", + "branch": "oneplus/sm6375", + "manifest": "oneplus_nord_ce4_lite_5g_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-OPEN.json b/configs/OP-OPEN.json new file mode 100644 index 00000000..351c63f8 --- /dev/null +++ b/configs/OP-OPEN.json @@ -0,0 +1,9 @@ +{ + "model": "OP-OPEN", + "soc": "kalama", + "branch": "oneplus/sm8550", + "manifest": "oneplus_open_v.xml", + "android_version": "android13", + "kernel_version": "5.15", + "hmbird": false +} diff --git a/configs/OP-PAD-2-PRO.json b/configs/OP-PAD-2-PRO.json new file mode 100644 index 00000000..ddb96bc8 --- /dev/null +++ b/configs/OP-PAD-2-PRO.json @@ -0,0 +1,9 @@ +{ + "model": "OP-PAD-2-PRO", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_pad_2_pro.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": false +} diff --git a/configs/OP-PAD-2.json b/configs/OP-PAD-2.json new file mode 100644 index 00000000..a1214aa6 --- /dev/null +++ b/configs/OP-PAD-2.json @@ -0,0 +1,9 @@ +{ + "model": "OP-PAD-2", + "soc": "pineapple", + "branch": "oneplus/sm8650", + "manifest": "oneplus_pad2_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP-PAD-3.json b/configs/OP-PAD-3.json new file mode 100644 index 00000000..81994bf4 --- /dev/null +++ b/configs/OP-PAD-3.json @@ -0,0 +1,9 @@ +{ + "model": "OP-PAD-3", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_pad_3.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": false +} diff --git a/configs/OP-PAD-PRO.json b/configs/OP-PAD-PRO.json new file mode 100644 index 00000000..a6b99874 --- /dev/null +++ b/configs/OP-PAD-PRO.json @@ -0,0 +1,9 @@ +{ + "model": "OP-PAD-PRO", + "soc": "pineapple", + "branch": "oneplus/sm8650", + "manifest": "oneplus_pad_pro_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP10pro.json b/configs/OP10pro.json new file mode 100644 index 00000000..8ca10742 --- /dev/null +++ b/configs/OP10pro.json @@ -0,0 +1,9 @@ +{ + "model": "OP10pro", + "soc": "waipio", + "branch": "oneplus/sm8450", + "manifest": "oneplus_10_pro_v.xml", + "android_version": "android12", + "kernel_version": "5.10", + "hmbird": false +} diff --git a/configs/OP10t.json b/configs/OP10t.json new file mode 100644 index 00000000..6bbd3097 --- /dev/null +++ b/configs/OP10t.json @@ -0,0 +1,9 @@ +{ + "model": "OP10t", + "soc": "waipio", + "branch": "oneplus/sm8475", + "manifest": "oneplus_10t_v.xml", + "android_version": "android12", + "kernel_version": "5.10", + "hmbird": false +} diff --git a/configs/OP11.json b/configs/OP11.json new file mode 100644 index 00000000..e9d812a3 --- /dev/null +++ b/configs/OP11.json @@ -0,0 +1,9 @@ +{ + "model": "OP11", + "soc": "kalama", + "branch": "oneplus/sm8550", + "manifest": "oneplus_11_v.xml", + "android_version": "android13", + "kernel_version": "5.15", + "hmbird": false +} diff --git a/configs/OP11r.json b/configs/OP11r.json new file mode 100644 index 00000000..e3505e3b --- /dev/null +++ b/configs/OP11r.json @@ -0,0 +1,9 @@ +{ + "model": "OP11r", + "soc": "waipio", + "branch": "oneplus/sm8475", + "manifest": "oneplus_11r_v.xml", + "android_version": "android12", + "kernel_version": "5.10", + "hmbird": false +} diff --git a/configs/OP12.json b/configs/OP12.json new file mode 100644 index 00000000..d624b7f8 --- /dev/null +++ b/configs/OP12.json @@ -0,0 +1,9 @@ +{ + "model": "OP12", + "soc": "pineapple", + "branch": "oneplus/sm8650", + "manifest": "oneplus12_v.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +} diff --git a/configs/OP12r.json b/configs/OP12r.json new file mode 100644 index 00000000..f54805fb --- /dev/null +++ b/configs/OP12r.json @@ -0,0 +1,9 @@ +{ + "model": "OP12r", + "soc": "kalama", + "branch": "oneplus/sm8550", + "manifest": "oneplus_12r_v.xml", + "android_version": "android13", + "kernel_version": "5.15", + "hmbird": false +} diff --git a/configs/OP13-CPH.json b/configs/OP13-CPH.json new file mode 100644 index 00000000..5195109b --- /dev/null +++ b/configs/OP13-CPH.json @@ -0,0 +1,9 @@ +{ + "model": "OP13-CPH", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_13_global.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": true +} diff --git a/configs/OP13-PJZ.json b/configs/OP13-PJZ.json new file mode 100644 index 00000000..b3108bf4 --- /dev/null +++ b/configs/OP13-PJZ.json @@ -0,0 +1,9 @@ +{ + "model": "OP13-PJZ", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_13.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": true +} diff --git a/configs/OP13S.json b/configs/OP13S.json new file mode 100644 index 00000000..3da4354b --- /dev/null +++ b/configs/OP13S.json @@ -0,0 +1,9 @@ +{ + "model": "OP13S", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_13s.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": false +} diff --git a/configs/OP13T.json b/configs/OP13T.json new file mode 100644 index 00000000..ba68b2a7 --- /dev/null +++ b/configs/OP13T.json @@ -0,0 +1,9 @@ +{ + "model": "OP13T", + "soc": "sun", + "branch": "oneplus/sm8750", + "manifest": "oneplus_13t.xml", + "android_version": "android15", + "kernel_version": "6.6", + "hmbird": false +} diff --git a/configs/OP13r.json b/configs/OP13r.json new file mode 100644 index 00000000..8621cceb --- /dev/null +++ b/configs/OP13r.json @@ -0,0 +1,9 @@ +{ + "model": "OP13r", + "soc": "pineapple", + "branch": "oneplus/sm8650", + "manifest": "oneplus_13r.xml", + "android_version": "android14", + "kernel_version": "6.1", + "hmbird": false +}