Compare commits

..

2 Commits

Author SHA1 Message Date
cf440ace0d Merge pull request 'CI: conditional Flutter install + concurrency + wget→curl for Mac runner' (#15) from github-such-software/hash-wallet:dev into dev
Some checks failed
Hash Wallet Android build / build (push) Failing after 2m41s
Hash Wallet Linux build / build (push) Successful in 9m42s
Hash Wallet iOS Simulator build / build (push) Failing after 51m37s
Reviewed-on: #15
2026-05-18 21:31:07 -04:00
jwinterm
93744af5ba CI: conditional Flutter install + concurrency + wget→curl for Mac runner
Some checks failed
Hash Wallet Android build / build (pull_request) Failing after 3m42s
Hash Wallet Linux build / build (pull_request) Successful in 10m22s
Hash Wallet iOS Simulator build / build (pull_request) Failing after 58m8s
iOS workflows were broken on the Mac mini runner because Flutter
wasn't installed. Three fixes:

1) Conditional Flutter setup. Check 'flutter --version' first; only
   pull subosito/flutter-action@v2 if missing or wrong version. Self-
   hosted Mac runner persists SDKs between runs, so steady-state is
   zero-cost. First run on the runner triggers a full SDK download
   via subosito (with cache: true so subsequent fresh installs are
   still fast).

2) wget → curl across all iOS workflow steps. macOS doesn't ship
   wget by default; curl is always present and respects -fsSL +
   redirect properly.

3) Concurrency groups on all four workflows. A burst of commits no
   longer queues N copies of the same build — newer pushes cancel
   in-flight runs on the same branch. Groups:
     linux-<ref>, android-<ref>, ios-sim-<ref>, ios-testflight-<ref>

   This addresses the '6 runs from one merge' issue: each commit in
   the merge triggered all 3 push-listening workflows. Concurrency
   cancels the earlier 3 the moment the newer commit's runs start.

4) CocoaPods install is also conditional (was already 'if ! command -v
   pod' under the hood; just tightened the step name).
2026-05-18 21:29:59 -04:00
4 changed files with 79 additions and 7 deletions

View File

@@ -11,6 +11,10 @@ on:
branches: [dev, main]
workflow_dispatch:
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash

View File

@@ -14,6 +14,12 @@ on:
branches: [dev, main]
workflow_dispatch:
# Cancel in-flight runs when a newer commit lands on the same branch — so a
# burst of commits doesn't pile up N copies of the same long build.
concurrency:
group: ios-sim-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
@@ -30,22 +36,50 @@ jobs:
with:
fetch-depth: 1
# Self-hosted Mac runner persists Flutter between runs. Only install if
# it's not already on PATH or version doesn't match.
- name: Check Flutter 3.32.0
id: flutter_check
run: |
if command -v flutter >/dev/null && flutter --version 2>/dev/null | grep -q "3\.32\.0"; then
echo "installed=true" >> "$GITHUB_OUTPUT"
flutter --version
else
echo "installed=false" >> "$GITHUB_OUTPUT"
fi
- name: Install Flutter 3.32.0 (if missing)
if: steps.flutter_check.outputs.installed != 'true'
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: stable
cache: true
- name: Install CocoaPods (if missing)
run: |
if ! command -v pod >/dev/null; then
sudo gem install cocoapods --no-document
fi
pod --version
- name: Show toolchain
run: |
set -x
flutter --version
xcodebuild -version
pod --version
which wget unzip
uname -m
which curl unzip
# ---- External prebuilt deps (same as android/linux) ------------------
# macOS doesn't ship wget by default; using curl everywhere.
- name: Fetch prebuilt torch_dart
run: |
set -x -e
pushd scripts
rm -rf torch_dart torch_dart.tar.gz
wget -q https://github.com/MrCyjaneK/torch_dart/releases/download/v1.0.17/torch_dart-v1.0.17.tar.gz -O 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
@@ -56,7 +90,7 @@ jobs:
set -x -e
pushd scripts
rm -rf reown_flutter reown_flutter.tar.gz
wget -q https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz -O 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
@@ -77,7 +111,7 @@ jobs:
MONERO_C_TAG=$(cd scripts/monero_c && git describe --tags)
mkdir -p "scripts/monero_c/release/$MONERO_C_TAG"
pushd "scripts/monero_c/release/$MONERO_C_TAG"
wget -q https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
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 (one level) ==="

View File

@@ -21,6 +21,10 @@ on:
# input for build number or auto-bump.
workflow_dispatch:
concurrency:
group: ios-testflight-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
@@ -37,6 +41,31 @@ jobs:
with:
fetch-depth: 1
- name: Check Flutter 3.32.0
id: flutter_check
run: |
if command -v flutter >/dev/null && flutter --version 2>/dev/null | grep -q "3\.32\.0"; then
echo "installed=true" >> "$GITHUB_OUTPUT"
flutter --version
else
echo "installed=false" >> "$GITHUB_OUTPUT"
fi
- name: Install Flutter 3.32.0 (if missing)
if: steps.flutter_check.outputs.installed != 'true'
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: stable
cache: true
- name: Install CocoaPods (if missing)
run: |
if ! command -v pod >/dev/null; then
sudo gem install cocoapods --no-document
fi
pod --version
- name: Show toolchain
run: |
set -x
@@ -46,12 +75,13 @@ jobs:
uname -m
# ---- External prebuilt deps -----------------------------------------
# macOS doesn't ship wget; using curl everywhere.
- name: Fetch prebuilt torch_dart
run: |
set -x -e
pushd scripts
rm -rf torch_dart torch_dart.tar.gz
wget -q https://github.com/MrCyjaneK/torch_dart/releases/download/v1.0.17/torch_dart-v1.0.17.tar.gz -O 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
@@ -62,7 +92,7 @@ jobs:
set -x -e
pushd scripts
rm -rf reown_flutter reown_flutter.tar.gz
wget -q https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz -O 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
@@ -82,7 +112,7 @@ jobs:
MONERO_C_TAG=$(cd scripts/monero_c && git describe --tags)
mkdir -p "scripts/monero_c/release/$MONERO_C_TAG"
pushd "scripts/monero_c/release/$MONERO_C_TAG"
wget -q https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
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
popd

View File

@@ -11,6 +11,10 @@ on:
branches: [dev, main]
workflow_dispatch:
concurrency:
group: linux-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash