Skip to content

Commit

Permalink
Create build-kernel.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWildJames authored Jan 9, 2025
1 parent 8a04254 commit 37738f0
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-kernel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build Kernel

on:
workflow_dispatch: # Allows manual triggering of the workflow

jobs:
setup-prerequisites:
runs-on: ubuntu-latest

steps:
# Step 1: Download prebuilt toolchain
- name: Download prebuilt toolchain
run: |
AOSP_MIRROR=https://android.googlesource.com
BRANCH=main-kernel-build-2024
# Clone necessary prebuilt tools
git clone $AOSP_MIRROR/platform/prebuilts/build-tools -b $BRANCH --depth 1 build-tools
git clone $AOSP_MIRROR/kernel/prebuilts/build-tools -b $BRANCH --depth 1 kernel-build-tools
git clone $AOSP_MIRROR/platform/system/tools/mkbootimg -b $BRANCH --depth 1 mkbootimg
# Add tools to PATH
echo "$GITHUB_WORKSPACE/kernel-build-tools/linux-x86/bin" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE/build-tools/path/linux-x86" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE/mkbootimg" >> $GITHUB_PATH
# Step 2: Download and set up 'repo' tool
- name: Download and set up 'repo' tool
run: |
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+rx repo
mv repo $GITHUB_WORKSPACE/repo
# Add 'repo' tool to PATH
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
# Step 3: Clone kernel build scripts
- name: Clone kernel build scripts
run: |
git clone https://github.com/TheWildJames/kernel_build_scripts.git
# Step 4: Run the kernel build script
- name: Run kernel build script
run: |
chmod +x kernel_build_scripts/GKI/aio_gki_build_kernel_release.sh
kernel_build_scripts/GKI/aio_gki_build_kernel_release.sh

0 comments on commit 37738f0

Please sign in to comment.