Skip to content

Install efitools only on a branch that has the Secure Boot test - #22

Merged
mastacontrola merged 1 commit into
mainfrom
ci-efitools-only-when-tested
Aug 18, 2026
Merged

Install efitools only on a branch that has the Secure Boot test#22
mastacontrola merged 1 commit into
mainfrom
ci-efitools-only-when-tested

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

This workflow is shared by every fogproject branch, but only the 1.6 line carries tests/secureboot-authvars.test.sh. On dev-branch the Install efitools step buys nothing at all — and it is not free.

It is the flakiest step in the job. A transient apt failure or a slow mirror wedges it for twenty minutes and takes the whole run with it. That is how fogproject#1170 — whose suite actually runs in 24 seconds — came to need a manual cancel and rerun:

1 Set up job:                      success
2 Check out the pull request:      success
3 Set up PHP 7.4:                  success
4 Install efitools:                in_progress   <- 20 minutes
5 Run the suite:                   pending

The fix

A probe step, same shape as the composer probe added in #19 and for the same reason:

- name: Does this branch have the Secure Boot test?
  id: sb_test
  run: |
    if [ -f tests/secureboot-authvars.test.sh ]; then
      echo 'present=true' >> "$GITHUB_OUTPUT"
    else
      echo 'present=false' >> "$GITHUB_OUTPUT"
      ... step summary ...
    fi

- name: Install efitools
  if: steps.sb_test.outputs.present == 'true'

Decided from the tree, not the branch name — the branch that has the test is a thing that will change, and the presence of the file is the actual precondition. The step summary says why it was skipped, so a missing efitools reads as a deliberate skip rather than as something that quietly did not happen.

What does not change

The 1.6 side is untouched: the file is there, the probe is true, the install runs exactly as before. secureboot-authvars.test.sh still skips itself when efitools is absent and run-all.sh still counts that as a pass — so this does not weaken enforcement anywhere it existed.

This workflow is shared by every fogproject branch, but only the 1.6
line carries tests/secureboot-authvars.test.sh. On dev-branch the apt
install bought nothing -- and it is not free. It is the flakiest step
in the job: a transient apt failure or a slow mirror wedges it for
twenty minutes and takes the whole run with it, which is how a
dev-branch pull request whose suite passed in 24 seconds came to need
a manual cancel and rerun (fogproject#1170).

Same shape as the composer probe added in #19, and for the same
reason: decide from the tree rather than the branch name, because the
branch that has the test is a thing that will change and the presence
of the file is the actual precondition. The step summary says why it
was skipped, so a missing efitools reads as a deliberate skip rather
than as something that quietly did not happen.

The 1.6 side is unchanged -- the file is there, the probe is true, and
the install runs exactly as before. secureboot-authvars.test.sh still
skips itself when efitools is absent and run-all.sh still counts that
as a pass, so this does not weaken enforcement anywhere it existed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017aBSWrDArXHTpKWkkN27LR
@mastacontrola
mastacontrola merged commit 464ced9 into main Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant