Skip to content

GKI Kernel Module Build #6

GKI Kernel Module Build

GKI Kernel Module Build #6

Workflow file for this run

name: GKI Kernel Module Build
on:
workflow_dispatch:
jobs:
build:
name: Build Kernel for ${{ matrix.tag }}
runs-on: ubuntu-latest
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
strategy:
matrix:
tag:
- android12-5.10
- android13-5.10
- android13-5.15
- android14-5.15
- android14-6.1
- android15-6.6
- android16-6.12
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 8192
temp-reserve-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- name: Install Build Tools
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: bc bison build-essential flex libelf-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu gzip ccache
version: 1.0
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Android Kernel Source Code
run: |
sudo apt-get install -y repo
mkdir android-kernel && cd android-kernel
repo init -u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }} --repo-rev=v2.16
repo sync -c -j$(nproc) --no-tags
df -h
- name: Setup CCache
uses: actions/cache@v4
with:
path: ~/.ccache
key: gki-kernel-${{ matrix.tag }}-cache
- name: Build Kernel
working-directory: android-kernel
run: |
if [ -e build/build.sh ]; then
LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh CC="/usr/bin/ccache clang"
else
tools/bazel run --disk_cache=/home/runner/.cache/bazel --config=fast --lto=thin //common:kernel_aarch64_dist -- --dist_dir=dist
fi
- name: Prepare Artifacts
run: |
OUTDIR=android-kernel/out/${{ matrix.tag }}/dist
if [ ! -e $OUTDIR ]; then
OUTDIR=android-kernel/dist
fi
mkdir output
ls -al $OUTDIR/
cp $OUTDIR/Image ./output/
cp $OUTDIR/Image.lz4 ./output/
- name: Upload Kernel Artifacts
uses: actions/upload-artifact@v4
with:
name: Image-${{ matrix.tag }}
path: ./output/*