Commit 7f65f2a
authored
ci: add macOS arm64 (Metal) build (#2)
* ci: add macOS arm64 (Metal) build for stable-diffusion.cpp
Adds a macos-arm64-cmake job covering [macos-14, macos-latest] that builds
leejet/stable-diffusion.cpp with Metal enabled and produces a release-ready
sd-*-bin-Darwin-macOS-<ver>-arm64.zip artifact, mirroring the existing Linux
job's naming convention. Wired into the release job so macOS arm64 binaries
are attached alongside Linux/Windows on scheduled and manual releases.
* ci(macos): bake @loader_path rpath so dylib loads next to binary
Without this, sd-cli ships with the GitHub runner's absolute build path
hardcoded in its rpath and fails at runtime with 'Library not loaded:
@rpath/libstable-diffusion.dylib'. Mirrors llama.cpp's release.yml flags.
* ci(macos): use stable artifact filename without OS version
Drop the dynamic Darwin-macOS-{sw_vers}-arm64 suffix in favor of a stable
sd-{branch}-{hash}-bin-Darwin-arm64.zip name (with -latest variant for
macos-latest). The previous naming embedded the runner image's macOS
point release (e.g. 14.8.5, 15.7.4), which churns silently as GitHub
patches the image and would break downstream consumers (Lemonade C++)
that download by exact filename. Matches the fixed-name pattern already
used by the Windows builds.
* ci: grant contents:write so the release job can publish artifacts
Without this, the workflow's GITHUB_TOKEN defaults to read-only on forks
and the 'Create release' / 'Upload release' steps fail with HTTP 403
'Resource not accessible by integration'. Same fix the Linux/Windows
release flow needs to function on Geramy's fork; safe on upstream where
the org-default token already has write access (this just makes it
explicit and forks-portable).
* ci(macos): name artifact …Darwin-arm64-metal.zip to align with backend ID
Lemonade's recipe matrix is adopting a 'metal' backend identifier for
macOS arm64 (mirroring the existing llamacpp/metal pattern). Renaming
the artifact's suffix to match keeps Lemonade C++'s download URL
construction trivial (filename = sd-{ver}-bin-Darwin-arm64-metal.zip)
and signals to consumers that this build has Metal acceleration enabled
(GGML_METAL=ON GGML_METAL_USE_BF16=ON GGML_METAL_EMBED_LIBRARY=ON).1 parent 8d8f55a commit 7f65f2a
1 file changed
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
549 | 552 | | |
550 | 553 | | |
551 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
552 | 619 | | |
553 | 620 | | |
554 | 621 | | |
| |||
560 | 627 | | |
561 | 628 | | |
562 | 629 | | |
| 630 | + | |
563 | 631 | | |
564 | 632 | | |
565 | 633 | | |
| |||
0 commit comments