From 93509cba3f778f18f4edf3a5160f578f80bb033f Mon Sep 17 00:00:00 2001 From: Tyler Hall Date: Wed, 20 May 2026 08:11:36 -0400 Subject: [PATCH] ci: tolerate upstream poky rebases + remove qemu-runtime cron Two unrelated CI failures rolled into one PR because they're both small. 1. ci.yml parse jobs were failing on scarthgap whenever the cached poky checkout was older than upstream's rebased scarthgap tip: ! [rejected] scarthgap -> origin/scarthgap (non-fast-forward) `git fetch ref:remote-ref` refuses non-fast-forward updates by default. Switch to a `+ref:remote-ref` force refspec, and on any harder failure fall back to a clean re-clone so a corrupted cache never permanently wedges the matrix. qemu-runtime.yml had the same bug -- fix it the same way. 2. qemu-runtime's weekly cron has been consistently hitting the GitHub Actions 6h job-runtime cap (latest run cancelled at 6h 37min). The full core-image-weston build from a cold sstate doesn't fit in the hosted-runner budget. Drop the schedule and leave it as manual dispatch only until we point it at a self-hosted runner with persistent sstate. --- .github/workflows/ci.yml | 26 +++++++++++++++++++++----- .github/workflows/qemu-runtime.yml | 30 +++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc2a3b8..264a13a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,14 +51,30 @@ jobs: - name: Clone poky run: | - if [ ! -d poky/.git ]; then + # When the cache restores an older poky and upstream has since + # rebased the release branch (scarthgap has done this), a plain + # `fetch ... ref:remote-ref` refuses the non-fast-forward update + # and the job dies before bitbake even starts. Force-refspec + # (`+ref`) makes the fetch overwrite the local tracking ref; + # any harder breakage (corrupt cache, repository moved) falls + # back to a clean re-clone. + set -eo pipefail + clone_fresh() { + rm -rf poky git clone --depth 1 --branch ${{ matrix.poky_branch }} \ https://git.yoctoproject.org/poky poky + } + if [ ! -d poky/.git ]; then + clone_fresh else - git -C poky fetch --depth 1 origin \ - ${{ matrix.poky_branch }}:refs/remotes/origin/${{ matrix.poky_branch }} - git -C poky checkout -B ${{ matrix.poky_branch }} \ - refs/remotes/origin/${{ matrix.poky_branch }} + if ! git -C poky fetch --depth 1 origin \ + "+${{ matrix.poky_branch }}:refs/remotes/origin/${{ matrix.poky_branch }}"; then + echo "fetch failed; falling back to fresh clone" + clone_fresh + else + git -C poky checkout -B ${{ matrix.poky_branch }} \ + refs/remotes/origin/${{ matrix.poky_branch }} + fi fi - name: Install Yocto host dependencies diff --git a/.github/workflows/qemu-runtime.yml b/.github/workflows/qemu-runtime.yml index 2ae543a..46bc812 100644 --- a/.github/workflows/qemu-runtime.yml +++ b/.github/workflows/qemu-runtime.yml @@ -8,14 +8,13 @@ name: qemu-runtime # - Weston actually started on boot # - VSCode can connect to the live wayland-0 socket and stay alive # -# This is heavy CI (full Yocto image build, ~1-3 hours from cold -# sstate) so it runs weekly + on manual dispatch rather than per-PR. +# This is heavy CI (full Yocto image build) that does NOT fit inside +# the GitHub-hosted runner's hard 6-hour job-runtime cap from a cold +# sstate -- repeated weekly cron runs hit the cap and got cancelled. +# Until we wire up a self-hosted runner (e.g. fio) with persistent +# sstate, this workflow is manual-dispatch only. on: - schedule: - # 03:17 UTC Sunday. Off-peak; small offset so cdn.kernel.org + - # mirrors aren't slammed alongside everyone else's nightly. - - cron: '17 3 * * 0' workflow_dispatch: # Don't pile up qemu runs if one is already in progress. @@ -82,12 +81,25 @@ jobs: - name: Clone poky (scarthgap) run: | - if [ ! -d poky/.git ]; then + # See ci.yml's matching step for why this uses a force refspec + # plus a re-clone fallback. Upstream-branch rebases otherwise + # poison the cached checkout. + set -eo pipefail + clone_fresh() { + rm -rf poky git clone --depth 1 --branch scarthgap \ https://git.yoctoproject.org/poky poky + } + if [ ! -d poky/.git ]; then + clone_fresh else - git -C poky fetch --depth 1 origin scarthgap:refs/remotes/origin/scarthgap - git -C poky checkout -B scarthgap refs/remotes/origin/scarthgap + if ! git -C poky fetch --depth 1 origin \ + "+scarthgap:refs/remotes/origin/scarthgap"; then + echo "fetch failed; falling back to fresh clone" + clone_fresh + else + git -C poky checkout -B scarthgap refs/remotes/origin/scarthgap + fi fi - name: Cache downloads