name: Kernel Config - Samsung permissions: contents: write actions: write on: workflow_call: inputs: device: description: "Branch - All or comma list e.g. SM-S938B-Oneui8.5,SM-S928B-Oneui8 - branches: https://github.com/WildKernels/Samsung_Kernels/branches" required: false type: string default: "All" root_flavor: description: "next / kernelsu / resukisu" required: false type: string default: "next" root_commit: required: false type: string default: "" variant: required: false type: string default: "" susfs_commit: required: false type: string default: "" susfs_commit_android12_5_10: required: false type: string default: "" susfs_commit_android13_5_10: required: false type: string default: "" susfs_commit_android13_5_15: required: false type: string default: "" susfs_commit_android14_5_15: required: false type: string default: "" susfs_commit_android14_6_1: required: false type: string default: "" susfs_commit_android15_6_6: required: false type: string default: "" susfs_commit_android16_6_12: required: false type: string default: "" nomount_commit: required: false type: string default: "" susfs: required: true type: string bbg: required: true type: string unicodefix: required: true type: string zeromount: required: true type: string nomount: required: true type: string droidspace: required: true type: string ntsync: required: true type: string bbrv3: required: true type: string cache: required: true type: string ipv6_nat: required: true type: string optimization: required: true type: string ttl: required: true type: string lto: required: true type: string kpm: required: true type: string jobs: setup: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set.outputs.matrix }} steps: - id: set shell: bash run: | set -euo pipefail DEVICE="${{ inputs.device }}" # full branch -> build_type map MATRIX='[{"branch":"SM-S938B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-S938B-Oneui7","build_type":"Bazel"},{"branch":"SM-S931B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-S931B-Oneui8","build_type":"Bazel"},{"branch":"SM-A055M-Oneui7","build_type":"Bazel"},{"branch":"SM-A055F-Oneui7","build_type":"Bazel"},{"branch":"SM-S928B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-S928B-Oneui8-bit4","build_type":"Bazel"},{"branch":"SM-S928B-Oneui8-bit5","build_type":"Bazel"},{"branch":"SM-S928B-Oneui7","build_type":"Bazel"},{"branch":"SM-S928B-Oneui6.1","build_type":"Bazel"},{"branch":"SM-A556B-Oneui7-bitA","build_type":"Bazel"},{"branch":"SM-A556E-Oneui7-bitA","build_type":"Bazel"},{"branch":"SM-S926B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-S926B-Oneui8","build_type":"Bazel"},{"branch":"SM-S926B-Oneui7-bit7","build_type":"Bazel"},{"branch":"SM-S926B-Oneui7-bit8","build_type":"Bazel"},{"branch":"SM-S926B-Oneui7-bit9","build_type":"Bazel"},{"branch":"SM-X926B-Oneui6.1","build_type":"Bazel"},{"branch":"SM-F741B-Oneui8","build_type":"Bazel"},{"branch":"SM-F731B-Oneui6","build_type":"Bazel"},{"branch":"SM-F731B-Oneui7","build_type":"Bazel"},{"branch":"SM-F731B-Oneui8","build_type":"Bazel"},{"branch":"SM-F731B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-A546B-Oneui7","build_type":"make"},{"branch":"SM-A546B-Oneui8","build_type":"make"},{"branch":"SM-A546B-Oneui6.0","build_type":"make"},{"branch":"SM-A546E-Oneui7","build_type":"make"},{"branch":"SM-A546E-Oneui8","build_type":"make"},{"branch":"SM-A166B-Oneui7","build_type":"make"},{"branch":"SM-A057M-Oneui7","build_type":"Bazel"},{"branch":"SM-X710-Oneui6.1.1","build_type":"Bazel"},{"branch":"SM-X916B","build_type":"Bazel"},{"branch":"SM-F946N-Oneui7","build_type":"Bazel"},{"branch":"SM-F946B-Oneui8","build_type":"Bazel"},{"branch":"SM-S916B-Oneui8","build_type":"Bazel"},{"branch":"SM-S918B-Oneui8","build_type":"Bazel"},{"branch":"SM-S918B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-S9180-Oneui6.1","build_type":"Bazel"},{"branch":"SM-S918B-Oneui7","build_type":"Bazel"},{"branch":"SM-M146B-Oneui7-ADYJ2","build_type":"make"},{"branch":"SM-S911B-Oneui8.5","build_type":"Bazel"},{"branch":"SM-S911B-Oneui8-bit8","build_type":"Bazel"},{"branch":"SM-S911B-Oneui8","build_type":"Bazel"},{"branch":"SM-S911B-Oneui7","build_type":"Bazel"},{"branch":"SM-S911B-Oneui6.1-bit7","build_type":"Bazel"},{"branch":"SM-S911B-Oneui6.1-bit8","build_type":"Bazel"},{"branch":"SM-X610-Oneui6.1.1-bit7","build_type":"make"},{"branch":"SM-X800-Oneui8","build_type":"make"},{"branch":"SM-S908E-Oneui8","build_type":"make"},{"branch":"SM-S901E-Oneui8","build_type":"make"},{"branch":"SM-M556B-Oneui8","build_type":"make"},{"branch":"SM-S908B-Oneui8-bitK","build_type":"make"},{"branch":"SM-A075M-Oneui7","build_type":"make"},{"branch":"SM-S906E-Oneui8","build_type":"make"},{"branch":"SM-X610-Oneui7","build_type":"make"},{"branch":"SM-A356E-Oneui8","build_type":"make"},{"branch":"SM-A356E-Oneui8.5","build_type":"make"},{"branch":"SM-S711B-Oneui8.5","build_type":"make"}]' if [ "$DEVICE" = "All" ] || [ -z "$DEVICE" ]; then echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT" elif [[ "$DEVICE" == *","* ]]; then FILTERED=$(echo "$MATRIX" | jq -c --arg d "$DEVICE" '($d | split(",") | map(gsub("^[ ]+|[ ]+$";""))) as $want | [.[] | select(.branch as $b | $want | index($b)) ]') if [ "$FILTERED" = "[]" ] || [ -z "$FILTERED" ]; then echo "ERROR: none of the requested devices matched: '$DEVICE'" >&2 exit 1 fi echo "matrix=$FILTERED" >> "$GITHUB_OUTPUT" else FILTERED=$(echo "$MATRIX" | jq -c --arg d "$DEVICE" '[.[] | select(.branch == $d)]') if [ "$FILTERED" = "[]" ] || [ -z "$FILTERED" ]; then echo "ERROR: unknown device '$DEVICE'" >&2 exit 1 fi echo "matrix=$FILTERED" >> "$GITHUB_OUTPUT" fi echo "Device=$DEVICE selected" build-kernels-a12: needs: setup name: "Samsung-${{ matrix.branch }} (${{ inputs.variant || inputs.root_flavor }})" strategy: fail-fast: false matrix: include: ${{ fromJSON(needs.setup.outputs.matrix) }} uses: ./.github/workflows/build.yml secrets: inherit with: branch: ${{ matrix.branch }} build_type: ${{ matrix.build_type }} root_flavor: ${{ inputs.root_flavor }} root_commit: ${{ inputs.root_commit }} variant: ${{ inputs.variant }} susfs_commit: ${{ inputs.susfs_commit }} susfs_commit_android12_5_10: ${{ inputs.susfs_commit_android12_5_10 }} susfs_commit_android13_5_10: ${{ inputs.susfs_commit_android13_5_10 }} susfs_commit_android13_5_15: ${{ inputs.susfs_commit_android13_5_15 }} susfs_commit_android14_5_15: ${{ inputs.susfs_commit_android14_5_15 }} susfs_commit_android14_6_1: ${{ inputs.susfs_commit_android14_6_1 }} susfs_commit_android15_6_6: ${{ inputs.susfs_commit_android15_6_6 }} susfs_commit_android16_6_12: ${{ inputs.susfs_commit_android16_6_12 }} nomount_commit: ${{ inputs.nomount_commit }} susfs: ${{ inputs.susfs }} bbg: ${{ inputs.bbg }} unicodefix: ${{ inputs.unicodefix }} zeromount: ${{ inputs.zeromount }} nomount: ${{ inputs.nomount }} droidspace: ${{ inputs.droidspace }} ntsync: ${{ inputs.ntsync }} bbrv3: ${{ inputs.bbrv3 }} cache: ${{ inputs.cache }} ipv6_nat: ${{ inputs.ipv6_nat }} optimization: ${{ inputs.optimization }} ttl: ${{ inputs.ttl }} lto: ${{ inputs.lto }} kpm: ${{ inputs.kpm }}