Skip to content

Commit

Permalink
Caching etc
Browse files Browse the repository at this point in the history
  • Loading branch information
d-e-s-o committed Jul 31, 2024
1 parent a59f4a0 commit 68c78a2
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/build-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,25 @@ jobs:
name: Build Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
id: restore-cached-kernel
with:
path: data/build/arch/x86/boot/bzImage
key: linux-kernel
- if: steps.restore-cached-kernel.outputs.cache-hit != 'true'
uses: actions/checkout@v4
- if: steps.restore-cached-kernel.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: 'torvalds/linux'
ref: v6.6
fetch-depth: 1
path: linux/
- name: Install required tools
- if: steps.restore-cached-kernel.outputs.cache-hit != 'true'
name: Install required tools
run: sudo apt-get install -y libelf-dev
- name: Build kernel
- if: steps.restore-cached-kernel.outputs.cache-hit != 'true'
name: Build kernel
run: |
config=$(readlink --canonicalize-existing data/config)
build=$(pwd)/build/
Expand All @@ -33,7 +42,13 @@ jobs:
echo "::endgroup::"
make O="${KBUILD_OUTPUT}" -j8
- if: steps.restore-cached-kernel.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: data/build/arch/x86/boot/bzImage
key: linux-kernel
- uses: actions/upload-artifact@v4
with:
name: kernel
path: data/build/arch/x86_64/boot/bzImage
name: linux-kernel-image
if-no-files-found: error
path: data/build/arch/x86/boot/bzImage

0 comments on commit 68c78a2

Please sign in to comment.