feat: Update mobile CI workflow to streamline build process and remove CI-specific setup
This commit is contained in:
32
.github/workflows/mobile-ci.yml
vendored
32
.github/workflows/mobile-ci.yml
vendored
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user