CI: compile each macOS release architecture on a separate runner (#9075)

The v0.23.2 macOS job compiled Apple Silicon and Intel in series on one
macos-15 runner; the Build, sign, notarize step took about 3 hours 2
minutes (run 46835450051). macos-split-build: true compiles each
architecture on its own runner, then package.sh --skip-build lipos,
signs and notarizes the prebuilt pdfcraft and pdfcraft-cli binaries.

Fixes #9074.
This commit is contained in:
FredApps authored and GitHub committed 2026-12-02 19:35:43 +01:00
1 parent 5b822e9e5e
commit b0bb861807
2 files changed
+12 -6

No files matched your search

+1
View File
@@ -38,6 +38,7 @@ jobs:
app-name: pdfcraft app-name: pdfcraft
app-title: PdfCraft app-title: PdfCraft
macos-runner: macos-15 macos-runner: macos-15
macos-split-build: true
craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83 craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83
version: ${{ inputs.version }} version: ${{ inputs.version }}
contributors-artifact: ${{ needs.credits.outputs.artifact-name }} contributors-artifact: ${{ needs.credits.outputs.artifact-name }}
+11 -6
View File
@@ -20,7 +20,7 @@ ids stay lowercase (`pdfcraft-<version>-<platform>-<arch>.<ext>`, `ai.storytelle
Commit the change through the normal review flow (see the `Release: PdfCraft v0.2.1` PR). Commit the change through the normal review flow (see the `Release: PdfCraft v0.2.1` PR).
2. **Merge `main` into `release`** (or fast-forward it) and push. The workflow starts by itself. 2. **Merge `main` into `release`** (or fast-forward it) and push. The workflow starts by itself.
3. **Wait for the draft.** When every job has finished (notarization is the slow part), the 3. **Wait for the draft.** When every job has finished (the macOS compile is the long wait, then signing and notarization), the
Releases page has a draft `PdfCraft v0.3.0` targeting the pushed commit, with every artifact Releases page has a draft `PdfCraft v0.3.0` targeting the pushed commit, with every artifact
and `SHA256SUMS.txt`. The notes are generated from the merged PRs. and `SHA256SUMS.txt`. The notes are generated from the merged PRs.
4. **Check it.** Download an installer or two and read the job summaries. A `::warning::` there 4. **Check it.** Download an installer or two and read the job summaries. A `::warning::` there
@@ -44,7 +44,7 @@ published (`gh workflow run release.yml --ref <branch>`).
| Platform | Artifacts | Built on | | Platform | Artifacts | Built on |
|---|---|---| |---|---|---|
| macOS 11+ (universal: Apple silicon + Intel) | `pdfcraft-<v>-macos-universal.dmg`, `pdfcraft-cli-<v>-macos-universal.zip` | `macos-15` | | macOS 11+ (universal: Apple silicon + Intel) | `pdfcraft-<v>-macos-universal.dmg`, `pdfcraft-cli-<v>-macos-universal.zip` | `macos-15` (each architecture on its own runner, then packaged) |
| Windows 10+ x64 | `pdfcraft-<v>-windows-x64.msi`, `pdfcraft-<v>-windows-x64-portable.zip` | `windows-latest` | | Windows 10+ x64 | `pdfcraft-<v>-windows-x64.msi`, `pdfcraft-<v>-windows-x64-portable.zip` | `windows-latest` |
| Windows 10+ x86 (32-bit) | `pdfcraft-<v>-windows-x86.msi`, `pdfcraft-<v>-windows-x86-portable.zip` | `windows-latest` | | Windows 10+ x86 (32-bit) | `pdfcraft-<v>-windows-x86.msi`, `pdfcraft-<v>-windows-x86-portable.zip` | `windows-latest` |
| Windows 11 on ARM64 | `pdfcraft-<v>-windows-arm64.msi`, `pdfcraft-<v>-windows-arm64-portable.zip` | `windows-latest` (cross-compiled) | | Windows 11 on ARM64 | `pdfcraft-<v>-windows-arm64.msi`, `pdfcraft-<v>-windows-arm64-portable.zip` | `windows-latest` (cross-compiled) |
@@ -86,12 +86,16 @@ The web build does not include these models, and OCR remains limited to the Lati
### macOS ### macOS
`packaging/macos/package.sh` builds both architectures, joins them with `lipo`, and assembles `packaging/macos/package.sh` builds both architectures (or, with `--skip-build`, uses binaries
`PdfCraft.app` from `Info.plist.in` (bundle id `ai.storyteller.pdfcraft`, macOS 11+, PDF declared already in `target/<triple>/release` for `pdfcraft` and `pdfcraft-cli`), joins them with `lipo`,
as a document type with rank Alternate, so PdfCraft is offered under Open With without taking over and assembles `PdfCraft.app` from `Info.plist.in` (bundle id `ai.storyteller.pdfcraft`, macOS 11+,
from Preview). Files opened from Finder arrive as Apple events, which PDF declared as a document type with rank Alternate, so PdfCraft is offered under Open With
without taking over from Preview). Files opened from Finder arrive as Apple events, which
`apps/pdfcraft/src/apple_events.rs` receives. `apps/pdfcraft/src/apple_events.rs` receives.
The release workflow sets `macos-split-build: true`, so each architecture is compiled on its own
`macos-15` runner and the packaging job runs `packaging/macos/package.sh --arch universal --skip-build`.
- **Signing** uses the hardened runtime and a secure timestamp, executable first, then the bundle. - **Signing** uses the hardened runtime and a secure timestamp, executable first, then the bundle.
`packaging/macos/import-cert.sh` puts the certificate in a temporary keychain, deleted at the end `packaging/macos/import-cert.sh` puts the certificate in a temporary keychain, deleted at the end
of the job. of the job.
@@ -108,6 +112,7 @@ Without certificates (locally) the script signs ad-hoc and skips notarization:
```sh ```sh
packaging/macos/package.sh --arch aarch64 # quicker, host-only; --arch universal needs both targets packaging/macos/package.sh --arch aarch64 # quicker, host-only; --arch universal needs both targets
packaging/macos/package.sh --arch universal --skip-build # lipo, sign and notarize prebuilt binaries
``` ```
### Windows ### Windows