root-variants.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. name: Build-verified only GKI root variants
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. kernel_build_version:
  6. description: "Supported GKI target"
  7. required: true
  8. type: choice
  9. options:
  10. - android12-5.10
  11. - android13-5.10
  12. - android13-5.15
  13. - android14-5.15
  14. - android14-6.1
  15. - android15-6.6
  16. - android16-6.12
  17. default: android14-6.1
  18. os_patch_level:
  19. description: "Patch date (YYYY-MM), kernel sublevel, lts (builds the LTS branch), or all"
  20. required: true
  21. type: string
  22. default: lts
  23. commit_mode:
  24. description: "verified = audited pinned SHAs, latest = branch tips at run time"
  25. required: false
  26. type: choice
  27. options:
  28. - verified
  29. - latest
  30. default: verified
  31. permissions:
  32. contents: read
  33. actions: write
  34. jobs:
  35. resolve-pins:
  36. runs-on: ubuntu-latest
  37. outputs:
  38. config_file: ${{ steps.pins.outputs.config_file }}
  39. susfs_commit: ${{ steps.pins.outputs.susfs_commit }}
  40. nomount_commit: ${{ steps.pins.outputs.nomount_commit }}
  41. classic_commit: ${{ steps.pins.outputs.classic_commit }}
  42. next_commit: ${{ steps.pins.outputs.next_commit }}
  43. resukisu_commit: ${{ steps.pins.outputs.resukisu_commit }}
  44. steps:
  45. - id: pins
  46. shell: bash
  47. run: |
  48. set -euo pipefail
  49. nomount_commit="c52936b229c25a4b0e41b6627f7d3bc5eaaaf2b5"
  50. classic_commit="da9abf498a77d438989fea0f5f4e348b9a540c07"
  51. next_commit="234f6e040fcbca18b16d2398e1aa225712ec99ad"
  52. resukisu_commit="3ef06b0fcb0960dc9563256fe26a58e892663387"
  53. case "${{ inputs.kernel_build_version }}" in
  54. android12-5.10) susfs_commit="3c14ad549f826b1f53878ec8c12253efebeed75a" ;;
  55. android13-5.10) susfs_commit="f81aaf10e9560282052bb61dd931315c2ca3e617" ;;
  56. android13-5.15) susfs_commit="ccb1918684b27644d17a6c842f57b60ae5966025" ;;
  57. android14-5.15) susfs_commit="0463ac089308014e8c22cc6a4558e0d6d2a53e08" ;;
  58. android14-6.1) susfs_commit="e287d59066380bf6de4396532d4a42edf4408701" ;;
  59. android15-6.6) susfs_commit="be7b7ef49a1e1b189c3abf00eacaa7ebdb4168c1" ;;
  60. android16-6.12) susfs_commit="f37930f374ef88de990d6abea0c67d0ea28c1edc" ;;
  61. *) echo "Unsupported GKI target." >&2; exit 2 ;;
  62. esac
  63. if [ "${{ inputs.commit_mode }}" = "latest" ]; then
  64. echo "Resolving latest branch tips..."
  65. susfs_commit="$(git ls-remote https://gitlab.com/simonpunk/susfs4ksu.git "refs/heads/gki-${{ inputs.kernel_build_version }}" | cut -f1)"
  66. nomount_commit="$(git ls-remote https://github.com/maxsteeel/nomount.git refs/heads/dev | cut -f1)"
  67. classic_commit="$(git ls-remote https://github.com/tiann/KernelSU.git refs/heads/main | cut -f1)"
  68. next_commit="$(git ls-remote https://github.com/KernelSU-Next/KernelSU-Next.git refs/heads/dev | cut -f1)"
  69. resukisu_commit="$(git ls-remote https://github.com/ReSukiSU/ReSukiSU.git refs/heads/main | cut -f1)"
  70. fi
  71. echo "config_file=.github/config/${{ inputs.kernel_build_version }}.json" >> "$GITHUB_OUTPUT"
  72. echo "susfs_commit=$susfs_commit" >> "$GITHUB_OUTPUT"
  73. echo "nomount_commit=$nomount_commit" >> "$GITHUB_OUTPUT"
  74. echo "classic_commit=$classic_commit" >> "$GITHUB_OUTPUT"
  75. echo "next_commit=$next_commit" >> "$GITHUB_OUTPUT"
  76. echo "resukisu_commit=$resukisu_commit" >> "$GITHUB_OUTPUT"
  77. build-nomount-module:
  78. needs: resolve-pins
  79. runs-on: ubuntu-latest
  80. steps:
  81. - uses: actions/checkout@v7
  82. - name: Build NoMount metamodule
  83. id: nomount-metamodule
  84. uses: ./.github/actions/nomount-metamodule
  85. with:
  86. commit: ${{ needs.resolve-pins.outputs.nomount_commit }}
  87. - name: Upload NoMount metamodule
  88. uses: actions/upload-artifact@v7
  89. with:
  90. name: NoMount-Metamodule
  91. path: ${{ steps.nomount-metamodule.outputs.module_dir }}
  92. if-no-files-found: error
  93. build:
  94. needs: [resolve-pins, build-nomount-module]
  95. strategy:
  96. fail-fast: false
  97. matrix:
  98. include:
  99. - flavor: classic
  100. commit: ${{ needs.resolve-pins.outputs.classic_commit }}
  101. variant: Classic-KernelSU
  102. - flavor: next
  103. commit: ${{ needs.resolve-pins.outputs.next_commit }}
  104. variant: KernelSU-Next
  105. - flavor: resukisu
  106. commit: ${{ needs.resolve-pins.outputs.resukisu_commit }}
  107. variant: ReSukiSU
  108. uses: ./.github/workflows/prepare.yml
  109. with:
  110. config_file: ${{ needs.resolve-pins.outputs.config_file }}
  111. feature_set: SUSFS+NTSync+Ptrace+Unicode+BPF
  112. susfs_commit: ${{ needs.resolve-pins.outputs.susfs_commit }}
  113. root_flavor: ${{ matrix.flavor }}
  114. root_commit: ${{ matrix.commit }}
  115. nomount_commit: ${{ needs.resolve-pins.outputs.nomount_commit }}
  116. preserve_abi: true
  117. build_bypass: false
  118. os_patch_level: ${{ inputs.os_patch_level }}
  119. variant: ${{ matrix.variant }}
  120. secrets: inherit