Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
echo "obj-y += kerneldriver/" >> common/drivers/Makefile

- name: Add module to GKI modules list
if: ${{ github.event.inputs.android_version > 12 }}
run: |
cd android-kernel
MODULE_NAME="drivers/kerneldriver/${{ github.event.inputs.driver_name }}"
Expand All @@ -74,7 +75,13 @@ jobs:
}
{ print }
' common/modules.bzl


- name: Prepare module list for legacy builds
if: ${{ github.event.inputs.android_version <= 12 }}
run: |
cd android-kernel
echo "drivers/kerneldriver/${{ github.event.inputs.driver_name }}" >> common/android/gki_aarch64_modules

- name: Increase stack frame size limit
run: |
cd android-kernel
Expand All @@ -89,19 +96,20 @@ jobs:
- name: Build kernel module
run: |
cd android-kernel

if [ ${{ github.event.inputs.android_version }} -lt 12 ]; then
echo "Using legacy build system for Android ${{ github.event.inputs.android_version }}"
build/build.sh
if [ ${{ github.event.inputs.android_version }} -le 12 ]; then
BUILD_CONFIG=common/build.config.gki.${{ github.event.inputs.target_arch }} LTO=thin build/build.sh -j32
OUTPUT_PATH="out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}/dist"
else
echo "Using Bazel build system for Android ${{ github.event.inputs.android_version }}"
tools/bazel run //common:kernel_${{ github.event.inputs.target_arch }}_dist
OUTPUT_PATH="out/kernel_${{ github.event.inputs.target_arch }}"
fi
continue-on-error: false
echo "OUTPUT_PATH=$OUTPUT_PATH" >> $GITHUB_ENV
continue-on-error: true

- name: Upload artifacts
uses: actions/upload-artifact@v4.6.2
with:
name: kernel-driver-${{ github.event.inputs.target_arch }}
path: |
android-kernel/out/kernel_${{ github.event.inputs.target_arch }}
android-kernel/${{ env.OUTPUT_PATH }}