Skip to content

Commit 810dbef

Browse files
restore mkosi tree cache
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
1 parent 2739803 commit 810dbef

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/main.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,28 @@ jobs:
166166
git clone --depth 1 --branch "$KERNEL_BRANCH" "https://github.com/${KERNEL_REPO}.git" kernel
167167
fi
168168
169-
- name: Ensure mkosi apt cache dirs exist
169+
- name: Ensure mkosi cache dirs exist
170170
run: |
171+
mkdir -p kernel/qbuild/mkosi.cache
171172
mkdir -p kernel/qbuild/mkosi.cache/{cache/apt,lib/apt}
172173
173-
# Cache only mkosi's apt caches (safe + small; avoids rootfs/ssh key permission issues)
174+
# Cache mkosi's tree caches (big win: avoids re-installing packages into a fresh rootfs tree)
175+
- name: Restore mkosi tree cache
176+
uses: actions/cache@v4
177+
with:
178+
path: |
179+
kernel/qbuild/mkosi.cache/ubuntu~noble~x86-64.cache
180+
kernel/qbuild/mkosi.cache/ubuntu~noble~x86-64.manifest
181+
kernel/qbuild/mkosi.cache/ubuntu~noble~x86-64~default-initrd.cache
182+
kernel/qbuild/mkosi.cache/ubuntu~noble~x86-64~default-initrd.manifest
183+
key: mkositree_${{ env.RUNNER_OS_LABEL }}_${{ env.ARCH_LABEL }}_${{ env.MKOSI_DISTRO }}_${{ env.MKOSI_RELEASE }}_${{ steps.weeks.outputs.now }}
184+
restore-keys: |
185+
mkositree_${{ env.RUNNER_OS_LABEL }}_${{ env.ARCH_LABEL }}_${{ env.MKOSI_DISTRO }}_${{ env.MKOSI_RELEASE }}_${{ steps.weeks.outputs.previous }}
186+
mkositree_${{ env.RUNNER_OS_LABEL }}_${{ env.ARCH_LABEL }}_${{ env.MKOSI_DISTRO }}_${{ env.MKOSI_RELEASE }}
187+
mkositree_${{ env.RUNNER_OS_LABEL }}_${{ env.ARCH_LABEL }}
188+
fail-on-cache-miss: false
189+
190+
# Cache only mkosi's apt caches (nice-to-have)
174191
- name: Restore mkosi apt cache
175192
uses: actions/cache@v4
176193
with:
@@ -184,6 +201,10 @@ jobs:
184201
mkosiapt_${{ env.RUNNER_OS_LABEL }}_${{ env.ARCH_LABEL }}
185202
fail-on-cache-miss: false
186203

204+
- name: Normalize mkosi cache permissions
205+
run: |
206+
sudo chmod -R a+rX kernel/qbuild/mkosi.cache || true
207+
187208
- name: show revisions under test
188209
run: |
189210
echo "Kernel repo: $KERNEL_REPO"

0 commit comments

Comments
 (0)