action.yml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. kernel_version:
  14. description: 'version of kernel'
  15. required: true
  16. runs:
  17. using: composite
  18. steps:
  19. - name: start bazel build
  20. if: inputs.build_type == 'Bazel'
  21. shell: bash
  22. run: |
  23. set -e
  24. set -x
  25. cd "$CONFIG"
  26. echo "Building the kernel..."
  27. if [[ ${{ inputs.branch }} == SM-A055* || ${{ inputs.branch }} == SM-X926B* ]]; then
  28. chmod +x build_kernel.sh
  29. ./build_kernel.sh || true
  30. elif [[ ${{ inputs.branch }} == SM-S926* ]]; then
  31. #tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
  32. tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user
  33. elif [[ ${{ inputs.branch }} == SM-A556* ]]; then
  34. #tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user_dist
  35. tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user
  36. elif [[ ${{ inputs.branch }} == SM-S938B* ]]; then
  37. sed -i '/drivers\/net\/usb\/smsc75xx\.ko/d;/drivers\/net\/usb\/smsc95xx\.ko/d' kernel_platform/common/modules.bzl
  38. chmod +x build_kernel_GKI.sh
  39. ./build_kernel_GKI.sh || true
  40. elif [[ ${{ inputs.kernel_version }} == 6.* ]]; then
  41. chmod +x build_kernel_GKI.sh
  42. ./build_kernel_GKI.sh || true
  43. elif [[ -d kernel_platform ]]; then
  44. cd kernel_platform
  45. tools/bazel build //common:kernel_aarch64
  46. fi
  47. - name: start make build
  48. if: inputs.build_type == 'make'
  49. shell: bash
  50. run: |
  51. set -e
  52. set -x
  53. cd "$CONFIG"
  54. if [[ -f build_kernel_GKI.sh ]]; then
  55. chmod +x build_kernel_GKI.sh
  56. ./build_kernel_GKI.sh || true
  57. elif [[ -f build_kernel.sh ]]; then
  58. sudo apt update
  59. sudo apt-get install -y libyaml-dev
  60. chmod +x build_kernel.sh
  61. ./build_kernel.sh || true
  62. fi
  63. #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
  64. #cd kernel_platform
  65. #tools/bazel build //common:kernel_aarch64
  66. #chmod +x build_kernel_GKI.sh
  67. #./build_kernel_GKI.sh || true
  68. #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
  69. #cd kernel_platform
  70. #tools/bazel build //common:kernel_aarch64
  71. #chmod +x build_kernel_GKI.sh
  72. #./build_kernel_GKI.sh || true
  73. #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
  74. #sudo apt update
  75. #sudo apt-get install -y libyaml-dev
  76. #chmod +x build_kernel.sh
  77. #./build_kernel.sh || true
  78. #elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
  79. #chmod +x build_script.sh
  80. #touch ./kernel-6.6/abi_symbollist.raw
  81. #touch ./kernel-6.6/abi_symbollist
  82. #./build_script.sh || true
  83. #elif [[ "${{ inputs.branch }}" == "SM-A075M-Oneui7" ]]; then
  84. #chmod +x build_kernel.sh
  85. #./build_kernel.sh
  86. #fi