Skip to content
Open
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
17 changes: 13 additions & 4 deletions .github/workflows/build-view.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,20 @@ jobs:
if: runner.os == 'macOS'
timeout-minutes: 90
run: |
# Increase file descriptor limit to prevent EMFILE errors during signing
# This is needed because electron-builder signs all files recursively,
# and Python venvs contain thousands of files
ulimit -n 65536 || ulimit -n 10240
# 1. Increase file descriptor limit to system's hard limit
# This prevents EMFILE errors during signing when electron-builder
# signs all files recursively
ulimit -n $(ulimit -Hn)
echo "File descriptor limit set to: $(ulimit -n)"

# 2. Clean up Python venv to reduce file count and app size
# These files are not needed in the packaged app and cause signing issues
echo "Cleaning up Python cache and test files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "tests" -path "*/site-packages/*" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "test" -path "*/site-packages/*" -exec rm -rf {} + 2>/dev/null || true

# 3. Start the build
npm run build -- --arch ${{ matrix.arch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,20 @@ jobs:
if: runner.os == 'macOS'
timeout-minutes: 90
run: |
# Increase file descriptor limit to prevent EMFILE errors during signing
# This is needed because electron-builder signs all files recursively,
# and Python venvs contain thousands of files
ulimit -n 65536 || ulimit -n 10240
# 1. Increase file descriptor limit to system's hard limit
# This prevents EMFILE errors during signing when electron-builder
# signs all files recursively
ulimit -n $(ulimit -Hn)
echo "File descriptor limit set to: $(ulimit -n)"

# 2. Clean up Python venv to reduce file count and app size
# These files are not needed in the packaged app and cause signing issues
echo "Cleaning up Python cache and test files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "tests" -path "*/site-packages/*" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "test" -path "*/site-packages/*" -exec rm -rf {} + 2>/dev/null || true

# 3. Start the build
npm run build -- --arch ${{ matrix.arch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down