From 6533c5d4eff8ced723680ed5464dbcaa84955019 Mon Sep 17 00:00:00 2001 From: "Christian M. Todie" Date: Thu, 22 Oct 2026 09:27:54 -0400 Subject: [PATCH 1/2] ci: real tap tests on the estate's self-hosted runners Replaces the scaffold job: it pointed at the unresolvable Homebrew/actions@master, ran on a GitHub-hosted macOS runner (the estate uses self-hosted, CER-2908), and ended each step in || true, so it could never fail (red since 08-23 for the action ref alone). The new job runs on group ent-default inside homebrew/brew pinned by digest (4.6.20). It taps this checkout, then installs and tests every formula with developer mode off (so a checksum mismatch is fatal, as for users), then runs brew style and a strict audit. Install comes first because style and audit switch on developer mode (pkg-lead@vespertin's finding on tap PR #1). With no formula on main the loop is empty, so main goes green and PR #1 is the first real test. --- .github/workflows/tests.yml | 52 ++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 19e5cd1..914dbde 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,15 +1,49 @@ -name: brew test-bot +# Tap CI: every formula must install, pass its test, and pass style and a strict audit. +# Runs on the estate's self-hosted runners (GitHub-hosted runners are not used, CER-2908) inside the +# Homebrew-on-Linux image pinned by digest. It replaces the scaffold job, which pointed at an +# unresolvable action ref (Homebrew/actions@master), ran on macOS, and ended every step in `|| true`, +# so it could never fail. +# +# Install and test run BEFORE style and audit: those two switch Homebrew into developer mode, under +# which a checksum mismatch only warns (pkg-lead@vespertin, tap PR #1). Users run with developer mode +# off, where a mismatch is fatal, so that is how install is tested here. +name: tap on: push: { branches: [main] } pull_request: +permissions: + contents: read jobs: test: - runs-on: macos-latest + runs-on: {group: ent-default, labels: [self-hosted]} + container: + # homebrew/brew 4.6.20 (multi-arch index digest) + image: homebrew/brew@sha256:b0072bfdebf5934ae24b93b44a1928a88057399b3283ffa0177bb86084fdedfd + options: --user linuxbrew + env: + HOMEBREW_NO_AUTO_UPDATE: "1" + HOMEBREW_NO_INSTALL_CLEANUP: "1" + HOMEBREW_NO_ANALYTICS: "1" steps: - - uses: actions/checkout@v4 - - name: Set up Homebrew - uses: Homebrew/actions/setup-homebrew@master - - name: brew style - run: brew style "$GITHUB_REPOSITORY" || true - - name: brew audit (new/changed) - run: brew audit --tap "${GITHUB_REPOSITORY##*/homebrew-}" --new || true + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Tap this checkout + run: | + set -euo pipefail + brew tap unsigned-gg/unsigned "$GITHUB_WORKSPACE" + echo "formulae: $(ls Formula/*.rb 2>/dev/null | wc -l)" + - name: Install and test every formula (developer mode off) + run: | + set -euo pipefail + shopt -s nullglob + for f in Formula/*.rb; do + n=$(basename "$f" .rb) + echo "::group::$n" + brew install --formula "unsigned-gg/unsigned/$n" + brew test "unsigned-gg/unsigned/$n" + echo "::endgroup::" + done + - name: Style and strict audit + run: | + set -euo pipefail + brew style unsigned-gg/unsigned + brew audit --strict --tap unsigned-gg/unsigned From 0fb56595d79b4eeba32e85a9d7d26de168ffbe06 Mon Sep 17 00:00:00 2001 From: "Christian M. Todie" Date: Thu, 22 Oct 2026 09:29:07 -0400 Subject: [PATCH 2/2] ci(tap): run Homebrew from a pinned git clone on the runner (no Docker daemon on self-hosted) The first run proved the ent-default runners have no Docker daemon (container job: cannot connect to /var/run/docker.sock), so the container approach is out. Homebrew now runs directly on the ephemeral runner from a shallow git clone of Homebrew/brew at tag 4.6.20, never a piped install script. --- .github/workflows/tests.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 914dbde..fc00bb9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,8 +1,9 @@ # Tap CI: every formula must install, pass its test, and pass style and a strict audit. -# Runs on the estate's self-hosted runners (GitHub-hosted runners are not used, CER-2908) inside the -# Homebrew-on-Linux image pinned by digest. It replaces the scaffold job, which pointed at an -# unresolvable action ref (Homebrew/actions@master), ran on macOS, and ended every step in `|| true`, -# so it could never fail. +# Runs on the estate's self-hosted runners (GitHub-hosted runners are not used, CER-2908). Those runners +# have no Docker daemon (container jobs fail: no /var/run/docker.sock), so Homebrew runs directly on the +# ephemeral runner from a git clone of Homebrew/brew at a pinned tag, never from a piped install script. +# It replaces the scaffold job, which pointed at an unresolvable action ref (Homebrew/actions@master), +# ran on macOS, and ended every step in `|| true`, so it could never fail. # # Install and test run BEFORE style and audit: those two switch Homebrew into developer mode, under # which a checksum mismatch only warns (pkg-lead@vespertin, tap PR #1). Users run with developer mode @@ -13,24 +14,28 @@ on: pull_request: permissions: contents: read +env: + BREW_TAG: "4.6.20" + HOMEBREW_NO_AUTO_UPDATE: "1" + HOMEBREW_NO_INSTALL_CLEANUP: "1" + HOMEBREW_NO_ANALYTICS: "1" + HOMEBREW_NO_ENV_HINTS: "1" jobs: test: runs-on: {group: ent-default, labels: [self-hosted]} - container: - # homebrew/brew 4.6.20 (multi-arch index digest) - image: homebrew/brew@sha256:b0072bfdebf5934ae24b93b44a1928a88057399b3283ffa0177bb86084fdedfd - options: --user linuxbrew - env: - HOMEBREW_NO_AUTO_UPDATE: "1" - HOMEBREW_NO_INSTALL_CLEANUP: "1" - HOMEBREW_NO_ANALYTICS: "1" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Homebrew from a pinned clone + run: | + set -euo pipefail + git clone --quiet --depth 1 --branch "$BREW_TAG" https://github.com/Homebrew/brew "$RUNNER_TEMP/brew" + "$RUNNER_TEMP/brew/bin/brew" --version + echo "$RUNNER_TEMP/brew/bin" >> "$GITHUB_PATH" - name: Tap this checkout run: | set -euo pipefail brew tap unsigned-gg/unsigned "$GITHUB_WORKSPACE" - echo "formulae: $(ls Formula/*.rb 2>/dev/null | wc -l)" + echo "formulae: $(find Formula -name '*.rb' | wc -l)" - name: Install and test every formula (developer mode off) run: | set -euo pipefail