Skip to content

Commit

Permalink
Rewrite Github workflows and create linux headers debpkg release (#13)
Browse files Browse the repository at this point in the history
* Rewrite Github workflows and create linux headers debpkg release

* Use cache in rootfs workflow only if use-cached is set

* Use cache in build workflow only if use-cached is true
  • Loading branch information
gsingh93 authored Apr 8, 2024
1 parent 8bfb67a commit bf06578
Show file tree
Hide file tree
Showing 8 changed files with 534 additions and 192 deletions.
9 changes: 9 additions & 0 deletions .github/actions/build-kernel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ runs:
build-essential \
bc \
bison \
debhelper \
flex \
libelf-dev \
libssl-dev \
Expand Down Expand Up @@ -81,3 +82,11 @@ runs:
ARCH: ${{ inputs.arch }}
run: |
make -j$(nproc) linux
- name: Build debpkg
shell: bash
env:
ACK: ${{ inputs.ack }}
ARCH: ${{ inputs.arch }}
run: |
make -j$(nproc) linux_bindebpkg
47 changes: 47 additions & 0 deletions .github/workflows/build-and-test-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Test All
on:
push:
branches:
- main
path:
- '*'
- '!**/*.md'
pull_request:
workflow_call:
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/build.yml
strategy:
matrix:
kernel: [{ack: 0, version: 5.10.y}, {ack: 0, version: 5.15.y}, {ack: 0, version: 6.1.y}, {ack: 0, version: 6.6.y}, {ack: 1, version: android13-5.10-lts}, {ack: 1, version: android14-5.15-lts}]
arch: [arm64, x86_64]
with:
host-os: ubuntu-20.04
ack: ${{ matrix.kernel.ack }}
arch: ${{ matrix.arch }}
version: ${{ matrix.kernel.version }}

rootfs:
uses: ./.github/workflows/rootfs.yml
strategy:
matrix:
arch: [arm64, x86_64]
with:
host-os: ubuntu-22.04
arch: ${{ matrix.arch }}
use-cached: true

build-and-test:
uses: ./.github/workflows/build-and-test.yml
needs: rootfs
strategy:
matrix:
kernel: [{ack: 0, version: 5.10.y}, {ack: 0, version: 5.15.y}, {ack: 0, version: 6.1.y}, {ack: 0, version: 6.6.y}, {ack: 1, version: android13-5.10-lts}, {ack: 1, version: android14-5.15-lts}]
arch: [arm64, x86_64]
with:
host-os: ubuntu-22.04
ack: ${{ matrix.kernel.ack }}
arch: ${{ matrix.arch }}
version: ${{ matrix.kernel.version }}
70 changes: 70 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build And Test
on:
workflow_dispatch:
inputs:
host-os:
required: false
type: choice
options:
- ubuntu-22.04
- ubuntu-20.04
default: ubuntu-22.04
ack:
required: true
type: choice
options:
- '0'
- '1'
arch:
required: true
type: choice
options:
- x86_64
- arm64
version:
required: true
type: string
use-cached:
required: false
type: boolean
default: false
workflow_call:
inputs:
host-os:
required: false
type: string
default: ubuntu-22.04
ack:
required: true
type: string
arch:
required: true
type: string
version:
required: true
type: string
use-cached:
required: false
type: boolean
default: false

jobs:
build:
uses: ./.github/workflows/build.yml
with:
host-os: ${{ inputs.host-os }}
ack: ${{ inputs.ack }}
arch: ${{ inputs.arch }}
version: ${{ inputs.version }}
use-cached: ${{ inputs.use-cached }}

test:
uses: ./.github/workflows/test.yml
needs: build
with:
ack: ${{ inputs.ack }}
arch: ${{ inputs.arch }}
version: ${{ inputs.version }}
artifact-dir: ${{ needs.build.outputs.artifact-dir }}
kernel-image-name: ${{ needs.build.outputs.kernel-image-name }}
suffix: ${{ needs.build.outputs.suffix }}
Loading

0 comments on commit bf06578

Please sign in to comment.