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 7bc8fce46c - Show all commits
+20 -23
View File
@@ -2,9 +2,10 @@
# Triggers on push and pull_request
# Stages: lint -> test -> build (Android + iOS) -> artifacts
#
# Runner mapping:
# - ubuntu-latest → act runner in Linux Docker container (needs Linux SDKs)
# - [self-hosted, macos] → native macOS ARM64 host (needs macOS SDKs)
# CRITICAL: Gitea's `act` runner on Magrathea (macOS ARM64) runs `ubuntu-latest`
# jobs inside x86_64 Docker containers where neither Linux x86_64 nor macOS SDKs
# can execute. ALL jobs MUST use [self-hosted, macos] to run natively on the
# Mac host with macOS ARM64 binaries.
name: CI
@@ -23,17 +24,17 @@ jobs:
# ── Stage 1: Lint & static analysis ──────────────────────────────
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: [self-hosted, macos]
steps:
- name: Checkout
Review

see, I ❤️ how this is hard coding a specific version of a framework - THIS helps make the development process of this app a monolith!

see, I ❤️ how this is hard coding a specific version of a framework - THIS helps make the development process of this app a monolith!
uses: actions/checkout@v4
- name: Setup Flutter
run: |
# Direct Flutter SDK download — Linux container (act runner)
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.8-stable.tar.xz" \
-o flutter.tar.xz
tar -xf flutter.tar.xz
# Direct Flutter SDK download — macOS ARM64 native
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \
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.
-o flutter.zip
unzip -q flutter.zip
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path"
@@ -55,7 +56,7 @@ jobs:
# ── Stage 2: Unit & widget tests ─────────────────────────────────
test:
name: Test
runs-on: ubuntu-latest
runs-on: [self-hosted, macos]
needs: [lint]
steps:
- name: Checkout
@@ -63,10 +64,9 @@ jobs:
- name: Setup Flutter
run: |
# Direct Flutter SDK download — Linux container (act runner)
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.8-stable.tar.xz" \
-o flutter.tar.xz
tar -xf flutter.tar.xz
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \
-o flutter.zip
unzip -q flutter.zip
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path"
@@ -84,7 +84,7 @@ jobs:
# ── Stage 3: Android build ──────────────────────────────────────
build-android:
name: Build Android
runs-on: ubuntu-latest
runs-on: [self-hosted, macos]
needs: [test]
steps:
- name: Checkout
@@ -92,8 +92,8 @@ jobs:
- name: Setup Java 17
run: |
# Direct Temurin JDK download — Linux container
curl -fsSL "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.tar.gz" \
# Direct Temurin JDK download — macOS ARM64
curl -fsSL "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.12_7.tar.gz" \
-o jdk.tar.gz
mkdir -p "$HOME/jdk"
tar -xzf jdk.tar.gz -C "$HOME/jdk" --strip-components=1
@@ -105,10 +105,9 @@ jobs:
- name: Setup Flutter
run: |
Outdated
Review

versioning....

versioning....
# Direct Flutter SDK download — Linux container
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.8-stable.tar.xz" \
-o flutter.tar.xz
tar -xf flutter.tar.xz
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \
-o flutter.zip
unzip -q flutter.zip
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path"
@@ -117,7 +116,7 @@ jobs:
run: |
export ANDROID_HOME="${HOME}/android-sdk"
mkdir -p "${ANDROID_HOME}/cmdline-tools"
curl -fsSL "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" -o cmdline-tools.zip
curl -fsSL "https://dl.google.com/android/repository/commandlinetools-mac-11076708_latest.zip" -o cmdline-tools.zip
unzip -q cmdline-tools.zip -d "${ANDROID_HOME}/cmdline-tools"
mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest"
export PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${PATH}"
1
@@ -175,7 +174,6 @@ jobs:
# ── Stage 3 (parallel): iOS build ───────────────────────────────
# Runs natively on macOS ARM64 host (not in Docker)
build-ios:
name: Build iOS
runs-on: [self-hosted, macos]
@@ -186,7 +184,6 @@ jobs:
- name: Setup Flutter
run: |
# Direct Flutter SDK download — macOS ARM64 host (native)
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \
-o flutter.zip
unzip -q flutter.zip