Architecture: How should the mobile CI/CD pipeline be structured for cost ...
Documentation for Sessions
🏗️ Architecture: How should the mobile CI/CD pipeline be structured for cost ...
Date: 2026-02-26
Time: 22:13:21 UTC
Session: gspace1-148.5
Agent: orchestrator
Confidence: 94%
Status: ✅ Documented
📋 Decision Context
Question:
How should the mobile CI/CD pipeline be structured for cost optimization?
Task: Design CI/CD pipeline for Vitto Mobile
🎯 Decision Made
Chosen:
3-phase pipeline: Phase 1 builds Angular on ubuntu ($0.008/min), Phase 2 splits into parallel iOS (macos-15, $0.08/min) and Android (ubuntu, $0.008/min) builds, Phase 3 creates draft GitHub Release. Web build artifact is shared between iOS and Android jobs via actions/upload-artifact.
Options Considered:
- All jobs on macos-15
- 3-phase split (ubuntu web + parallel iOS/Android)
- Single job with conditional steps
💭 Reasoning
ROOT CAUSE: macOS runners are 10x more expensive than ubuntu ($0.08 vs $0.008/min). The Angular build takes ~3 min and doesn't need macOS. By building web on ubuntu first, we avoid paying macOS rates for web compilation. Only iOS requires macOS (xcodebuild mandate). Android builds entirely on ubuntu (Gradle + JDK). The desktop workflow runs all 4 platforms in parallel with tauri-action — but mobile has only 2 platforms and the web build is shared, so the 3-phase approach saves ~$0.25 per build (significant over hundreds of releases). ALTERNATIVES: (1) Everything on macos-15 — rejected: wastes $0.24/min on 2 jobs that don't need macOS. (2) Use Fastlane for iOS build — rejected: adds Ruby setup overhead on expensive macOS runner; xcodebuild + xcrun altool is native and faster. (3) Use fastlane supply for Android Play Store upload — chosen for Android only, because Google Play's upload API is complex and fastlane wraps it cleanly on cheap ubuntu runner.
📁 Files Involved
.github/workflows/release-vitto-mobile.yml
🔗 Related
- Decision ID:
dev_1772144001825_d4moxc4 - Session: 148
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation