action.yml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: build kernel
  2. description: each samsung kernel has its own way of building the kernel, they are sorted here.
  3. inputs:
  4. ccache:
  5. description: 'build with ccache'
  6. required: true
  7. build_type:
  8. description: 'make or bazel'
  9. required: true
  10. runs:
  11. using: composite
  12. steps:
  13. - name: start bazel build
  14. if: inputs.build_type == 'Bazel'
  15. shell: bash
  16. run: |
  17. set -e
  18. set -x
  19. cd "$CONFIG"
  20. echo "Building the kernel..."
  21. if [[ $BRANCH == SM-A055* || $BRANCH == SM-X926B* ]]; then
  22. chmod +x build_kernel.sh
  23. LTO="$LTO" ./build_kernel.sh || true
  24. elif [[ $BRANCH == SM-S926* ]]; then
  25. #tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
  26. tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I --lto="$LTO" //projects/s5e9945:s5e9945_user
  27. elif [[ $BRANCH == SM-A556* ]]; then
  28. #tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user_dist
  29. tools/bazel build --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I --lto="$LTO" //projects/s5e8845:s5e8845_user
  30. elif [[ $BRANCH == SM-S938B* ]]; then
  31. sed -i '/drivers\/net\/usb\/smsc75xx\.ko/d;/drivers\/net\/usb\/smsc95xx\.ko/d' kernel_platform/common/modules.bzl
  32. chmod +x build_kernel_GKI.sh
  33. LTO="$LTO" ./build_kernel_GKI.sh || true
  34. elif [[ $KERNEL_VER == 6.* ]]; then
  35. chmod +x build_kernel_GKI.sh
  36. LTO="$LTO" ./build_kernel_GKI.sh || true
  37. elif [[ -d kernel_platform ]]; then
  38. cd kernel_platform
  39. tools/bazel build --lto="$LTO" //common:kernel_aarch64
  40. fi
  41. - name: start make build
  42. if: inputs.build_type == 'make'
  43. shell: bash
  44. run: |
  45. set -e
  46. set -x
  47. cd "$CONFIG"
  48. if [[ -f build_kernel_GKI.sh ]]; then
  49. chmod +x build_kernel_GKI.sh
  50. LTO="$LTO" ./build_kernel_GKI.sh || true
  51. elif [[ -f build_kernel.sh ]]; then
  52. sudo apt update
  53. sudo apt-get install -y libyaml-dev
  54. chmod +x build_kernel.sh
  55. LTO="$LTO" ./build_kernel.sh || true
  56. fi
  57. #if [[ $BRANCH == SM-S928B* || "$BRANCH" == "SM-S938B-Oneui7" || "$BRANCH" == "SM-S931B-Oneui8" || "$BRANCH" == "SM-F741B-Oneui8" || "$BRANCH" == "SM-X710-Oneui6.1.1" ]]; then
  58. #cd kernel_platform
  59. #tools/bazel build //common:kernel_aarch64
  60. #chmod +x build_kernel_GKI.sh
  61. #./build_kernel_GKI.sh || true
  62. #elif [[ "$BRANCH" == "SM-X916B" || "$BRANCH" == "SM-F946N-Oneui7" || "$BRANCH" == "SM-S916B-Oneui8" || "$BRANCH" == "SM-S918B-Oneui8" || "$BRANCH" == "SM-F946B-Oneui8" || "$BRANCH" == "SM-S901E-Oneui8" || "$BRANCH" == "SM-X800-Oneui8" || $BRANCH == SM-S911B* || "$BRANCH" == "SM-M556B-Oneui8" ]]; then
  63. #cd kernel_platform
  64. #tools/bazel build //common:kernel_aarch64
  65. #chmod +x build_kernel_GKI.sh
  66. #./build_kernel_GKI.sh || true
  67. #elif [[ $BRANCH == SM-A546* || "$BRANCH" == "SM-M146B-Oneui7-ADYJ2" || "$BRANCH" == "SM-S908B-Oneui8-bitK" || $BRANCH == SM-A055* || "$BRANCH" == "SM-X610-Oneui6.1.1-bit7" || "$BRANCH" == "SM-A166B-Oneui7" ]]; then
  68. #sudo apt update
  69. #sudo apt-get install -y libyaml-dev
  70. #chmod +x build_kernel.sh
  71. #./build_kernel.sh || true
  72. #elif [[ "$BRANCH" == "SM-A566B" ]]; then
  73. #chmod +x build_script.sh
  74. #touch ./kernel-6.6/abi_symbollist.raw
  75. #touch ./kernel-6.6/abi_symbollist
  76. #./build_script.sh || true
  77. #elif [[ "$BRANCH" == "SM-A075M-Oneui7" ]]; then
  78. #chmod +x build_kernel.sh
  79. #./build_kernel.sh
  80. #fi