diff --git a/.github/workflows/mobile-ci.yml b/.github/workflows/mobile-ci.yml index a4532cb0..4d53bdd5 100644 --- a/.github/workflows/mobile-ci.yml +++ b/.github/workflows/mobile-ci.yml @@ -84,25 +84,39 @@ jobs: - name: 📦 Get Flutter dependencies run: | - make mobile-install-ci + make mobile-install - name: 🔨 Run compilation check run: | - echo "⚙️ Running mobile analyze..." - make mobile-analyze 2>&1 | tee analyze_output.txt || true + echo "🏗️ Building client app for Android (dev mode)..." + make mobile-client-build PLATFORM=apk MODE=dev 2>&1 | tee client_build.txt || true echo "" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - # Check for actual errors (not just warnings) - if grep -E "^\s*(error|SEVERE):" analyze_output.txt > /dev/null 2>&1; then - echo "❌ COMPILATION ERRORS FOUND:" + echo "🏗️ Building staff app for Android (dev mode)..." + make mobile-staff-build PLATFORM=apk MODE=dev 2>&1 | tee staff_build.txt || true + + echo "" + echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + + # Check for actual errors in both builds + if grep -E "^\s*(error|SEVERE|Error|failed)" client_build.txt > /dev/null 2>&1 || \ + grep -E "^\s*(error|SEVERE|Error|failed)" staff_build.txt > /dev/null 2>&1; then + echo "❌ BUILD ERRORS FOUND:" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - grep -B 2 -A 1 -E "^\s*(error|SEVERE):" analyze_output.txt | sed 's/^/ /' + if grep -E "^\s*(error|SEVERE|Error|failed)" client_build.txt > /dev/null 2>&1; then + echo " CLIENT BUILD:" + grep -B 2 -A 1 -E "^\s*(error|SEVERE|Error|failed)" client_build.txt | sed 's/^/ /' + fi + if grep -E "^\s*(error|SEVERE|Error|failed)" staff_build.txt > /dev/null 2>&1; then + echo " STAFF BUILD:" + grep -B 2 -A 1 -E "^\s*(error|SEVERE|Error|failed)" staff_build.txt | sed 's/^/ /' + fi echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" exit 1 else - echo "✅ Compilation check PASSED - No errors found" + echo "✅ Build check PASSED - Both apps built successfully" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" fi @@ -128,7 +142,7 @@ jobs: - name: 📦 Get Flutter dependencies run: | - make mobile-install-ci + make mobile-install - name: 🔍 Lint changed Dart files run: | diff --git a/makefiles/dataconnect.mk b/makefiles/dataconnect.mk index acd5b428..7285b997 100644 --- a/makefiles/dataconnect.mk +++ b/makefiles/dataconnect.mk @@ -19,7 +19,7 @@ else $(error Invalid DC_ENV '$(DC_ENV)'. Use DC_ENV=dev or DC_ENV=validation) endif -.PHONY: dataconnect-enable-apis dataconnect-init dataconnect-deploy dataconnect-sql-migrate dataconnect-generate-sdk dataconnect-generate-sdk-ci dataconnect-sync dataconnect-bootstrap-db check-gcloud-beta dataconnect-clean dataconnect-bootstrap-validation-db dataconnect-file dataconnect-file-validation dataconnect-file-dev dataconnect-seed dataconnect-test +.PHONY: dataconnect-enable-apis dataconnect-init dataconnect-deploy dataconnect-sql-migrate dataconnect-generate-sdk dataconnect-sync dataconnect-bootstrap-db check-gcloud-beta dataconnect-clean dataconnect-bootstrap-validation-db dataconnect-file dataconnect-file-validation dataconnect-file-dev dataconnect-seed dataconnect-test #creation dataconnect file dataconnect-file: @@ -79,9 +79,6 @@ dataconnect-generate-sdk: dataconnect-file @firebase dataconnect:sdk:generate --project=$(FIREBASE_ALIAS) @echo "✅ Data Connect SDK generation completed for [$(DC_ENV)]." -# CI version: same as regular since Firebase CLI is now installed in CI -dataconnect-generate-sdk-ci: dataconnect-generate-sdk - # Unified backend schema update workflow (schema -> deploy -> SDK) dataconnect-sync: dataconnect-file @echo "--> [1/3] Deploying Data Connect [$(DC_SERVICE)]..." diff --git a/makefiles/mobile.mk b/makefiles/mobile.mk index dd75f3d7..43c3d618 100644 --- a/makefiles/mobile.mk +++ b/makefiles/mobile.mk @@ -1,6 +1,6 @@ # --- Mobile App Development --- -.PHONY: mobile-install mobile-install-ci mobile-info mobile-analyze mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build mobile-hot-reload mobile-hot-restart +.PHONY: mobile-install mobile-info mobile-analyze mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build mobile-hot-reload mobile-hot-restart MOBILE_DIR := apps/mobile @@ -15,13 +15,6 @@ mobile-install: install-melos dataconnect-generate-sdk @echo "--> Generating localization files..." @cd $(MOBILE_DIR) && melos run gen:l10n -mobile-install-ci: install-melos dataconnect-generate-sdk-ci - @echo "--> Bootstrapping mobile workspace for CI (Melos)..." - @cd $(MOBILE_DIR) && melos bootstrap - @echo "--> Generating localization files..." - @cd $(MOBILE_DIR) && melos run gen:l10n - @echo "✅ CI mobile setup complete" - mobile-info: @echo "--> Fetching mobile command info..." @cd $(MOBILE_DIR) && melos run info