CI/CD Pipeline Integration: iOS + Android stages with Gitea-native syntax #11

Merged
kfj001 merged 64 commits from ci/pipeline-integration into main 2026-08-03 20:16:03 -07:00
Showing only changes of commit 270e3e3805 - Show all commits
+28 -60
View File
@@ -10,7 +10,9 @@
# Each step is a separate shell. We export PATH="$PWD/flutter/bin:$PATH" in
# every step that uses flutter/dart commands.
#
# Flutter 3.44.0 ships Dart 3.12.0, satisfying pubspec sdk: ^3.11.5 constraint.
# subosito/flutter-action works on this runner — use it where possible for
# caching and speed. For build-android we still need manual JDK + Android SDK
# setup since actions/setup-java is GitHub-specific.
name: CI
1
@@ -28,9 +30,8 @@ concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
# ── Reusable setup block ──────────────────────────────────────────
# Each job downloads Flutter + dependencies independently because
# act/Gitea runners do not persist volumes between jobs.
env:
FLUTTER_VERSION: "3.44.0"
Outdated
Review

but this isn't a monolithic practice... let's use 24.04 which is the latest numbered version as of 'now'. I would prefer all ubuntu-latest's be replaced specifically with 24.04.

but this isn't a monolithic practice... let's use 24.04 which is the latest numbered version as of 'now'. I would prefer all ubuntu-latest's be replaced specifically with 24.04.
jobs:
# ── Stage 1: Lint & static analysis ──────────────────────────────
@@ -42,34 +43,23 @@ jobs:
uses: actions/checkout@v4
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter pub get
run: flutter pub get
- name: Generate stubs (lint gate support)
if: hashFiles('theme.json') == ''
run: |
export PATH="$PWD/flutter/bin:$PATH"
python3 ci_stub_gen.py
run: python3 ci_stub_gen.py
- name: Analyze Dart code
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter analyze --fatal-warnings
run: flutter analyze --fatal-warnings
- name: Auto-format source
run: |
export PATH="$PWD/flutter/bin:$PATH"
dart format lib/ test/
run: dart format lib/ test/
# ── Stage 1 (parallel): Unit & widget tests ──────────────────────
@@ -81,28 +71,19 @@ jobs:
uses: actions/checkout@v4
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter pub get
run: flutter pub get
- name: Generate stubs (lint gate support)
run: |
export PATH="$PWD/flutter/bin:$PATH"
python3 ci_stub_gen.py
run: python3 ci_stub_gen.py
- name: Run tests
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter test --reporter=expanded
run: flutter test --reporter=expanded
# ── Stage 3: Android build ──────────────────────────────────────
@@ -126,13 +107,10 @@ jobs:
java -version
Outdated
Review

versioning....

versioning....
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install Android SDK command-line tools
run: |
@@ -147,41 +125,31 @@ jobs:
sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
Outdated
Review

This is a ubuntu based image. Let's use apt to install the openjdk-17-jdk package.

This is a ubuntu based image. Let's use `apt` to install the `openjdk-17-jdk` package.
- name: Pre-cache Android platform artifacts
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter precache --android
run: flutter precache --android
- name: Accept Android SDK licenses
run: |
yes | "${HOME}/android-sdk/cmdline-tools/latest/bin/sdkmanager" --licenses || true
- name: Install dependencies
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter pub get
run: flutter pub get
- name: Generate stubs (lint gate support)
run: |
export PATH="$PWD/flutter/bin:$PATH"
python3 ci_stub_gen.py
run: python3 ci_stub_gen.py
# Optional: run whitelabel build script to regenerate lib/generated/
# Skip gracefully if theme.json is missing or script fails
- name: Run whitelabel build script
if: hashFiles('theme.json') != ''
run: |
export PATH="$PWD/flutter/bin:$PATH"
python3 build_whitelabel.py
run: python3 build_whitelabel.py
- name: Build APK (release)
run: |
export PATH="$PWD/flutter/bin:$PATH"
export JAVA_HOME="$HOME/jdk"
flutter build apk --release
- name: Build App Bundle (release)
run: |
export PATH="$PWD/flutter/bin:$PATH"
export JAVA_HOME="$HOME/jdk"
flutter build appbundle --release