Commit Graph
3 Commits
Author SHA1 Message Date
jwinterm 87d58c7494 CI: fix secrets generator early-return bug + inject Trocador via sed
Previous CI step pre-wrote tool/.secrets-config.json with a curated key
subset. The generator at tool/generate_secrets_config.dart has an early
return when the base config exists (line 61), which ALSO skips creating
the per-module configs (evm/solana/nano/tron/bitcoin). Result: dozens
of secrets.xxx references in cw_bitcoin/cw_evm/cw_nano/lib/main.dart
failed at compile time with 'Undefined name'.

New approach (matches Cake's CI pattern):
1. Run generate_new_secrets.dart with no pre-existing config → it creates
   all the JSON files from the full SecretKey list with empty defaults,
   then writes the per-module .secrets.g.dart files
2. sed-inject Trocador values into lib/.secrets.g.dart

Side effect: changenow_exchange_provider.dart's 'Map<String,dynamic> not
assignable to Map<String,String>' error also resolves — that error was
caused by Dart inferring 'dynamic' for the apiKey ternary because both
arms referenced undefined secrets. Once secrets exist as empty strings,
inference settles on String.
2026-05-15 19:49:04 -04:00
jwinterm 70320114a2 CI: serialize model_generator.sh + explicit Flutter precache step
The 'async' flag in model_generator.sh launches per-module flutter pub get
in parallel via 'bash -c ... &'. Flutter has a single-process startup lock
for SDK initialization — when N parallel calls race for it, most lose,
leaving the SDK cache half-initialized. Subsequent pub gets then fail
with the misleading 'doesn't support null safety' error because Flutter
can't resolve its own bundled sky_engine.

Two fixes:
1. Drop 'async' — model_generator.sh now runs the 8 modules sequentially.
   Adds maybe 3 minutes per CI run vs parallel, but reliable beats fast.
2. Add explicit 'flutter precache --linux' step before model_generator. The
   '|| true' absorbs the known flutter_gpu.zip 404 on Flutter 3.32.0 —
   that asset isn't actually published at the URL Flutter constructs and
   isn't needed for desktop Linux.
2026-05-15 13:55:23 -04:00
jwinterm a9bfc04cf3 Add Linux build CI workflow (Gitea Actions / GitHub Actions compatible)
Single workflow at .github/workflows/build-linux.yml that builds Linux
release in Cake's prebuilt Docker image. Skips the simplybs source-toolchain
bootstrap (which ate 9GB on jw-laptop before bailing) — uses the prebuilt
monero_c .so bundle instead, just like Cake's own CI does.

Targets runs-on: ubuntu-latest, which matches both your linux-beast
self-hosted runner (per its labels in the Gitea runners panel) AND
GitHub-hosted ubuntu-latest, so the same workflow file works whether CI
fires from Gitea Actions or GitHub Actions.

Triggers on push to dev/main, on PRs, and manual workflow_dispatch.
Outputs hash_wallet_linux_<sha>.zip as a downloadable artifact (14d retention).

Secrets needed on the runner / repo:
- TROCADOR_API_KEY
- TROCADOR_MONERO_API_KEY  (set to same value as TROCADOR_API_KEY for now)
- TROCADOR_EXCHANGE_MARKUP (e.g. "1")

Add via: GitHub repo Settings > Secrets and variables > Actions, or
Gitea repo Settings > Secrets.
2026-05-15 10:21:42 -04:00