From f6faa0f75abe68b54b1cc8a69b7b7036d6535c7c Mon Sep 17 00:00:00 2001 From: robot <2+robot@noreply.truenas.local> Date: Sun, 2 Aug 2026 09:55:32 +0000 Subject: [PATCH] fix(ci): use Linux Flutter SDK for ubuntu-latest jobs (act runs Linux containers) --- .gitea/workflows/ci.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6feb60c..94ab1ac 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,10 +2,9 @@ # Triggers on push and pull_request # Stages: lint -> test -> build (Android + iOS) -> artifacts # -# NOTE: All jobs run on 'ubuntu-latest' which Gitea's act runner maps to the -# self-hosted macOS (ARM64) machine. We use direct SDK downloads because -# subosito/flutter-action and actions/setup-java query GitHub APIs that are -# unreachable from the self-hosted runner. +# Runner mapping: +# - ubuntu-latest → act runner in Linux Docker container (needs Linux SDKs) +# - [self-hosted, macos] → native macOS ARM64 host (needs macOS SDKs) name: CI @@ -31,10 +30,10 @@ jobs: - name: Setup Flutter run: | - # Direct Flutter SDK download (macOS/ARM64 — act runner on Mac) - 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 + # 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 export PATH="$PWD/flutter/bin:$PATH" flutter --version echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path" @@ -64,9 +63,10 @@ jobs: - name: Setup Flutter run: | - 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 + # 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 export PATH="$PWD/flutter/bin:$PATH" flutter --version echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path" @@ -92,8 +92,8 @@ jobs: - name: Setup Java 17 run: | - # 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" \ + # 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" \ -o jdk.tar.gz mkdir -p "$HOME/jdk" tar -xzf jdk.tar.gz -C "$HOME/jdk" --strip-components=1 @@ -105,9 +105,10 @@ jobs: - name: Setup Flutter run: | - 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 + # 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 export PATH="$PWD/flutter/bin:$PATH" flutter --version echo "$PWD/flutter/bin" >> "$GITHUB_PATH" || echo "$PWD/flutter/bin" >> "$HOME/.env_path" @@ -116,7 +117,7 @@ jobs: run: | export ANDROID_HOME="${HOME}/android-sdk" 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" mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest" export PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${PATH}" @@ -174,6 +175,7 @@ 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] @@ -184,6 +186,7 @@ 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