Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 68c78a2

Browse files
committedJul 31, 2024··
Caching etc
1 parent a59f4a0 commit 68c78a2

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed
 

‎.github/workflows/build-kernel.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,25 @@ jobs:
88
name: Build Linux
99
runs-on: ubuntu-latest
1010
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
1320
with:
1421
repository: 'torvalds/linux'
1522
ref: v6.6
1623
fetch-depth: 1
1724
path: linux/
18-
- name: Install required tools
25+
- if: steps.restore-cached-kernel.outputs.cache-hit != 'true'
26+
name: Install required tools
1927
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
2130
run: |
2231
config=$(readlink --canonicalize-existing data/config)
2332
build=$(pwd)/build/
@@ -33,7 +42,13 @@ jobs:
3342
echo "::endgroup::"
3443
3544
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
3650
- uses: actions/upload-artifact@v4
3751
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

0 commit comments

Comments
 (0)
Please sign in to comment.