Author SHA1 Message Date
robot 08c4713a03 fix(ci): correct Flutter SDK download URLs to working flutter_infra_release endpoints
CI / Lint (pull_request) Waiting to run
CI / Test (pull_request) Blocked by required conditions
CI / Build Android (pull_request) Blocked by required conditions
CI / Build iOS (pull_request) Blocked by required conditions
All previous URLs under download.flutter.io returned 404. Replaced with
verified URLs from flutter_infra_release bucket (Flutter 3.44.8):
- Linux: tar.xz (1.4GB)
- macOS: zip (2.1GB) - note format differs from Linux
JDK and Android SDK URLs already verified working.
2026-08-02 08:27:58 +00:00
robot 886808db7e fix(ci): replace GitHub-hosted actions with direct SDK downloads
The subosito/flutter-action, actions/setup-java, and actions/setup-python
actions all query GitHub internal APIs that are unavailable on self-hosted
Gitea Actions runners. This caused the Test job to fail on Magrathea (Mac
runner) even though it was labelled [self-hosted, linux].

Changes:
- Replace subosito/flutter-action@v2 with direct Flutter SDK downloads
  from Google's CDN (platform-aware: linux-x64 vs darwin-x64)
- Replace actions/setup-java@v4 with direct Temurin JDK 17 download
- Replace actions/setup-python@v5 with system Python3 (graceful fallback)
- Linux jobs (lint, test) use linux-x64 Flutter
- macOS jobs (build-ios) use darwin-x64 Flutter
- Android build (ubuntu-latest) keeps native action support
2026-08-02 07:37:25 +00:00
robot 2cd080b559 fix(ci): use [self-hosted, linux] runner labels for lint and test jobs
The pipeline was failing because Lint and Test jobs used runs-on:
ubuntu-latest which 'act' does not recognize as a local runner label.
On the Mac build server (Magrathea), these jobs were routed to the
macOS runner where Docker containers failed to run Flutter correctly.

Changed:
- lint: ubuntu-latest -> [self-hosted, linux]
- test: ubuntu-latest -> [self-hosted, linux]
- build-android: ubuntu-latest (unchanged)
- build-ios: [self-hosted, macos] (unchanged)

