Windows CI: fetch prebuilt path-dep plugins before pub get #28

Merged
such-gitea merged 1 commits from github-such-software/hash-wallet:dev into dev 2026-05-20 15:03:05 -04:00

View File

@@ -61,6 +61,82 @@ jobs:
rustc --version
cargo --version
# ---- External prebuilt deps (mirror Android + iOS workflows) ----------
# Several plugins are path-deps in pubspec.yaml. The path directories
# must exist BEFORE `flutter pub get` runs against the regenerated
# pubspec, or pub fails with "could not find package X at <path>".
# We fetch the same prebuilt tarballs the other platforms use.
- name: Fetch prebuilt torch_dart
run: |
set -x -e
pushd scripts
rm -rf torch_dart torch_dart.tar.gz
curl -fsSL -o torch_dart.tar.gz https://github.com/MrCyjaneK/torch_dart/releases/download/v1.0.17/torch_dart-v1.0.17.tar.gz
mkdir torch_dart
tar -xzf torch_dart.tar.gz -C torch_dart
rm torch_dart.tar.gz
popd
- name: Fetch prebuilt reown_flutter
run: |
set -x -e
pushd scripts
rm -rf reown_flutter reown_flutter.tar.gz
curl -fsSL -o reown_flutter.tar.gz https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz
mkdir reown_flutter
tar -xzf reown_flutter.tar.gz -C reown_flutter
rm reown_flutter.tar.gz
popd
- name: Clone BitBox Flutter
run: |
# Pubspec has bitbox_flutter as a path dep — the directory must
# exist for pub get even if BitBox Windows support isn't
# functional. Same approach as the iOS workflow: clone the repo
# at a pinned commit, don't run any Android-binding build step.
set -x -e
pushd scripts
if [[ ! -d bitbox_flutter ]]; then
git clone https://github.com/konstantinullrich/bitbox_flutter
fi
cd bitbox_flutter
git fetch -a
git reset --hard
git checkout 5a6e6dd388ef64003f86094af80d5453518b601d
git reset --hard
popd
# ---- Native crypto cores (monero_c prebuilt bundle) ------------------
# The same release-bundle.zip that Android + iOS use. Contains
# pre-cross-compiled native libs for many target triples. We'll need
# the x86_64-w64-mingw32 (Windows MinGW) or x86_64-pc-windows-msvc
# entries — inspection step below logs what's actually shipped.
- name: Fetch prebuilt monero_c bundle
run: |
set -x -e
./scripts/prepare_moneroc.sh
MONERO_C_TAG=$(cd scripts/monero_c && git describe --tags)
echo "monero_c TAG: $MONERO_C_TAG"
mkdir -p "scripts/monero_c/release/$MONERO_C_TAG"
pushd "scripts/monero_c/release/$MONERO_C_TAG"
curl -fsSL -O https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
unzip -q release-bundle.zip
rm release-bundle.zip
echo "=== bundle contents (top level) ==="
ls
popd
- name: Inspect Windows targets in monero_c bundle
run: |
set -x
MONERO_C_TAG=$(cd scripts/monero_c && git describe --tags)
BUNDLE_DIR="scripts/monero_c/release/$MONERO_C_TAG"
echo "=== windows-ish subdirs ==="
find "$BUNDLE_DIR" -maxdepth 1 -type d \( -name '*mingw*' -o -name '*windows*' -o -name '*-win-*' -o -name '*-pc-windows*' \) 2>/dev/null
echo "=== any DLL anywhere? ==="
find "$BUNDLE_DIR" -name '*.dll' 2>/dev/null | head -20 || true
# ---- Configure: pubspec.yaml + per-coin enablement -------------------
# Mirror of hashwallet.bat — drives tool/configure.dart with the same
# set of coin flags that upstream Cake's Windows build uses.