mirror of
https://github.com/garrytan/gstack.git
synced 2026-08-31 18:30:39 +02:00
- timeout-minutes on the 6 remaining unbounded jobs (actionlint 5, skill-docs 10, version-gate 10, make-pdf-gate 15, pr-title-sync 5, evals build-image 15) — a hung step sat on GitHub's 360-min default - right-size measured-over-long timeouts: dependency-review 10→5, windows-setup-e2e 15→10 - dependency-review: 2-core runner (28s API call on an 8-core box) and drop .github/workflows/** from its trigger paths (workflow edits have no dependencies to review) - windows caches gain restore-keys: a lockfile bump paid the 26s/43s restore for a guaranteed cold miss Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
105 lines
3.5 KiB
YAML
105 lines
3.5 KiB
YAML
name: make-pdf copy-paste gate
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'make-pdf/**'
|
|
- 'lib/diagram-render/**'
|
|
- 'test/diagram-render-drift.test.ts'
|
|
- 'browse/src/meta-commands.ts'
|
|
- 'browse/src/write-commands.ts'
|
|
- 'browse/src/commands.ts'
|
|
- 'browse/src/cli.ts'
|
|
- 'scripts/resolvers/make-pdf.ts'
|
|
- 'package.json'
|
|
- '.github/workflows/make-pdf-gate.yml'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
# PR-number keyed: head_ref carries no fork prefix, so same-name branches
|
|
# from two forks would share one group and cancel each other's runs.
|
|
group: make-pdf-gate-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
# Build + test only — no token writes.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
gate:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# macOS only: the Linux leg is covered by the free-tests lane, which
|
|
# builds the gate binaries (build:gates) and runs make-pdf/test
|
|
# (incl. e2e/) on every PR via the canonical runner, with
|
|
# GSTACK_EXPECT_BINARIES=1 arming ci-prereqs.test.ts so the gates
|
|
# can never silently self-skip there again. This gate's remaining
|
|
# value is macOS rendering coverage on make-pdf-scoped changes.
|
|
os: [macos-latest]
|
|
# Windows is tolerant-mode — Xpdf / Poppler-Windows extraction
|
|
# differs enough from the Linux/macOS baseline that the strict
|
|
# exact-diff gate is unreliable. Enable once the normalized
|
|
# comparator proves tolerant enough (Codex round 2 #18).
|
|
#
|
|
# include:
|
|
# - os: windows-latest
|
|
# tolerant: true
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.3.13
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Install poppler (macOS)
|
|
if: matrix.os == 'macos-latest'
|
|
run: brew install poppler
|
|
|
|
- name: Install poppler-utils (Ubuntu)
|
|
if: matrix.os == 'ubicloud-standard-8'
|
|
run: sudo apt-get update && sudo apt-get install -y poppler-utils
|
|
|
|
# Install a color-emoji font BEFORE Chromium launches so the emoji render
|
|
# gate has a fallback font. macOS ships Apple Color Emoji already.
|
|
- name: Install color-emoji font (Ubuntu)
|
|
if: matrix.os == 'ubicloud-standard-8'
|
|
run: |
|
|
sudo apt-get install -y fonts-noto-color-emoji
|
|
fc-cache -f || true
|
|
fc-match -f '%{family[0]}\t%{color}\n' ':lang=und-zsye:charset=1F600' || true
|
|
|
|
- name: Install Playwright Chromium
|
|
run: bunx playwright install chromium
|
|
|
|
- name: Build binaries
|
|
run: bun run build
|
|
|
|
- name: ad-hoc codesign (Apple Silicon)
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
for bin in browse/dist/browse browse/dist/find-browse design/dist/design make-pdf/dist/pdf; do
|
|
codesign --remove-signature "$bin" 2>/dev/null || true
|
|
codesign -s - -f "$bin" || true
|
|
done
|
|
|
|
- name: Log toolchain versions
|
|
run: |
|
|
echo "OS: ${{ matrix.os }}"
|
|
bun --version
|
|
which pdftotext && pdftotext -v 2>&1 | head -1 || true
|
|
|
|
- name: Run make-pdf unit tests
|
|
run: bun test make-pdf/test/*.test.ts test/diagram-render-drift.test.ts
|
|
|
|
- name: Run E2E gates (combined-features copy-paste + emoji render)
|
|
env:
|
|
BROWSE_BIN: ${{ github.workspace }}/browse/dist/browse
|
|
run: bun test make-pdf/test/e2e/
|