Files
agnos-builder/.github/workflows/build.yaml
T
Cameron Clough b5f39a4b62 Build kernel in CI (#231)
* build workflow

* submodule example

* just agnos-kernel-sdm845

* filter

* ubuntu20

* unecessary

* cancel in progress

* upload

* try ccache...

* test ccache

* cache out dir

* v4

* cleanup

* ccache again...

* skip system for now

* try this

* allow override CC

* improve cache hit

* fix

* test if this matters

* don't append timestamp

* try again

* empty

* doesn't help

* test

* Revert "test"

This reverts commit e3a7db8bd5.

* test

* Revert "test"

This reverts commit 42e9ebaaac.

* build system again

* more space

* longer timeout...

* CI froze

* use namespace labs remote builder

* permissions

* try again

* nscloud

* permissions

* ubuntu 20

* wip

* upload kernel modules

* build_kernel arch fix

Co-authored-by: Andrei Radulescu <andi.radulescu@gmail.com>

* lfs clone

* .

* namespace doesn't support git filter

* no perms

* fix typo

* namespace ubuntu2004 doesn't have python2...

* update name

* oh

* no wget

* fix arm64 check

* mount container

Co-authored-by: Andrei Radulescu <andi.radulescu@gmail.com>

* missing deps

* switch to pyenv-action which caches

* update nscloud-checkout-action

* reduce timeout

* run network stuff in container

* test cache

* cache kernel: does this work?

* try again

* test kernel cache

* use github cache action

* test kernel cache

* try actions/checkout

* kernel: cache intermediate build outputs

* name

* test cache 1

* don't skip kernel build

* always set arch to arm64

* just kernel

* fix that

---------

Co-authored-by: Andrei Radulescu <andi.radulescu@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-07-14 11:00:59 -07:00

71 lines
1.8 KiB
YAML

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
permissions:
contents: read
jobs:
build:
name: build kernel #and system
runs-on: namespace-profile-arm64-8x16-2004-caching
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: get kernel submodule ref
id: kernel-submodule
run: echo "ref=$(git ls-tree HEAD | awk '$4 == "agnos-kernel-sdm845"' | awk '{print $3}')" >> "$GITHUB_OUTPUT"
- name: Checkout agnos-kernel-sdm845
uses: actions/checkout@v4
with:
repository: commaai/agnos-kernel-sdm845
ref: ${{ steps.kernel-submodule.outputs.ref }}
path: agnos-kernel-sdm845
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y bc img2simg
- name: Install python2
uses: gabrielfalcao/pyenv-action@2f49ca7587f9d0663d13f1147b78d3361417eaf7
with:
default: '2.7.18'
- name: Cache kernel build
uses: actions/cache@v4
id: cache-kernel
with:
key: kernel-${{ steps.kernel-submodule.outputs.ref }}
path: |
agnos-kernel-sdm845/out
restore-keys: kernel-
- name: Build kernel
run: ./build_kernel.sh
- uses: actions/upload-artifact@v4
with:
name: boot.img
path: output/boot.img
- uses: actions/upload-artifact@v4
with:
name: kernel-modules
path: output/*.ko
#- run: ./build_system.sh
#- uses: actions/upload-artifact@v4
# with:
# name: system.img
# path: output/system.img