Skip to content

Commit bf06578

Browse files
authored
Rewrite Github workflows and create linux headers debpkg release (#13)
* 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
1 parent 8bfb67a commit bf06578

File tree

8 files changed

+534
-192
lines changed

8 files changed

+534
-192
lines changed

.github/actions/build-kernel/action.yml

+9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ runs:
3131
build-essential \
3232
bc \
3333
bison \
34+
debhelper \
3435
flex \
3536
libelf-dev \
3637
libssl-dev \
@@ -81,3 +82,11 @@ runs:
8182
ARCH: ${{ inputs.arch }}
8283
run: |
8384
make -j$(nproc) linux
85+
86+
- name: Build debpkg
87+
shell: bash
88+
env:
89+
ACK: ${{ inputs.ack }}
90+
ARCH: ${{ inputs.arch }}
91+
run: |
92+
make -j$(nproc) linux_bindebpkg
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Test All
2+
on:
3+
push:
4+
branches:
5+
- main
6+
path:
7+
- '*'
8+
- '!**/*.md'
9+
pull_request:
10+
workflow_call:
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
uses: ./.github/workflows/build.yml
16+
strategy:
17+
matrix:
18+
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}]
19+
arch: [arm64, x86_64]
20+
with:
21+
host-os: ubuntu-20.04
22+
ack: ${{ matrix.kernel.ack }}
23+
arch: ${{ matrix.arch }}
24+
version: ${{ matrix.kernel.version }}
25+
26+
rootfs:
27+
uses: ./.github/workflows/rootfs.yml
28+
strategy:
29+
matrix:
30+
arch: [arm64, x86_64]
31+
with:
32+
host-os: ubuntu-22.04
33+
arch: ${{ matrix.arch }}
34+
use-cached: true
35+
36+
build-and-test:
37+
uses: ./.github/workflows/build-and-test.yml
38+
needs: rootfs
39+
strategy:
40+
matrix:
41+
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}]
42+
arch: [arm64, x86_64]
43+
with:
44+
host-os: ubuntu-22.04
45+
ack: ${{ matrix.kernel.ack }}
46+
arch: ${{ matrix.arch }}
47+
version: ${{ matrix.kernel.version }}

.github/workflows/build-and-test.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build And Test
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
host-os:
6+
required: false
7+
type: choice
8+
options:
9+
- ubuntu-22.04
10+
- ubuntu-20.04
11+
default: ubuntu-22.04
12+
ack:
13+
required: true
14+
type: choice
15+
options:
16+
- '0'
17+
- '1'
18+
arch:
19+
required: true
20+
type: choice
21+
options:
22+
- x86_64
23+
- arm64
24+
version:
25+
required: true
26+
type: string
27+
use-cached:
28+
required: false
29+
type: boolean
30+
default: false
31+
workflow_call:
32+
inputs:
33+
host-os:
34+
required: false
35+
type: string
36+
default: ubuntu-22.04
37+
ack:
38+
required: true
39+
type: string
40+
arch:
41+
required: true
42+
type: string
43+
version:
44+
required: true
45+
type: string
46+
use-cached:
47+
required: false
48+
type: boolean
49+
default: false
50+
51+
jobs:
52+
build:
53+
uses: ./.github/workflows/build.yml
54+
with:
55+
host-os: ${{ inputs.host-os }}
56+
ack: ${{ inputs.ack }}
57+
arch: ${{ inputs.arch }}
58+
version: ${{ inputs.version }}
59+
use-cached: ${{ inputs.use-cached }}
60+
61+
test:
62+
uses: ./.github/workflows/test.yml
63+
needs: build
64+
with:
65+
ack: ${{ inputs.ack }}
66+
arch: ${{ inputs.arch }}
67+
version: ${{ inputs.version }}
68+
artifact-dir: ${{ needs.build.outputs.artifact-dir }}
69+
kernel-image-name: ${{ needs.build.outputs.kernel-image-name }}
70+
suffix: ${{ needs.build.outputs.suffix }}

0 commit comments

Comments
 (0)