Skip to content

Commit 6df8d7f

Browse files
perf(ci): cache XanMod kernel source between runs
Adds actions/cache on kernel/src keyed by branch + year-week, matching the pattern already used in xanmod-unified-kernel. Eliminates a ~200-400 MB GitLab clone on every CI run; cache restores in ~10-30s instead.
1 parent d9678d2 commit 6df8d7f

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
```yaml
21
name: Build
32

43
on:
@@ -77,6 +76,20 @@ jobs:
7776
libncurses-dev dwarves pahole curl git jq \
7877
shellcheck
7978
79+
- name: Compute kernel cache key
80+
run: echo "YEAR_WEEK=$(date -u '+%Y-W%V')" >> "$GITHUB_ENV"
81+
82+
- name: Restore kernel source cache
83+
id: cache-kernel
84+
uses: actions/cache@v4
85+
with:
86+
path: kernel/src
87+
# Keyed on branch + year-week so the cache refreshes weekly
88+
# to pick up new upstream commits.
89+
key: xanmod-kernel-${{ matrix.branch }}-${{ env.YEAR_WEEK }}
90+
restore-keys: |
91+
xanmod-kernel-${{ matrix.branch }}-
92+
8093
- name: Fetch XanMod source
8194
run: bash kernel/fetch.sh ${{ matrix.branch }}
8295
env:
@@ -161,4 +174,3 @@ jobs:
161174
name: "LiqXanMod build ${{ github.run_number }}"
162175
files: artifacts/**/*
163176
generate_release_notes: true
164-
```

0 commit comments

Comments
 (0)