refactor(build): unify SDK configuration and release tooling
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.
This commit is contained in:
1 parent
a13a54d5ec
commit
0343e2f723
57 files changed
+1858
-375
No files matched your search
+10
-15
@@ -12,8 +12,8 @@ concurrency:
|
||||
group: app-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
CI: 'true'
|
||||
PYTHONUTF8: '1'
|
||||
FLUTTER_VERSION: '3.47.5'
|
||||
CUTDEX_GITEA_INTERNAL_URL: http://127.0.0.1:3000
|
||||
GIT_CONFIG_COUNT: '2'
|
||||
GIT_CONFIG_KEY_0: core.autocrlf
|
||||
@@ -48,18 +48,13 @@ jobs:
|
||||
- name: Prepare Flutter environment
|
||||
uses: ./.gitea/actions/prepare-flutter
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
configure-java: 'true'
|
||||
- name: Analyze Dart code
|
||||
run: dart analyze --fatal-infos
|
||||
run: python tool/check.py --suite analyze
|
||||
- name: Run Flutter tests
|
||||
run: flutter test --reporter expanded test packages/cutdex_ui/test packages/cutdex_native/test
|
||||
- name: Test update and release tools
|
||||
run: |
|
||||
python -m unittest discover -s tool/gitea -p 'test_*.py'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Release tooling tests failed.' }
|
||||
python -m unittest discover -s tool/windows -p '*_unit.py'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Update tooling tests failed.' }
|
||||
run: python tool/check.py --suite flutter
|
||||
- name: Check repository and tool tests
|
||||
run: python tool/check.py --suite tools
|
||||
|
||||
android:
|
||||
name: Build Android APK
|
||||
@@ -77,7 +72,6 @@ jobs:
|
||||
- name: Prepare Flutter environment
|
||||
uses: ./.gitea/actions/prepare-flutter
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
configure-java: 'true'
|
||||
- name: Configure Gradle memory and build cache
|
||||
run: |
|
||||
@@ -87,7 +81,10 @@ jobs:
|
||||
- name: Build production Android APK
|
||||
env:
|
||||
GITEA_ACTOR: lingjhf
|
||||
run: flutter build apk --release --flavor production --target-platform android-arm64,android-x64
|
||||
run: |
|
||||
Remove-Item Env:CUTDEX_ANDROID_PATH -ErrorAction SilentlyContinue
|
||||
python tool/build.py android
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Android build failed.' }
|
||||
- name: Upload Android CI artifact
|
||||
if: ${{ needs.quality.outputs.package-app == 'true' }}
|
||||
uses: ./.gitea/actions/upload-artifact
|
||||
@@ -112,12 +109,10 @@ jobs:
|
||||
github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }}
|
||||
- name: Prepare Flutter environment
|
||||
uses: ./.gitea/actions/prepare-flutter
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
- name: Build production Windows app
|
||||
run: |
|
||||
Remove-Item Env:CUTDEX_WINDOWS_PATH, Env:CUTDEX_WINDOWS_PACKAGE_PATH -ErrorAction SilentlyContinue
|
||||
flutter build windows --release --flavor production
|
||||
python tool/build.py windows
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Windows build failed.' }
|
||||
- name: Verify native SDK matches pinned packaging tools
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user