action.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. name: build kernel
  2. description: each samsung kernel has its own way of building the kernel, they are sorted here.
  3. inputs:
  4. branch:
  5. description: 'device kernel'
  6. required: true
  7. ccache:
  8. description: 'build with ccache'
  9. required: true
  10. build_type:
  11. description: 'make or bazel'
  12. required: true
  13. runs:
  14. using: composite
  15. steps:
  16. - name: start bazel build
  17. if: inputs.build_type == 'Bazel'
  18. shell: bash
  19. run: |
  20. set -e
  21. set -x
  22. cd "$CONFIG"
  23. echo "Building the kernel..."
  24. if [[ -d kernel_platform ]]; then
  25. cd kernel_platform
  26. tools/bazel build //common:kernel_aarch64
  27. elif [[ ${{ inputs.branch }} == SM-A055* ]]; then
  28. chmod +x build_kernel.sh
  29. ./build_kernel.sh || true
  30. elif [[ ${{ inputs.branch }} == SM-S926* ]]; then
  31. sed -i '/"modules"/d' projects/s5e9945/s5e9945.bzl
  32. sed -i '/"modules.builtin.modinfo"/d' projects/s5e9945/build.config.s5e9945.common
  33. sed -i '/"modules.builtin"/d' projects/s5e9945/build.config.s5e9945.common
  34. sed -i '/"modules.order"/d' projects/s5e9945/build.config.s5e9945.common
  35. tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
  36. #cd kernel
  37. #SYMBOL_LIST=android/abi_gki_aarch64_galaxy
  38. #echo "find_in_flight_task_in_one_workqueue" >> $SYMBOL_LIST
  39. #sed -i '
  40. #/"kernel_aarch64": {/,/},/ {
  41. #s/"kmi_symbol_list_strict_mode": True/"kmi_symbol_list_strict_mode": False/
  42. #s/"trim_nonlisted_kmi": True/"trim_nonlisted_kmi": False/
  43. #}
  44. #cd ..
  45. #tools/bazel build //kernel:kernel_aarch64
  46. elif [[ ${{ inputs.branch }} == SM-A556* ]]; then
  47. sed -i '/"modules"/d' projects/s5e8845/s5e8845.bzl
  48. sed -i '/"modules.builtin.modinfo"/d' projects/s5e8845/build.config.s5e8845.common
  49. sed -i '/"modules.builtin"/d' projects/s5e8845/build.config.s5e8845.common
  50. sed -i '/"modules.order"/d' projects/s5e8845/build.config.s5e8845.common
  51. tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user_dist
  52. #cd kernel
  53. #SYMBOL_LIST=android/abi_gki_aarch64_galaxy
  54. #echo "find_in_flight_task_in_one_workqueue" >> $SYMBOL_LIST
  55. #sed -i '
  56. #/"kernel_aarch64": {/,/},/ {
  57. #s/"kmi_symbol_list_strict_mode": True/"kmi_symbol_list_strict_mode": False/
  58. #s/"trim_nonlisted_kmi": True/"trim_nonlisted_kmi": False/
  59. #}
  60. #cd ..
  61. #tools/bazel build //kernel:kernel_aarch64
  62. fi
  63. - name: start make build
  64. if: inputs.build_type == 'make'
  65. shell: bash
  66. run: |
  67. set -e
  68. set -x
  69. cd "$CONFIG"
  70. if [[ -f build_kernel_GKI.sh ]]; then
  71. chmod +x build_kernel_GKI.sh
  72. ./build_kernel_GKI.sh || true
  73. elif [[ -f build_kernel.sh ]]; then
  74. sudo apt update
  75. sudo apt-get install -y libyaml-dev
  76. chmod +x build_kernel.sh
  77. ./build_kernel.sh || true
  78. fi
  79. #if [[ ${{ inputs.branch }} == SM-S928B* || "${{ inputs.branch }}" == "SM-S938B-Oneui7" || "${{ inputs.branch }}" == "SM-S931B-Oneui8" || "${{ inputs.branch }}" == "SM-F741B-Oneui8" || "${{ inputs.branch }}" == "SM-X710-Oneui6.1.1" ]]; then
  80. #cd kernel_platform
  81. #tools/bazel build //common:kernel_aarch64
  82. #chmod +x build_kernel_GKI.sh
  83. #./build_kernel_GKI.sh || true
  84. #elif [[ "${{ inputs.branch }}" == "SM-X916B" || "${{ inputs.branch }}" == "SM-F946N-Oneui7" || "${{ inputs.branch }}" == "SM-S916B-Oneui8" || "${{ inputs.branch }}" == "SM-S918B-Oneui8" || "${{ inputs.branch }}" == "SM-F946B-Oneui8" || "${{ inputs.branch }}" == "SM-S901E-Oneui8" || "${{ inputs.branch }}" == "SM-X800-Oneui8" || ${{ inputs.branch }} == SM-S911B* || "${{ inputs.branch }}" == "SM-M556B-Oneui8" ]]; then
  85. #cd kernel_platform
  86. #tools/bazel build //common:kernel_aarch64
  87. #chmod +x build_kernel_GKI.sh
  88. #./build_kernel_GKI.sh || true
  89. #elif [[ ${{ inputs.branch }} == SM-A546* || "${{ inputs.branch }}" == "SM-M146B-Oneui7-ADYJ2" || "${{ inputs.branch }}" == "SM-S908B-Oneui8-bitK" || ${{ inputs.branch }} == SM-A055* || "${{ inputs.branch }}" == "SM-X610-Oneui6.1.1-bit7" || "${{ inputs.branch }}" == "SM-A166B-Oneui7" ]]; then
  90. #sudo apt update
  91. #sudo apt-get install -y libyaml-dev
  92. #chmod +x build_kernel.sh
  93. #./build_kernel.sh || true
  94. #elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
  95. #chmod +x build_script.sh
  96. #touch ./kernel-6.6/abi_symbollist.raw
  97. #touch ./kernel-6.6/abi_symbollist
  98. #./build_script.sh || true
  99. #elif [[ "${{ inputs.branch }}" == "SM-A075M-Oneui7" ]]; then
  100. #chmod +x build_kernel.sh
  101. #./build_kernel.sh
  102. #fi