build: assert mostly-static on macos
@@ -111,6 +111,29 @@ jobs:
echo "urbit_static=$(nix-build -A urbit --arg enableStatic true)"
>> $GITHUB_ENV
+ - name: confirm binary is mostly static
+ if: matrix.os == 'macos-latest'
+ run: |
+ bin="${{ env.urbit_static }}/bin/urbit"
+
+ if [ ! -f "$bin" ]; then
+ echo "no binary at $bin"
+ exit 1;
+ fi
+
+ libs="$(otool -L "${{ env.urbit_static }}/bin/urbit" | tail -n +2)"
+
+ # XX CoreFoundation?
+ if [ -z "$(echo "$libs" | grep -v libSystem)" ]; then
+ echo "it's mostly static"
+ echo "$libs"
+ exit 0
+ else
+ echo "dynamic links found:"
+ echo "$libs"
+ exit 1
+ fi
+
- uses: google-github-actions/setup-gcloud@v0.2.0
if: env.DO_UPLOAD == 'true'
with:
