kernel-samsung.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. jobs:
  102. setup:
  103. runs-on: ubuntu-latest
  104. outputs:
  105. matrix: ${{ steps.set.outputs.matrix }}
  106. steps:
  107. - id: set
  108. shell: bash
  109. run: |
  110. set -euo pipefail
  111. DEVICE="${{ inputs.device }}"
  112. # full branch -> build_type map
  113. 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"}]'
  114. if [ "$DEVICE" = "All" ] || [ -z "$DEVICE" ]; then
  115. echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
  116. elif [[ "$DEVICE" == *","* ]]; then
  117. FILTERED=$(echo "$MATRIX" | jq -c --arg d "$DEVICE" '($d | split(",") | map(gsub("^[ ]+|[ ]+$";""))) as $want | [.[] | select(.branch as $b | $want | index($b)) ]')
  118. if [ "$FILTERED" = "[]" ] || [ -z "$FILTERED" ]; then
  119. echo "ERROR: none of the requested devices matched: '$DEVICE'" >&2
  120. exit 1
  121. fi
  122. echo "matrix=$FILTERED" >> "$GITHUB_OUTPUT"
  123. else
  124. FILTERED=$(echo "$MATRIX" | jq -c --arg d "$DEVICE" '[.[] | select(.branch == $d)]')
  125. if [ "$FILTERED" = "[]" ] || [ -z "$FILTERED" ]; then
  126. echo "ERROR: unknown device '$DEVICE'" >&2
  127. exit 1
  128. fi
  129. echo "matrix=$FILTERED" >> "$GITHUB_OUTPUT"
  130. fi
  131. echo "Device=$DEVICE selected"
  132. build-kernels-a12:
  133. needs: setup
  134. name: "Samsung-${{ matrix.branch }} (${{ inputs.variant || inputs.root_flavor }})"
  135. strategy:
  136. fail-fast: false
  137. matrix:
  138. include: ${{ fromJSON(needs.setup.outputs.matrix) }}
  139. uses: ./.github/workflows/build.yml
  140. secrets: inherit
  141. with:
  142. branch: ${{ matrix.branch }}
  143. build_type: ${{ matrix.build_type }}
  144. root_flavor: ${{ inputs.root_flavor }}
  145. root_commit: ${{ inputs.root_commit }}
  146. variant: ${{ inputs.variant }}
  147. susfs_commit: ${{ inputs.susfs_commit }}
  148. susfs_commit_android12_5_10: ${{ inputs.susfs_commit_android12_5_10 }}
  149. susfs_commit_android13_5_10: ${{ inputs.susfs_commit_android13_5_10 }}
  150. susfs_commit_android13_5_15: ${{ inputs.susfs_commit_android13_5_15 }}
  151. susfs_commit_android14_5_15: ${{ inputs.susfs_commit_android14_5_15 }}
  152. susfs_commit_android14_6_1: ${{ inputs.susfs_commit_android14_6_1 }}
  153. susfs_commit_android15_6_6: ${{ inputs.susfs_commit_android15_6_6 }}
  154. susfs_commit_android16_6_12: ${{ inputs.susfs_commit_android16_6_12 }}
  155. nomount_commit: ${{ inputs.nomount_commit }}
  156. susfs: ${{ inputs.susfs }}
  157. bbg: ${{ inputs.bbg }}
  158. unicodefix: ${{ inputs.unicodefix }}
  159. zeromount: ${{ inputs.zeromount }}
  160. nomount: ${{ inputs.nomount }}
  161. droidspace: ${{ inputs.droidspace }}
  162. ntsync: ${{ inputs.ntsync }}
  163. bbrv3: ${{ inputs.bbrv3 }}
  164. cache: ${{ inputs.cache }}
  165. ipv6_nat: ${{ inputs.ipv6_nat }}
  166. optimization: ${{ inputs.optimization }}
  167. ttl: ${{ inputs.ttl }}
  168. lto: ${{ inputs.lto }}