ci: Add android 15 avd kernel (#1414)

This commit is contained in:
weishu
2024-03-04 19:12:48 +08:00
committed by GitHub
parent 1d7d406745
commit 170cd3f912
5 changed files with 84 additions and 33 deletions

View File

@@ -9,6 +9,11 @@ on:
description: >
With SUBLEVEL of kernel,
for example: android12-5.10.66
arch:
required: true
type: string
description: >
Build arch: aarch64/x86_64
debug:
required: false
type: boolean
@@ -106,7 +111,7 @@ jobs:
if: inputs.use_cache == true
uses: hendrikmuhs/ccache-action@v1.2
with:
key: gki-kernel-x86_64-avd-${{ inputs.version_name }}
key: gki-kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}
max-size: 2G
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
@@ -126,15 +131,15 @@ jobs:
export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }}
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
fi
tools/bazel run --disk_cache=/home/runner/.cache/bazel --config=fast --config=stamp --lto=thin //common-modules/virtual-device:virtual_device_x86_64_dist -- --dist_dir=dist
NAME=kernel-x86_64-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
tools/bazel run --disk_cache=/home/runner/.cache/bazel --config=fast --config=stamp --lto=thin //common-modules/virtual-device:virtual_device_${{ inputs.arch }}_dist -- --dist_dir=dist
NAME=kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
mv dist/bzImage $NAME
echo "file_path=android-kernel/$NAME" >> $GITHUB_ENV
- name: Upload Kernel
uses: actions/upload-artifact@v4
with:
name: kernel-x86_64-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
name: kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
path: "${{ env.file_path }}"
- name: Bot session cache
@@ -155,7 +160,7 @@ jobs:
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
TITLE=kernel-x86_64-avd-${{ inputs.version_name }}
TITLE=kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}
echo "[+] title: $TITLE"
export TITLE
export VERSION="${{ env.kernelsu_version }}"
@@ -165,4 +170,3 @@ jobs:
pip3 install telethon==1.31.1
python3 "$GITHUB_WORKSPACE/KernelSU/scripts/ksubot.py" "${{ env.file_path }}"
fi

View File

@@ -1,27 +0,0 @@
name: Build Kernel - Android 14 AVD
on:
push:
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-a14.yml"
- ".github/workflows/avd-kernel.yml"
- ".github/workflows/manifests/android-14-avd.xml"
- "kernel/**"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/build-kernel-a14-avd.yml"
- ".github/workflows/avd-kernel.yml"
- ".github/workflows/manifests/android-14-avd.xml"
- "kernel/**"
workflow_call:
workflow_dispatch:
jobs:
build-kernel:
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
uses: ./.github/workflows/avd-kernel.yml
secrets: inherit
with:
version_name: android-14
manifest_name: android-14-avd.xml
debug: true

37
.github/workflows/build-kernel-avd.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Build Kernel - Android 14 AVD
on:
push:
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-avd.yml"
- ".github/workflows/avd-kernel.yml"
- ".github/workflows/manifests/*xml"
- "kernel/**"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/build-kernel-avd.yml"
- ".github/workflows/avd-kernel.yml"
- ".github/workflows/manifests/*.xml"
- "kernel/**"
workflow_call:
workflow_dispatch:
jobs:
build-kernel:
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
uses: ./.github/workflows/avd-kernel.yml
secrets: inherit
strategy:
matrix:
include:
- version: "android-14-avd_x86_64"
manifest: "android-14-avd_x86_64.xml"
arch: "x86_64"
- version: "android-15-avd_aarch64"
manifest: "android-15-avd_aarch64.xml"
arch: "aarch64"
with:
version_name: ${{ matrix.version }}
manifest_name: ${{ matrix.manifest }}
arch: ${{ matrix.arch }}
debug: true