The Linux runner should pick up lint/test while Magrathea handles iOS
builds as intended.
2026-08-02 06:56:42 +00:00
+68 -22
View File
@@ -1,11 +1,6 @@
# kryz-go-flutter CI Pipeline # kryz-go-flutter CI Pipeline
# Triggers on push and pull_request # Triggers on push and pull_request
# Stages: lint -> test -> build (Android + iOS) -> artifacts # Stages: lint -> test -> build (Android + iOS) -> artifacts
#
# 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 name: CI
@@ -20,21 +15,25 @@ concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }} group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true cancel-in-progress: true
env:
FLUTTER_VERSION: "stable"
jobs: jobs:
# ── Stage 1: Lint & static analysis ────────────────────────────── # ── Stage 1: Lint & static analysis ──────────────────────────────
lint: lint:
name: Lint name: Lint
runs-on: self-hosted runs-on: [self-hosted, linux]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Flutter - name: Setup Flutter
run: | run: |
# Direct Flutter SDK download — macOS ARM64 (native self-hosted runner) # Direct Flutter SDK download — subosito/flutter-action queries
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \ # GitHub internal APIs that are unavailable on self-hosted Gitea runners.
-o flutter.zip curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.8-stable.tar.xz" \
unzip -q flutter.zip -o flutter.tar.xz
tar -xf flutter.tar.xz
export PATH="$PWD/flutter/bin:$PATH" export PATH="$PWD/flutter/bin:$PATH"
flutter --version flutter --version
echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path" echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path"
@@ -56,7 +55,7 @@ jobs:
# ── Stage 2: Unit & widget tests ───────────────────────────────── # ── Stage 2: Unit & widget tests ─────────────────────────────────
test: test:
name: Test name: Test
runs-on: self-hosted runs-on: [self-hosted, linux]
needs: [lint] needs: [lint]
steps: steps:
- name: Checkout - name: Checkout
@@ -64,9 +63,10 @@ jobs:
- name: Setup Flutter - name: Setup Flutter
run: | run: |
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \ # Direct Flutter SDK download — self-hosted Gitea runner (Linux)
-o flutter.zip curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.8-stable.tar.xz" \
unzip -q flutter.zip -o flutter.tar.xz
tar -xf flutter.tar.xz
export PATH="$PWD/flutter/bin:$PATH" export PATH="$PWD/flutter/bin:$PATH"
flutter --version flutter --version
echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path" echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path"
@@ -80,11 +80,21 @@ jobs:
- name: Run tests - name: Run tests
run: flutter test --reporter=expanded run: flutter test --reporter=expanded
- name: Run tests with coverage
if: gitea.ref == 'refs/heads/main' && gitea.event_name == 'push'
run: flutter test --coverage
- name: "Note: coverage artifact storage not configured"
if: gitea.ref == 'refs/heads/main' && gitea.event_name == 'push'
run: |
echo "WARNING: Gitea Actions artifact storage is not configured."
echo "Coverage report available at: coverage/lcov.info"
# ── Stage 3: Android build ────────────────────────────────────── # ── Stage 3: Android build ──────────────────────────────────────
build-android: build-android:
name: Build Android name: Build Android
runs-on: self-hosted runs-on: ubuntu-latest
needs: [test] needs: [test]
steps: steps:
- name: Checkout - name: Checkout
@@ -92,8 +102,8 @@ jobs:
- name: Setup Java 17 - name: Setup Java 17
run: | run: |
# Direct Temurin JDK download — macOS ARM64 # Direct Temurin JDK download — actions/setup-java queries GitHub APIs
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" \ 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" \
-o jdk.tar.gz -o jdk.tar.gz
mkdir -p "$HOME/jdk" mkdir -p "$HOME/jdk"
tar -xzf jdk.tar.gz -C "$HOME/jdk" --strip-components=1 tar -xzf jdk.tar.gz -C "$HOME/jdk" --strip-components=1
@@ -105,9 +115,10 @@ jobs:
- name: Setup Flutter - name: Setup Flutter
run: | run: |
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \ # Direct Flutter SDK download — Linux build runner
-o flutter.zip curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.8-stable.tar.xz" \
unzip -q flutter.zip -o flutter.tar.xz
tar -xf flutter.tar.xz
export PATH="$PWD/flutter/bin:$PATH" export PATH="$PWD/flutter/bin:$PATH"
flutter --version flutter --version
echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path" echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path"
@@ -116,7 +127,7 @@ jobs:
run: | run: |
export ANDROID_HOME="${HOME}/android-sdk" export ANDROID_HOME="${HOME}/android-sdk"
mkdir -p "${ANDROID_HOME}/cmdline-tools" mkdir -p "${ANDROID_HOME}/cmdline-tools"
curl -fsSL "https://dl.google.com/android/repository/commandlinetools-mac-11076708_latest.zip" -o cmdline-tools.zip curl -fsSL "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" -o cmdline-tools.zip
unzip -q cmdline-tools.zip -d "${ANDROID_HOME}/cmdline-tools" unzip -q cmdline-tools.zip -d "${ANDROID_HOME}/cmdline-tools"
mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest" mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest"
export PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${PATH}" export PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${PATH}"
@@ -133,6 +144,18 @@ jobs:
run: | run: |
yes | sdkmanager --licenses || true yes | sdkmanager --licenses || true
- name: Install Python dependencies
run: |
# Use system Python — actions/setup-python queries GitHub APIs
if command -v python3 &>/dev/null; then
python3 -m pip install --upgrade pip 2>/dev/null || true
if [ -f requirements.txt ]; then
python3 -m pip install -r requirements.txt
fi
else
echo "WARNING: Python3 not found, skipping pip install"
fi
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
@@ -151,6 +174,25 @@ jobs:
if: hashFiles('theme.json') != '' if: hashFiles('theme.json') != ''
run: python3 build_whitelabel.py run: python3 build_whitelabel.py
- name: Configure release signing
if: env.ANDROID_KEYSTORE_BASE64 != ''
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASS: ${{ secrets.ANDROID_KEY_PASS }}
run: |
# Decode keystore
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > android/app/release.keystore
# Write key.properties for Gradle to consume
cat > android/key.properties <<EOF
storePassword=$ANDROID_KEYSTORE_PASS
keyPassword=$ANDROID_KEY_PASS
keyAlias=$ANDROID_KEY_ALIAS
storeFile=../release.keystore
EOF
- name: Build APK (release) - name: Build APK (release)
run: flutter build apk --release run: flutter build apk --release
@@ -174,9 +216,12 @@ jobs:
# ── Stage 3 (parallel): iOS build ─────────────────────────────── # ── Stage 3 (parallel): iOS build ───────────────────────────────
# Note: requires a macOS runner. Uses 'self-hosted' label which
# matches our Gitea Actions runner. Falls back to --no-codesign
# if Apple signing secrets are not configured.
build-ios: build-ios:
name: Build iOS name: Build iOS
runs-on: self-hosted runs-on: [self-hosted, macos]
needs: [test] needs: [test]
steps: steps:
- name: Checkout - name: Checkout
@@ -184,6 +229,7 @@ jobs:
- name: Setup Flutter - name: Setup Flutter
run: | run: |
# Direct Flutter SDK download — macOS runner (self-hosted)
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \ curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.44.8-stable.zip" \
-o flutter.zip -o flutter.zip
unzip -q flutter.zip unzip -q flutter.zip