kernel-samsung.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. name: Kernel Config - Samsung
  2. permissions:
  3. contents: write
  4. actions: write
  5. on:
  6. workflow_call:
  7. inputs:
  8. device:
  9. description: "Branch - All or comma list e.g. SM-S938B-Oneui8.5,SM-S928B-Oneui8 - branches: https://github.com/WildKernels/Samsung_Kernels/branches"
  10. required: false
  11. type: string
  12. default: "All"
  13. root_flavor:
  14. description: "next / kernelsu / resukisu"
  15. required: false
  16. type: string
  17. default: "next"
  18. root_commit:
  19. required: false
  20. type: string
  21. default: ""
  22. variant:
  23. required: false
  24. type: string
  25. default: ""
  26. susfs_commit:
  27. required: false
  28. type: string
  29. default: ""
  30. susfs_commit_android12_5_10:
  31. required: false
  32. type: string
  33. default: ""
  34. susfs_commit_android13_5_10:
  35. required: false
  36. type: string
  37. default: ""
  38. susfs_commit_android13_5_15:
  39. required: false
  40. type: string
  41. default: ""
  42. susfs_commit_android14_5_15:
  43. required: false
  44. type: string
  45. default: ""
  46. susfs_commit_android14_6_1:
  47. required: false
  48. type: string
  49. default: ""
  50. susfs_commit_android15_6_6:
  51. required: false
  52. type: string
  53. default: ""
  54. susfs_commit_android16_6_12:
  55. required: false
  56. type: string
  57. default: ""
  58. nomount_commit:
  59. required: false
  60. type: string
  61. default: ""
  62. susfs:
  63. required: true
  64. type: string
  65. bbg:
  66. required: true
  67. type: string
  68. unicodefix:
  69. required: true
  70. type: string
  71. zeromount:
  72. required: true
  73. type: string
  74. nomount:
  75. required: true
  76. type: string
  77. droidspace:
  78. required: true
  79. type: string
  80. ntsync:
  81. required: true
  82. type: string
  83. bbrv3:
  84. required: true
  85. type: string
  86. cache:
  87. required: true
  88. type: string
  89. ipv6_nat:
  90. required: true
  91. type: string
  92. optimization:
  93. required: true
  94. type: string
  95. ttl:
  96. required: true
  97. type: string
  98. lto:
  99. required: true
  100. type: string
  101. kpm:
  102. required: true
  103. type: string
  104. jobs:
  105. setup:
  106. runs-on: ubuntu-latest
  107. outputs:
  108. matrix: ${{ steps.set.outputs.matrix }}
  109. steps:
  110. - id: set
  111. shell: bash
  112. run: |
  113. set -euo pipefail
  114. DEVICE="${{ inputs.device }}"
  115. # full branch -> build_type map
  116. 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"}]'
  117. if [ "$DEVICE" = "All" ] || [ -z "$DEVICE" ]; then
  118. echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
  119. elif [[ "$DEVICE" == *","* ]]; then
  120. FILTERED=$(echo "$MATRIX" | jq -c --arg d "$DEVICE" '($d | split(",") | map(gsub("^[ ]+|[ ]+$";""))) as $want | [.[] | select(.branch as $b | $want | index($b)) ]')
  121. if [ "$FILTERED" = "[]" ] || [ -z "$FILTERED" ]; then
  122. echo "ERROR: none of the requested devices matched: '$DEVICE'" >&2
  123. exit 1
  124. fi
  125. echo "matrix=$FILTERED" >> "$GITHUB_OUTPUT"
  126. else
  127. FILTERED=$(echo "$MATRIX" | jq -c --arg d "$DEVICE" '[.[] | select(.branch == $d)]')
  128. if [ "$FILTERED" = "[]" ] || [ -z "$FILTERED" ]; then
  129. echo "ERROR: unknown device '$DEVICE'" >&2
  130. exit 1
  131. fi
  132. echo "matrix=$FILTERED" >> "$GITHUB_OUTPUT"
  133. fi
  134. echo "Device=$DEVICE selected"
  135. build-kernels-a12:
  136. needs: setup
  137. name: "Samsung-${{ matrix.branch }} (${{ inputs.variant || inputs.root_flavor }})"
  138. strategy:
  139. fail-fast: false
  140. matrix:
  141. include: ${{ fromJSON(needs.setup.outputs.matrix) }}
  142. uses: ./.github/workflows/build.yml
  143. secrets: inherit
  144. with:
  145. branch: ${{ matrix.branch }}
  146. build_type: ${{ matrix.build_type }}
  147. root_flavor: ${{ inputs.root_flavor }}
  148. root_commit: ${{ inputs.root_commit }}
  149. variant: ${{ inputs.variant }}
  150. susfs_commit: ${{ inputs.susfs_commit }}
  151. susfs_commit_android12_5_10: ${{ inputs.susfs_commit_android12_5_10 }}
  152. susfs_commit_android13_5_10: ${{ inputs.susfs_commit_android13_5_10 }}
  153. susfs_commit_android13_5_15: ${{ inputs.susfs_commit_android13_5_15 }}
  154. susfs_commit_android14_5_15: ${{ inputs.susfs_commit_android14_5_15 }}
  155. susfs_commit_android14_6_1: ${{ inputs.susfs_commit_android14_6_1 }}
  156. susfs_commit_android15_6_6: ${{ inputs.susfs_commit_android15_6_6 }}
  157. susfs_commit_android16_6_12: ${{ inputs.susfs_commit_android16_6_12 }}
  158. nomount_commit: ${{ inputs.nomount_commit }}
  159. susfs: ${{ inputs.susfs }}
  160. bbg: ${{ inputs.bbg }}
  161. unicodefix: ${{ inputs.unicodefix }}
  162. zeromount: ${{ inputs.zeromount }}
  163. nomount: ${{ inputs.nomount }}
  164. droidspace: ${{ inputs.droidspace }}
  165. ntsync: ${{ inputs.ntsync }}
  166. bbrv3: ${{ inputs.bbrv3 }}
  167. cache: ${{ inputs.cache }}
  168. ipv6_nat: ${{ inputs.ipv6_nat }}
  169. optimization: ${{ inputs.optimization }}
  170. ttl: ${{ inputs.ttl }}
  171. lto: ${{ inputs.lto }}
  172. kpm: ${{ inputs.kpm }}