-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (83 loc) · 2.89 KB
/
build-kernel.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
name: build-kernel
on:
workflow_dispatch:
permissions:
packages: write
contents: write
id-token: write
jobs:
amd64:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
version:
- '5.10'
container:
image: ghcr.io/konradasb/docker-kernel-build:e89c0048a44398df9e63081c20c2ffbdea06dae6
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Google Cloud Platform
uses: google-github-actions/auth@v1
with:
workload_identity_provider: projects/37500578404/locations/global/workloadIdentityPools/github/providers/hostinger
service_account: [email protected]
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: fireactions
- name: Clone Linux kernel
run: |
git clone --branch v${{ matrix.version }} --single-branch --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
- name: Build Linux kernel
run: |
cd linux
cp ../kernels/kernel-x86_64-${{ matrix.version }}.config .config
make olddefconfig
make ARCH=x86_64 -j$(nproc) vmlinux
mv vmlinux ../vmlinux
- name: Upload Linux kernel to GCS
uses: google-github-actions/upload-cloud-storage@v1
with:
destination: fireactions/kernels/amd64/${{ matrix.version }}
process_gcloudignore: false
path: vmlinux
arm64:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
version:
- '5.10'
container:
image: ghcr.io/konradasb/docker-kernel-build:e89c0048a44398df9e63081c20c2ffbdea06dae6
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Google Cloud Platform
uses: google-github-actions/auth@v1
with:
workload_identity_provider: projects/37500578404/locations/global/workloadIdentityPools/github/providers/hostinger
service_account: [email protected]
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: fireactions
- name: Clone Linux kernel
run: |
git clone --branch v${{ matrix.version }} --single-branch --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
- name: Build Linux kernel
run: |
cd linux
cp ../kernels/kernel-arm64-${{ matrix.version }}.config .config
make olddefconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) Image
mv arch/arm64/boot/Image ../vmlinux
- name: Upload Linux kernel to GCS
uses: google-github-actions/upload-cloud-storage@v1
with:
destination: fireactions/kernels/arm64/${{ matrix.version }}
process_gcloudignore: false
path: vmlinux