Skip to content

Commit dd18d11

Browse files
committed
fix(ci): read minos via awk in macOS verify steps
grep -A2 after LC_BUILD_VERSION stops at the platform line, one short of minos, so the check always failed.
1 parent aed0c90 commit dd18d11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/build-binaries.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
- name: Verify deployment target and symbols
6161
run: |
6262
for bin in dist/whisper-cpp-darwin-arm64 dist/whisper-server-darwin-arm64; do
63-
otool -l "$bin" | grep -A2 LC_BUILD_VERSION | grep -q 'minos 12.0' || { echo "$bin: expected minos 12.0"; exit 1; }
63+
minos=$(otool -l "$bin" | awk '/LC_BUILD_VERSION/{f=1} f && /minos/{print $2; exit}')
64+
[ "$minos" = "12.0" ] || { echo "$bin: expected minos 12.0, got $minos"; exit 1; }
6465
if nm -u "$bin" | grep -q 'NEWLAPACK'; then echo "$bin: imports \$NEWLAPACK\$ILP64 but targets macOS < 13.3"; exit 1; fi
6566
done
6667
@@ -118,7 +119,8 @@ jobs:
118119
- name: Verify deployment target
119120
run: |
120121
for bin in dist/whisper-cpp-darwin-x64 dist/whisper-server-darwin-x64; do
121-
otool -l "$bin" | grep -A2 LC_BUILD_VERSION | grep -q 'minos 13.3' || { echo "$bin: expected minos 13.3"; exit 1; }
122+
minos=$(otool -l "$bin" | awk '/LC_BUILD_VERSION/{f=1} f && /minos/{print $2; exit}')
123+
[ "$minos" = "13.3" ] || { echo "$bin: expected minos 13.3, got $minos"; exit 1; }
122124
done
123125
124126
- name: Upload whisper-cli artifact

0 commit comments

Comments
 (0)