This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
173 lines (149 loc) · 4.86 KB
/
build-kernels.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Build kernel
on:
push:
branches: [ "main" ]
schedule:
- cron: "10 0 * * *" # run at the start of every day after configs are updated
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-kernel-mainline:
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 5120
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt update && sudo apt install -y git build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison binutils dracut
- name: Building Kernel
run: bash build.sh mainline
- name: Uploading as artifact
uses: actions/upload-artifact@v3
with:
name: mainline-kernel
retention-days: 1
path: |
bzImage
modules.tar.xz
headers.tar.xz
initramfs.cpio.xz
build-kernel-chromeos:
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 5120
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt update && sudo apt install -y git build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison binutils dracut
- name: Building Kernel
run: bash build.sh chromeos
- name: Uploading as artifact
uses: actions/upload-artifact@v3
with:
name: chromeos-kernel
retention-days: 1
path: |
bzImage
modules.tar.xz
headers.tar.xz
initramfs.cpio.xz
build-kernel-noinitramfs:
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 5120
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt update && sudo apt install -y git build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison binutils dracut
- name: Building Kernel
run: bash build.sh noinitramfs
- name: Uploading as artifact
uses: actions/upload-artifact@v3
with:
name: noinitramfs-kernel
retention-days: 1
path: |
bzImage
modules.tar.xz
headers.tar.xz
initramfs.cpio.xz
create-release:
runs-on: ubuntu-latest
needs: [ build-kernel-mainline, build-kernel-chromeos, build-kernel-noinitramfs ]
steps:
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Deleting old dev release
uses: cb80/delrel@latest
with:
tag: dev-build
- name: Generating release tag and setting prerelease + name
id: tag
run: |
message=$(git log -1 --pretty=format:"%s")
echo "commit_message=$message" >> $GITHUB_OUTPUT
- name: creating tmp folder
run: mkdir /tmp/artifacts
- name: Downloading kernel artifacts
uses: actions/download-artifact@v3
with:
path: /tmp/artifacts/
- name: Renaming kernel artifacts
run: |
# append kernel type to downloaded artifacts
cd "/tmp/artifacts/mainline-kernel"
for file in *; do
if [ -f "$file" ]; then
mv "$file" "mainline-$file"
fi
done
cd "/tmp/artifacts/chromeos-kernel"
for file in *; do
if [ -f "$file" ]; then
mv "$file" "chromeos-$file"
fi
done
cd "/tmp/artifacts/noinitramfs-kernel"
for file in *; do
if [ -f "$file" ]; then
mv "$file" "noinitramfs-$file"
fi
done
- name: Publishing new release
uses: softprops/action-gh-release@v1
with:
tag_name: dev-build
name: Kernel builds - ${{ steps.tag.outputs.commit_message }}
prerelease: true
body: |
Triggered by ${{ github.sha }} at ${{ github.event.repository.updated_at }}
files: |
/tmp/artifacts/*-kernel/*-bzImage
/tmp/artifacts/*-kernel/*-modules.tar.xz
/tmp/artifacts/*-kernel/*-headers.tar.xz
/tmp/artifacts/*-kernel/*-initramfs.cpio.xz