Skip to content

Commit 63072cc

Browse files
committed
ci: fix libgit2 and openssl dependencies
1 parent b478194 commit 63072cc

4 files changed

Lines changed: 48 additions & 37 deletions

File tree

.github/workflows/desktop-build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ jobs:
5757
- name: Build desktop app bundle
5858
run: pnpm --filter @codelegate/desktop tauri build
5959

60+
- name: Verify macOS bundle does not link Homebrew libraries
61+
if: runner.os == 'macOS'
62+
shell: bash
63+
run: |
64+
set -euo pipefail
65+
66+
binary_path="$(find apps/desktop/src-tauri/target -path '*/bundle/macos/Codelegate.app/Contents/MacOS/codelegate-desktop' -print -quit)"
67+
68+
if [[ -z "$binary_path" ]]; then
69+
echo "Unable to locate built macOS app binary"
70+
exit 1
71+
fi
72+
73+
echo "Inspecting $binary_path"
74+
otool -L "$binary_path"
75+
76+
if otool -L "$binary_path" | grep -q '/opt/homebrew/'; then
77+
echo "macOS bundle links against Homebrew libraries, which breaks signed distribution builds."
78+
exit 1
79+
fi
80+
6081
- name: Upload Linux AppImage artifact
6182
if: runner.os == 'Linux'
6283
uses: actions/upload-artifact@v4

.github/workflows/desktop-release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,32 @@ jobs:
167167
168168
echo "APPLE_SIGNING_IDENTITY=$signing_identity" >> "$GITHUB_ENV"
169169
170+
- name: Verify macOS binary does not link Homebrew libraries
171+
if: matrix.platform == 'macos'
172+
shell: bash
173+
run: |
174+
set -euo pipefail
175+
176+
cargo build \
177+
--manifest-path apps/desktop/src-tauri/Cargo.toml \
178+
--release \
179+
--target "${{ matrix.target }}"
180+
181+
binary_path="apps/desktop/src-tauri/target/${{ matrix.target }}/release/codelegate-desktop"
182+
183+
if [[ ! -f "$binary_path" ]]; then
184+
echo "Unable to locate built macOS binary at $binary_path"
185+
exit 1
186+
fi
187+
188+
echo "Inspecting $binary_path"
189+
otool -L "$binary_path"
190+
191+
if otool -L "$binary_path" | grep -q '/opt/homebrew/'; then
192+
echo "macOS binary links against Homebrew libraries, which breaks signed distribution builds."
193+
exit 1
194+
fi
195+
170196
- name: Build and publish macOS release
171197
if: matrix.platform == 'macos'
172198
uses: tauri-apps/tauri-action@action-v0.6.0

apps/desktop/src-tauri/Cargo.lock

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tauri-plugin-dialog = "2"
1212
tauri-plugin-notification = "2"
1313
portable-pty = "0.8"
1414
base64 = "0.22"
15-
git2 = "0.20"
15+
git2 = { version = "0.20", default-features = false, features = ["vendored-libgit2"] }
1616
serde = { version = "1", features = ["derive"] }
1717
serde_json = "1"
1818

0 commit comments

Comments
 (0)