Pin Flutter with FVM and share local environment loading across IDE, Python, and Dart entrypoints. Keep CI on the verified preinstalled SDK and skip local overrides. Extract common build presets, process execution, and file hashing. Propagate project roots through SDK selection and release commands, and migrate macOS release, signing, and DMG orchestration to Python. Reuse local check suites in CI, support Android source overrides, and update documentation and regression tests.
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
name: Prepare Flutter build environment
|
|
description: Configure persistent caches, verify Flutter and resolve locked dependencies.
|
|
inputs:
|
|
configure-java:
|
|
description: Configure Flutter to use the runner's JAVA_HOME
|
|
default: 'false'
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Configure persistent build caches
|
|
shell: pwsh
|
|
run: ./tool/gitea/prepare-build-cache.ps1
|
|
- name: Verify Flutter version
|
|
shell: pwsh
|
|
run: python tool/gitea/verify_flutter_version.py
|
|
- name: Configure Flutter Java
|
|
if: ${{ inputs.configure-java == 'true' }}
|
|
shell: pwsh
|
|
run: |
|
|
$ErrorActionPreference = 'Stop'
|
|
if (-not $env:JAVA_HOME) { throw 'JAVA_HOME is required for Flutter JDK setup.' }
|
|
flutter config --jdk-dir=$env:JAVA_HOME
|
|
if ($LASTEXITCODE -ne 0) { throw 'Flutter JDK setup failed.' }
|
|
- name: Resolve locked Flutter dependencies
|
|
shell: pwsh
|
|
run: |
|
|
flutter pub get --enforce-lockfile
|
|
if ($LASTEXITCODE -ne 0) { throw 'Locked Flutter dependency resolution failed.' }
|