-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (75 loc) · 2.49 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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/*