mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-30 11:44:38 +01:00
building intel mac app (#878)
Co-authored-by: Max Novich <mnovich@squareup.com>
This commit is contained in:
48
.github/workflows/bundle-desktop.yml
vendored
48
.github/workflows/bundle-desktop.yml
vendored
@@ -45,6 +45,10 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
name: Bundle Desktop App on macOS
|
||||
steps:
|
||||
# Check initial disk space
|
||||
- name: Check initial disk space
|
||||
run: df -h
|
||||
|
||||
# Validate Signing Secrets if signing is enabled
|
||||
- name: Validate Signing Secrets
|
||||
if: ${{ inputs.signing }}
|
||||
@@ -86,6 +90,21 @@ jobs:
|
||||
cd ui/desktop
|
||||
npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
|
||||
|
||||
# Pre-build cleanup to ensure enough disk space
|
||||
- name: Pre-build cleanup
|
||||
run: |
|
||||
echo "Performing pre-build cleanup..."
|
||||
# Clean npm cache
|
||||
npm cache clean --force || true
|
||||
# Clean any previous build artifacts
|
||||
rm -rf target || true
|
||||
# Clean Homebrew cache
|
||||
brew cleanup || true
|
||||
# Remove unnecessary large directories
|
||||
rm -rf ~/Library/Caches/* || true
|
||||
# Check disk space after cleanup
|
||||
df -h
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
@@ -115,10 +134,23 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-build-
|
||||
|
||||
# Rest of the workflow remains the same...
|
||||
# Build the project
|
||||
- name: Build goosed
|
||||
run: cargo build --release -p goose-server
|
||||
|
||||
# Post-build cleanup to free space
|
||||
- name: Post-build cleanup
|
||||
run: |
|
||||
echo "Performing post-build cleanup..."
|
||||
# Remove debug artifacts
|
||||
rm -rf target/debug || true
|
||||
# Keep only what's needed for the next steps
|
||||
rm -rf target/release/deps || true
|
||||
rm -rf target/release/build || true
|
||||
rm -rf target/release/incremental || true
|
||||
# Check disk space after cleanup
|
||||
df -h
|
||||
|
||||
- name: Copy binary into Electron folder
|
||||
run: cp target/release/goosed ui/desktop/src/bin/goosed
|
||||
|
||||
@@ -139,6 +171,10 @@ jobs:
|
||||
run: npm ci
|
||||
working-directory: ui/desktop
|
||||
|
||||
# Check disk space before bundling
|
||||
- name: Check disk space before bundling
|
||||
run: df -h
|
||||
|
||||
- name: Make Unsigned App
|
||||
if: ${{ !inputs.signing }}
|
||||
run: |
|
||||
@@ -177,6 +213,14 @@ jobs:
|
||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
|
||||
- name: Final cleanup before artifact upload
|
||||
run: |
|
||||
echo "Performing final cleanup..."
|
||||
# Remove build artifacts that are no longer needed
|
||||
rm -rf target || true
|
||||
# Check disk space after cleanup
|
||||
df -h
|
||||
|
||||
- name: Upload Desktop artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -202,4 +246,4 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
# Kill the app to clean up
|
||||
pkill -f "Goose.app/Contents/MacOS/Goose"
|
||||
pkill -f "Goose.app/Contents/MacOS/Goose"
|
||||
Reference in New Issue
Block a user