@@ -112,12 +112,12 @@ jobs:
112112 working-directory : examples/${{ matrix.example }}
113113 run : |
114114 kraft-hyperlight --no-prompt build --plat hyperlight --arch x86_64 || true
115- # Fallback: kraft's source-resolution path is flaky ( it sometimes
116- # probes + finds the repo but skips the pull and leaves
117- # .unikraft/unikraft empty — see memory/feedback_kraft_clean_rebuild).
118- # Manually clone the components and rebuild with --no-fetch/--no-update .
119- if [ ! -d " .unikraft/unikraft" ] || [ -z "$(ls -A .unikraft/unikraft 2 >/dev/null)" ] ; then
120- echo "::warning::kraft didn't clone unikraft sources ; cloning manually"
115+ # Fallback: kraft's source-resolution is flaky — it can partially
116+ # clone (e.g. unikraft but not libelf) or leave dirs empty. Check
117+ # for the actual kernel output; if missing, nuke everything and
118+ # clone + build from scratch .
119+ if ! ls .unikraft/build/*_hyperlight-x86_64 >/dev/null 2>&1 ; then
120+ echo "::warning::kraft build produced no kernel ; cloning manually and rebuilding "
121121 UK_SOURCE=$(awk '/^unikraft:/{f=1} f && /source:/{print $2; exit}' kraft.yaml)
122122 UK_BRANCH=$(awk '/^unikraft:/{f=1} f && /version:/{print $2; exit}' kraft.yaml)
123123 ELF_SOURCE=$(awk '/app-elfloader:/{f=1} f && /source:/{print $2; exit}' kraft.yaml)
@@ -300,8 +300,8 @@ jobs:
300300 run : |
301301 just rootfs
302302 kraft-hyperlight --no-prompt build --plat hyperlight --arch x86_64 || true
303- if [ ! -d " .unikraft/unikraft" ] || [ -z "$(ls -A .unikraft/unikraft 2 >/dev/null)" ] ; then
304- echo "::warning::kraft didn't clone unikraft sources ; cloning manually"
303+ if ! ls .unikraft/build/*_hyperlight-x86_64 >/dev/null 2>&1 ; then
304+ echo "::warning::kraft build produced no kernel ; cloning manually and rebuilding "
305305 UK_SOURCE=$(awk '/^unikraft:/{f=1} f && /source:/{print $2; exit}' kraft.yaml)
306306 UK_BRANCH=$(awk '/^unikraft:/{f=1} f && /version:/{print $2; exit}' kraft.yaml)
307307 ELF_SOURCE=$(awk '/app-elfloader:/{f=1} f && /source:/{print $2; exit}' kraft.yaml)
@@ -445,7 +445,8 @@ jobs:
445445 run : |
446446 just rootfs
447447 kraft-hyperlight --no-prompt build --plat hyperlight --arch x86_64 || true
448- if [ ! -d ".unikraft/unikraft" ] || [ -z "$(ls -A .unikraft/unikraft 2>/dev/null)" ]; then
448+ if ! ls .unikraft/build/*_hyperlight-x86_64 >/dev/null 2>&1; then
449+ echo "::warning::kraft build produced no kernel; cloning manually and rebuilding"
449450 UK_SOURCE=$(awk '/^unikraft:/{f=1} f && /source:/{print $2; exit}' kraft.yaml)
450451 UK_BRANCH=$(awk '/^unikraft:/{f=1} f && /version:/{print $2; exit}' kraft.yaml)
451452 ELF_SOURCE=$(awk '/app-elfloader:/{f=1} f && /source:/{print $2; exit}' kraft.yaml)
0 commit comments