refactor(core): own editor UI and pin verified native releases
Gitea CI / Check code and tests (pull_request) Failing after 8s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 1s
Gitea CI / Check code and tests (pull_request) Failing after 8s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 1s
This commit is contained in:
1 parent
796a3852a2
commit
38ca180cf7
354 files changed
+29841
-642
No files matched your search
@@ -1,9 +1,28 @@
|
||||
# Gitea Windows and Android builds
|
||||
|
||||
The Windows x64 host runner needs the Flutter version pinned in `.fvmrc`, Python, Node, Visual Studio C++,
|
||||
JDK 21 and Android SDK 36. The native cutdex_windows Release and cutdex_android
|
||||
Maven packages must be published before building this app. The SDK Git dependency
|
||||
is pinned to Gitea; the runner account needs SSH access to that private repository.
|
||||
JDK 21 and Android SDK 36. `dependencies.json` fixes the Core release version,
|
||||
source commit and source ZIP SHA256, together with its bundled native Flutter
|
||||
version and commit. `.gitea/actions/prepare-flutter` downloads that published Core
|
||||
archive and verifies its SHA256 and `RELEASE.json` before extracting a job-local
|
||||
`.dependencies/cutdex_core`. The app and preview package both use its
|
||||
`native_flutter` directory, so Pub resolves one integration source.
|
||||
Core is hosted at `lingjhf/cutdex_core`; Flutter integration is hosted at
|
||||
`cutdex-native/cutdex_native_flutter`. Local source development uses the ignored
|
||||
`pubspec_overrides.yaml` sibling overrides. Release CI does not follow branches or
|
||||
need platform repository checkout steps.
|
||||
|
||||
Production Android/Windows CI defaults to `CUTDEX_NATIVE_BUILD_MODE=artifacts` and
|
||||
consumes the exact platform versions and Windows archive digest recorded by the
|
||||
Flutter integration. Set the repository variable to `source` only for development CI;
|
||||
that mode lets the Flutter integration fetch the platform's locked SHA during the
|
||||
build. Android uses its single Settings hook; Windows automatically prepares the
|
||||
pinned Rust toolchain/target and verified FFmpeg SDK, then links and bundles DLLs.
|
||||
Applications do not need platform checkout steps or `FFMPEG_DIR`. Source-mode
|
||||
hosts need Git, Python 3.11+, Rustup/LLVM for Windows and NDK/CMake/MSYS2 for Android.
|
||||
`CUTDEX_NATIVE_SOURCE_TOKEN` reads private Gitea platform source repositories;
|
||||
`CUTDEX_NATIVE_SOURCE_SERVER_URL` selects the runner-reachable checkout server.
|
||||
Platform publication and Flutter integration CI are owned by their independent repositories.
|
||||
|
||||
Set CUTDEX_GITEA_TOKEN in repository Actions Secrets with repository read and
|
||||
package read access. It authenticates private Gitea native package downloads.
|
||||
@@ -11,7 +30,7 @@ The Android APK includes ARM64 and x86_64, uses the production flavor and curren
|
||||
uses the project's debug signing configuration. Configure formal signing before
|
||||
shipping a production signed Android release. The Windows ZIP includes the whole
|
||||
Flutter Release directory and passes the PE dependency audit. Processing workers
|
||||
and optional models are separate; these four repositories contain no worker bundle.
|
||||
and optional models are distributed separately; these workflows do not bundle them.
|
||||
|
||||
CI and local checks share `tool/check.py` suites for analysis, app/package tests
|
||||
and repository/tool tests. Local tooling loads `.env.local` with the project FVM
|
||||
|
||||
@@ -109,6 +109,12 @@ CI artifact ZIP download requests retain the loopback Host instead: Gitea return
|
||||
a signed redirect to the raw archive, and its Host must remain local for that
|
||||
second request to avoid the public tunnel. Release attachment links stay public.
|
||||
|
||||
Core source archives are cached by their pinned SHA256 under the runner user's
|
||||
`.cache/cutdex/core`. Every use verifies the bytes and both dependency identities;
|
||||
the archive is freshly extracted into each job's workspace. Native Flutter is
|
||||
bundled with Core and reused from that one source directory. No application build
|
||||
outputs or package configurations are shared between jobs.
|
||||
|
||||
Compare warm CI runs after the first cache fill. Measure checks, Android compile,
|
||||
Windows compile, packaging and artifact transfer separately. Total duration follows
|
||||
the slower platform branch, plus checks and final assembly; no fixed speedup is
|
||||
|
||||
@@ -7,6 +7,9 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Prepare verified Core source release
|
||||
shell: pwsh
|
||||
run: python tool/gitea/prepare_dependencies.py
|
||||
- name: Configure persistent build caches
|
||||
shell: pwsh
|
||||
run: ./tool/gitea/prepare-build-cache.ps1
|
||||
|
||||
+16
-1
@@ -14,7 +14,9 @@ concurrency:
|
||||
env:
|
||||
CI: 'true'
|
||||
PYTHONUTF8: '1'
|
||||
CUTDEX_NATIVE_SOURCE_TOKEN: ${{ secrets.CUTDEX_NATIVE_SOURCE_TOKEN }}
|
||||
CUTDEX_GITEA_INTERNAL_URL: http://127.0.0.1:3000
|
||||
CUTDEX_NATIVE_SOURCE_SERVER_URL: http://127.0.0.1:3000
|
||||
GIT_CONFIG_COUNT: '2'
|
||||
GIT_CONFIG_KEY_0: core.autocrlf
|
||||
GIT_CONFIG_VALUE_0: 'false'
|
||||
@@ -78,10 +80,13 @@ jobs:
|
||||
$file = 'android/gradle.properties'
|
||||
$properties = [IO.File]::ReadAllText($file).Replace('-Xmx8G', '-Xmx3G').Replace('MaxMetaspaceSize=4G', 'MaxMetaspaceSize=768m')
|
||||
[IO.File]::WriteAllText($file, $properties + "`norg.gradle.workers.max=4`norg.gradle.caching=true`n")
|
||||
- uses: ./.dependencies/cutdex_core/native_flutter/.gitea/actions/setup-android
|
||||
if: vars.CUTDEX_NATIVE_BUILD_MODE == 'source'
|
||||
- name: Build production Android APK
|
||||
env:
|
||||
GITEA_ACTOR: lingjhf
|
||||
run: |
|
||||
$env:CUTDEX_NATIVE_BUILD_MODE = '${{ vars.CUTDEX_NATIVE_BUILD_MODE || 'artifacts' }}'
|
||||
Remove-Item Env:CUTDEX_ANDROID_PATH -ErrorAction SilentlyContinue
|
||||
python tool/build.py android
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Android build failed.' }
|
||||
@@ -109,13 +114,23 @@ jobs:
|
||||
github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }}
|
||||
- name: Prepare Flutter environment
|
||||
uses: ./.gitea/actions/prepare-flutter
|
||||
- name: Clear inherited native build overrides
|
||||
run: |
|
||||
foreach ($key in @('CUTDEX_WINDOWS_PATH', 'CUTDEX_WINDOWS_PACKAGE_PATH', 'FFMPEG_DIR', 'LIBCLANG_PATH')) {
|
||||
Remove-Item "Env:$key" -ErrorAction SilentlyContinue
|
||||
"$key=" >> $env:GITHUB_ENV
|
||||
}
|
||||
- uses: ./.dependencies/cutdex_core/native_flutter/.gitea/actions/setup-windows
|
||||
if: vars.CUTDEX_NATIVE_BUILD_MODE == 'source'
|
||||
with:
|
||||
libclang-path: ${{ vars.CUTDEX_LIBCLANG_PATH }}
|
||||
- name: Reuse verified Velopack native archive
|
||||
run: |
|
||||
python tool/windows/native_cache.py
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Windows native archive cache preparation failed.' }
|
||||
- name: Build production Windows app
|
||||
run: |
|
||||
Remove-Item Env:CUTDEX_WINDOWS_PATH, Env:CUTDEX_WINDOWS_PACKAGE_PATH -ErrorAction SilentlyContinue
|
||||
$env:CUTDEX_NATIVE_BUILD_MODE = '${{ vars.CUTDEX_NATIVE_BUILD_MODE || 'artifacts' }}'
|
||||
python tool/build.py windows
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Windows build failed.' }
|
||||
- name: Verify native SDK matches pinned packaging tools
|
||||
|
||||
Reference in new issue
Block a user