mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-12-02 15:01:42 -05:00
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:
@@ -38,6 +38,7 @@ jobs:
|
||||
app-name: pdfcraft
|
||||
app-title: PdfCraft
|
||||
macos-runner: macos-15
|
||||
macos-split-build: true
|
||||
craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83
|
||||
version: ${{ inputs.version }}
|
||||
contributors-artifact: ${{ needs.credits.outputs.artifact-name }}
|
||||
|
||||
+11
-6
@@ -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).
|
||||
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
|
||||
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
|
||||
@@ -44,7 +44,7 @@ published (`gh workflow run release.yml --ref <branch>`).
|
||||
|
||||
| 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+ 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) |
|
||||
@@ -86,12 +86,16 @@ The web build does not include these models, and OCR remains limited to the Lati
|
||||
|
||||
### macOS
|
||||
|
||||
`packaging/macos/package.sh` builds both architectures, joins them with `lipo`, and assembles
|
||||
`PdfCraft.app` from `Info.plist.in` (bundle id `ai.storyteller.pdfcraft`, macOS 11+, 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
|
||||
`packaging/macos/package.sh` builds both architectures (or, with `--skip-build`, uses binaries
|
||||
already in `target/<triple>/release` for `pdfcraft` and `pdfcraft-cli`), joins them with `lipo`,
|
||||
and assembles `PdfCraft.app` from `Info.plist.in` (bundle id `ai.storyteller.pdfcraft`, macOS 11+,
|
||||
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.
|
||||
|
||||
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.
|
||||
`packaging/macos/import-cert.sh` puts the certificate in a temporary keychain, deleted at the end
|
||||
of the job.
|
||||
@@ -108,6 +112,7 @@ Without certificates (locally) the script signs ad-hoc and skips notarization:
|
||||
|
||||
```sh
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user