Skip to content

Add CI that builds and runs every example #43

Add CI that builds and runs every example

Add CI that builds and runs every example #43

Workflow file for this run

name: UEFI
on:
push:
paths:
- 'uefi-static/**'
- 'uefi-library/**'
- '.github/workflows/uefi.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# No cron: nightly.yml calls this, so the whole nightly is ONE run
# and therefore one triage writer. See nightly.yml's header.
workflow_call:
inputs:
caller_run_id:
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
type: string
default: ''
workflow_dispatch:
# Hardcode this workflow's OWN name: github.workflow is the CALLER's in a called
# workflow, so keying on it put all 12 targets in one group -- and GitHub cancels
# the previously-pending run in a group, so only the last target survived.
concurrency:
group: ${{ inputs.caller_run_id && format('uefi-call-{0}', inputs.caller_run_id) || format('uefi-{0}', github.ref) }}
cancel-in-progress: ${{ !inputs.caller_run_id }}
permissions:
contents: read
jobs:
resolve:
uses: ./.github/workflows/_resolve-wolfssl.yml
with:
stable_count: 1
uefi:
needs: resolve
name: Build / uefi (${{ matrix.example }}) wolfSSL ${{ matrix.wolfssl_ref }}
runs-on: ubuntu-24.04
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
wolfssl_ref: ${{ fromJson(needs.resolve.outputs.refs_json) }}
include:
# uefi-static clones wolfSSL itself; `all` is wolfcrypt.efi
- example: uefi-static
target: all
# uefi-library's `all:` is run-fallback-nohw, which BOOTS QEMU. Only
# lib-nohw sets CFLAGS/LDFLAGS (target-specific), so naming test.efi
# directly compiles with empty CFLAGS and cannot find efi.h.
- example: uefi-library
target: lib-nohw
steps:
- uses: actions/checkout@v5
- name: Install gnu-efi toolchain
run: |
set -euo pipefail
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
gnu-efi build-essential >/dev/null
# uefi-library defaults WOLFSSL_PATH to a sibling checkout
- name: Clone wolfSSL
run: git clone -q --depth 1 --branch '${{ matrix.wolfssl_ref }}' https://github.com/wolfSSL/wolfssl /tmp/wolfssl
- name: Build ${{ matrix.example }} (${{ matrix.target }})
run: |
set -euo pipefail
cd '${{ matrix.example }}'
make '${{ matrix.target }}' WOLFSSL_PATH=/tmp/wolfssl
- name: Assert an EFI binary came out
run: |
set -euo pipefail
cd '${{ matrix.example }}'
f=$(find . -name '*.efi' | head -n1)
[ -n "$f" ] || { echo "FAIL: no .efi produced"; exit 1; }
file "$f"
echo "verified: $f"