Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 5 additions & 15 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,15 @@ jobs:
environment: Release
needs: build
if: github.ref_type == 'tag'
env:
BEATIT_TEST_CPU_ONLY: "1"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install build dependencies
run: |
brew list --versions ninja >/dev/null 2>&1 || brew install ninja
brew list --versions pytorch >/dev/null 2>&1 || brew install pytorch

- name: Resolve Torch prefix
run: echo "BEATIT_TORCH_ROOT=$(brew --prefix pytorch)" >> "$GITHUB_ENV"
- name: Download tested build artifacts
uses: actions/download-artifact@v4
with:
name: beatit-macos-build
path: .

- name: Import signing certificate
env:
Expand All @@ -91,12 +87,6 @@ jobs:
security import signing.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" build.keychain

- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBEATIT_TORCH_ROOT="${BEATIT_TORCH_ROOT}"

- name: Build
run: cmake --build build

- name: Verify plugins are staged
run: |
test -f build/plugins/libbeatit_backend_coreml.dylib
Expand Down
12 changes: 7 additions & 5 deletions scripts/package_macos_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ PRODUCTBUILD_ARGS=(
--resources "$RESOURCE_DIR"
)

if [[ -n "$INSTALLER_SIGN_IDENTITY" ]]; then
PRODUCTBUILD_ARGS+=(--sign "$INSTALLER_SIGN_IDENTITY")
fi

echo "Building final installer package: $UNSIGNED_PKG_PATH"
productbuild "${PRODUCTBUILD_ARGS[@]}" "$UNSIGNED_PKG_PATH"

mv "$UNSIGNED_PKG_PATH" "$PKG_PATH"
if [[ -n "$INSTALLER_SIGN_IDENTITY" ]]; then
echo "Signing final installer package: $PKG_PATH"
productsign --sign "$INSTALLER_SIGN_IDENTITY" "$UNSIGNED_PKG_PATH" "$PKG_PATH"
rm -f "$UNSIGNED_PKG_PATH"
else
mv "$UNSIGNED_PKG_PATH" "$PKG_PATH"
fi

echo "Created package: $PKG_PATH"