Files
vectorcraft/.github/workflows/nightly-macos.yml
T
dotCooCoo c61c271b74 CI: move the craft-fonts pin to craft-fonts main in every workflow
The CI, FreeBSD, nightly, macOS nightly and release workflows pinned
craft-fonts b076417, which has no fonts/latin-manifest.txt, so every
build warned that it could not embed the tab-title face. They now pin
craft-fonts main at 16bbfc3, which adds Noto Sans Condensed SemiBold
(storytold/craft-fonts#72), so builds from these workflows draw document
tab titles in it. The pin also brings Noto Sans Lao, Noto Sans for eight
Indian scripts (Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu,
Kannada and Malayalam) and the Latin catalog.

With the new faces a build loads 135 faces instead of 54, and Retype
compares the first 96 first. Two faults showed:

- Retype: near matching fits a shape with at most the 256 glyphs closest
  to it in proportion over every face. The dots and periods of the new
  faces, drawn alike in each family and each named weight, took all 256
  places, so a simplified Source Sans 3 period after "no" matched no
  glyph of Source Sans 3 and was left as an outline. A shape that near
  matches no glyph of the font of the line before it is now also
  compared with that font's own 256 closest glyphs, and joins the line
  when one fits. RetypeIndex::near_matches_in does that lookup.
- Tests: six Retype tests added their test font to the global font
  database and expected Retype to compare it, which it did only while
  fewer than 96 faces were loaded before it. They now name the font
  (type.retype's fonts, or live type in the family as #6896 does for
  of_two_versions_only_the_one_the_name_gives_is_listed), and
  lines_in_family fails when the family has no match instead of reading
  another face.

all_supplied_craft_font_families_are_registered_without_system_fonts
looked up every embedded craft-fonts face in the document font database.
The tab-title face is embedded for tab titles only and the database
leaves it out (document_fonts), so the test now checks the faces
document_fonts lists.

docs/mcp.md describes the new near-match step, and docs/ui-parity.md and
docs/localization-parity.md describe the new pin.

The pin change and the version test fix follow #6896 by @newsbaba24x7.
2026-11-29 20:05:10 -08:00

91 lines
4.5 KiB
YAML

name: Nightly macOS build
# Builds the unsigned Apple-silicon VectorCraft Nightly (packaging/macos/nightly.sh) on a hosted
# macOS runner and checks the archive as the Launcher unpacks it, ending with the bundle's version
# query (packaging/macos/nightly-verify.sh --expect unsigned). No secrets and no environment: the real
# Nightly is signed and notarized by the shared release-ref signer (craft-common-actions), which calls
# packaging/macos/nightly-sign.sh.
on:
# macOS runners are shared with release builds and have a monthly minute cap: pull requests run
# this only with the `full-ci` label, never by changed paths. `labeled` so adding it starts a run.
pull_request:
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
permissions:
contents: read
# A newer push to a labelled PR cancels its older run. Any event that will not build (no `full-ci`
# label, or another label added) gets a group of its own, so it never cancels a real build.
concurrency:
group: nightly-macos-${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full-ci') && (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Nightly .app (aarch64, unsigned)
if: >-
github.event_name == 'workflow_dispatch' ||
(contains(github.event.pull_request.labels.*.name, 'full-ci') &&
(github.event.action != 'labeled' || github.event.label.name == 'full-ci'))
runs-on: macos-15
timeout-minutes: 120
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
# The release's pin (release.yml craft-fonts-ref), so the bundle's notices match a shipped build.
- name: Check out craft-fonts
uses: storytold/craft-common-actions/actions/checkout-craft-fonts@main
with:
ref: 16bbfc3d451fad51971ca3f2a28c1e69e279b67c
- id: rust
uses: storytold/craft-common-actions/actions/rust-channel@main
with:
targets: aarch64-apple-darwin
- uses: step-security/dtolnay-rust-toolchain@8dd607977d06adf4ed49b190381e74c17a9dd25f # v1.0.0
with:
toolchain: ${{ steps.rust.outputs.toolchain }}
targets: ${{ steps.rust.outputs.targets }}
components: ${{ steps.rust.outputs.components }}
# A version of the prepared Nightly form for this commit; the real one comes from the feed's
# identity job. Only nightly.sh's input checks read it.
- name: Prepare a Nightly identity for this commit
run: |
set -euo pipefail
base="$(python3 -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["version"].split("-")[0])')"
sha="$(git rev-parse HEAD)"
date="$(date -u +%Y-%m-%d)"
{
echo "VECTORCRAFT_BUILD_SHA=$sha"
echo "VECTORCRAFT_BUILD_DATE=$date"
echo "VECTORCRAFT_VERSION=$base-nightly.${date//-/}.$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT.g${sha:0:12}"
} >>"$GITHUB_ENV"
- name: Build the unsigned Nightly bundle
env:
VECTORCRAFT_BUILD_CHANNEL: nightly-v1
CARGO_TARGET_DIR: ${{ runner.temp }}/nightly-targets
DIST: ${{ runner.temp }}/nightly-dist
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
run: bash packaging/macos/nightly.sh --arch aarch64
- name: Check the archive and the bundle's version
run: bash packaging/macos/nightly-verify.sh --expect unsigned --input "$RUNNER_TEMP/nightly-dist/vectorcraft-$VECTORCRAFT_VERSION-macos-aarch64-nightly.zip"
# Keeps the verified unsigned zip briefly for keyless signer tests and hand testing. Unsigned only.
- name: Keep the unsigned archive
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: vectorcraft-nightly-macos-aarch64-unsigned
path: ${{ runner.temp }}/nightly-dist/vectorcraft-${{ env.VECTORCRAFT_VERSION }}-macos-aarch64-nightly.zip
if-no-files-found: error
retention-days: 7
compression-level: 0