File tree 1 file changed +21
-6
lines changed
1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change 8
8
name : Build Linux
9
9
runs-on : ubuntu-latest
10
10
steps :
11
- - uses : actions/checkout@v4
12
- - uses : actions/checkout@v4
11
+ - uses : actions/cache/restore@v4
12
+ id : restore-cached-kernel
13
+ with :
14
+ path : data/build/arch/x86/boot/bzImage
15
+ key : linux-kernel
16
+ - if : steps.restore-cached-kernel.outputs.cache-hit != 'true'
17
+ uses : actions/checkout@v4
18
+ - if : steps.restore-cached-kernel.outputs.cache-hit != 'true'
19
+ uses : actions/checkout@v4
13
20
with :
14
21
repository : ' torvalds/linux'
15
22
ref : v6.6
16
23
fetch-depth : 1
17
24
path : linux/
18
- - name : Install required tools
25
+ - if : steps.restore-cached-kernel.outputs.cache-hit != 'true'
26
+ name : Install required tools
19
27
run : sudo apt-get install -y libelf-dev
20
- - name : Build kernel
28
+ - if : steps.restore-cached-kernel.outputs.cache-hit != 'true'
29
+ name : Build kernel
21
30
run : |
22
31
config=$(readlink --canonicalize-existing data/config)
23
32
build=$(pwd)/build/
33
42
echo "::endgroup::"
34
43
35
44
make O="${KBUILD_OUTPUT}" -j8
45
+ - if : steps.restore-cached-kernel.outputs.cache-hit != 'true'
46
+ uses : actions/cache/save@v4
47
+ with :
48
+ path : data/build/arch/x86/boot/bzImage
49
+ key : linux-kernel
36
50
- uses : actions/upload-artifact@v4
37
51
with :
38
- name : kernel
39
- path : data/build/arch/x86_64/boot/bzImage
52
+ name : linux-kernel-image
53
+ if-no-files-found : error
54
+ path : data/build/arch/x86/boot/bzImage
You can’t perform that action at this time.
0 commit comments