Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2aab7c0
feat(book): assemble the 20 units into one offline book
zhuguang-ZFG Oct 26, 2026
50c5622
docs: record where the book's claims and drawings come from
zhuguang-ZFG Oct 26, 2026
a8704e9
ci: build the book whenever the manuscript or the builder moves
zhuguang-ZFG Oct 26, 2026
cfa16ad
ci: make "no empty printed sheets" a build gate, not a hand check
zhuguang-ZFG Oct 26, 2026
31a2d17
docs: stop the repo's own numbers from rotting
zhuguang-ZFG Oct 26, 2026
344333e
ci: give each download its own clock
zhuguang-ZFG Oct 26, 2026
43a2d15
feat(book): gloss the two words the title is made of
zhuguang-ZFG Oct 26, 2026
48c07d0
fix(book): stop the lead bands from claiming what the text cannot show
zhuguang-ZFG Oct 26, 2026
0e86e7d
feat(book): let a Chinese reader look a term up in Chinese
zhuguang-ZFG Oct 26, 2026
114bfcc
feat(book): say how the Chinese index block is filed
zhuguang-ZFG Oct 26, 2026
cab5d45
fix(book): stop justifying Chinese prose on a phone-width line
zhuguang-ZFG Oct 26, 2026
e0c8870
feat(book): ingest the open-source harness ecosystem into the registry
zhuguang-ZFG Oct 26, 2026
a85c3cc
feat(book): give every core term the reason it earns its place
zhuguang-ZFG Oct 26, 2026
f971232
fix(book): make three stated totals agree with the tables under them
zhuguang-ZFG Oct 26, 2026
cee80da
docs(book): count the errata fix by lines touched, not by lines swept
zhuguang-ZFG Oct 26, 2026
8b60c49
fix(book): spell the artifact guard the way upload-artifact reads it
zhuguang-ZFG Oct 26, 2026
3bc1e67
feat(book): carry the plain layer into code spans and the margins
zhuguang-ZFG Oct 27, 2026
c929503
test(book): make the postman's numbers recountable, and pin his line …
zhuguang-ZFG Oct 27, 2026
77632d6
fix(book): --no-plain now drops the lead bands with the rest of the l…
zhuguang-ZFG Oct 27, 2026
4fb67ba
feat(book): give the printed subject index its page numbers
zhuguang-ZFG Oct 27, 2026
499328d
feat(book): let a chapter open on its prose and close on its terms
zhuguang-ZFG Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Book CI

on:
push:
branches: [main]
paths:
- '00-前言.md'
- '第一部分-基础篇/**'
- '第二部分-核心系统篇/**'
- '第三部分-高级模式篇/**'
- '第四部分-工程实践篇/**'
- '附录/**'
- 'en/**'
- 'yuyu-book/**'
- 'scripts/**'
- 'tests/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/book.yml'
pull_request:
paths:
- '00-前言.md'
- '第一部分-基础篇/**'
- '第二部分-核心系统篇/**'
- '第三部分-高级模式篇/**'
- '第四部分-工程实践篇/**'
- '附录/**'
- 'en/**'
- 'yuyu-book/**'
- 'scripts/**'
- 'tests/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/book.yml'

permissions:
contents: read

jobs:
book:
runs-on: ubuntu-latest
# A healthy run finishes in under 4 minutes, so 30 was never about the
# build — it was the ceiling that killed a run whose apt mirror crawled.
# Kept generous enough that a slow mirror still ships a book.
timeout-minutes: 45
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: npm ci

- run: python -m pip install -r yuyu-book/requirements.txt

# Playwright ships as a Python dependency here, so the browser comes from
# `python -m playwright install`, not `npx playwright`. The build is run
# without --browser on purpose: only the auto-detected msedge/chrome/
# chromium launches pass --allow-file-access-from-files, which the mermaid
# harness needs to import the ESM bundle from file://. Noto CJK faces are
# required for the printed pages and the diagram labels.
#
# Two downloads, two steps, each with its own clock. One run drew an
# azure.archive.ubuntu.com serving fonts-noto-cjk at 25 kB/s: it spent 26
# minutes on the font package, never reached the browser, and the job died
# as "cancelled" with the culprit buried in the log. Bounding each fetch
# says which mirror failed, on the step that failed, in minutes.
- name: Install CJK fonts
timeout-minutes: 12
run: |
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 \
install -y fonts-noto-cjk

- name: Install Chromium
timeout-minutes: 15
run: python -m playwright install --with-deps chromium

- run: python scripts/check_book.py

- run: npm run check:diagrams

- name: Unit tests
run: |
python -m unittest discover -s tests -v
python -m unittest discover -s yuyu-book/tests -v

# Also warms yuyu-book/.cache/mermaid so the PDF pass reuses the plates.
- name: Assemble and audit both editions
run: python yuyu-book/build.py --check

- name: Build both PDF editions
run: python yuyu-book/build.py --lang both --pdf

- uses: actions/upload-artifact@v4
with:
name: yuyu-book-dist
path: yuyu-book/dist/*
if-no-files-found: error
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@

node_modules/
__pycache__/

# derived by yuyu-book/build.py; CI publishes dist as an artifact
yuyu-book/dist/
yuyu-book/.cache/
yuyu-book/cover-art.png
yuyu-book/.scratch/
203 changes: 203 additions & 0 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

138 changes: 138 additions & 0 deletions CREDITS.md

Large diffs are not rendered by default.

Loading