File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,26 @@ jobs:
120120 run : cargo make --profile ${{ matrix.flutter_profile }} appflowy-core-dev
121121 shell : bash
122122
123+ - name : Check FFI library size
124+ shell : bash
125+ run : |
126+ LIB=$(find frontend -name "libappflowy_backend.so" 2>/dev/null | head -1)
127+ if [ -n "$LIB" ]; then
128+ SIZE_BYTES=$(stat -c%s "$LIB")
129+ SIZE_MB=$(echo "scale=2; $SIZE_BYTES / 1048576" | bc)
130+ echo "## FFI Library Size" >> $GITHUB_STEP_SUMMARY
131+ echo "**libappflowy_backend.so: ${SIZE_MB} MB**" >> $GITHUB_STEP_SUMMARY
132+ echo "FFI library size: ${SIZE_MB} MB"
133+
134+ MAX_SIZE_MB=150
135+ if (( $(echo "$SIZE_MB > $MAX_SIZE_MB" | bc -l) )); then
136+ echo "::error::FFI library size (${SIZE_MB} MB) exceeds limit (${MAX_SIZE_MB} MB)"
137+ exit 1
138+ fi
139+ else
140+ echo "::warning::Could not find libappflowy_backend.so"
141+ fi
142+
123143 - name : Clean cargo build artifacts
124144 working-directory : frontend/rust-lib
125145 run : cargo clean
You can’t perform that action at this time.
0 commit comments