Просмотр исходного кода

Add composite action for building Samsung kernels

This action defines a composite workflow for building different Samsung kernels based on the specified branch input. It includes various build scripts and conditions for different kernel models.
jimsterino98 4 месяцев назад
Родитель
Сommit
e42ebac1b3
1 измененных файлов с 43 добавлено и 0 удалено
  1. 43 0
      .github/actions/build/action.yml

+ 43 - 0
.github/actions/build/action.yml

@@ -0,0 +1,43 @@
+name: build kernel
+description: each samsung kernel has its own way of building the kernel, they are sorted here.
+inputs:
+ branch:
+  description: 'device kernel'
+  required: true
+
+runs:
+ using: composite
+ steps:
+  - name: start kernel build
+    shell: bash
+    run: |
+     set -e
+     set -x
+     cd "$CONFIG"
+     echo "Building the kernel..."
+     if [[ ${{ inputs.branch }} == SM-S928B* || "${{ inputs.branch }}" == "SM-S938B-Oneui7" || "${{ inputs.branch }}" == "SM-S931B-Oneui8" || "${{ inputs.branch }}" == "SM-F741B-Oneui8" ]]; then
+       chmod +x build_kernel_GKI.sh
+       ./build_kernel_GKI.sh || true
+     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-Oneui8-bit8" || "${{ inputs.branch }}" == "SM-M556B-Oneui8" ]]; then
+       chmod +x build_kernel_GKI.sh
+       #LTO=thin ./build_kernel_GKI.sh || true
+       ./build_kernel_GKI.sh || true
+     elif [[ ${{ inputs.branch }} == SM-A546* || "${{ inputs.branch }}" == "SM-M146B-Oneui7-ADYJ2" || "${{ inputs.branch }}" == "SM-S908B-Oneui8-bitK" ]]; then
+       sudo apt update
+       sudo apt-get install -y libyaml-dev
+       chmod +x build_kernel.sh
+       #LTO=thin ./build_kernel.sh || true
+       ./build_kernel.sh || true
+     elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
+       chmod +x build_script.sh
+       touch ./kernel-6.6/abi_symbollist.raw
+       touch ./kernel-6.6/abi_symbollist
+       ./build_script.sh || true
+     elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" ]]; then
+       tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
+     elif [[ ${{ inputs.branch }} == SM-A556* ]]; then
+       tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user_dist
+     elif [[ ${{ inputs.branch }} == SM-A055* ]]; then
+       chmod +x build_kernel.sh
+       ./build_kernel.sh
+     fi