Skip to content

Build kernel in CI

Build kernel in CI #11

Workflow file for this run

name: build
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
filter: blob:none
- name: checkout submodule ref
run: git submodule update --init --filter blob:none agnos-kernel-sdm845
- id: kernel-submodule
run: echo "ref=$(git ls-tree HEAD | awk '$4 == "agnos-kernel-sdm845"' | awk '{print $3}')" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v5
id: restore-cache
with:
key: kernel-${{ steps.kernel-submodule.outputs.ref }}
path: agnos-kernel-sdm845/out
restore-keys: |
kernel-
- run: ./build_kernel.sh
- uses: actions/cache/save@v5
if: always()
with:
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
path: agnos-kernel-sdm845/out
- uses: actions/upload-artifact@v4
with:
name: boot.img
path: output/boot.img
- run: ./build_system.sh
- uses: actions/upload-artifact@v4
with:
name: system.img
path: output/system.img