Skip to content

Commit b5c2c26

Browse files
committed
iOS: cache python-ios-dart framework + log step timestamps
prepare_ios.sh in serious_python_darwin downloads python-ios-dart-<ver>.tar.gz (~100MB) on every run and skips only if the extracted dist_ios/ directory already exists. Wrap the directory in actions/cache keyed by python_version so the download happens once per version and is reused across subsequent jobs in the same workflow run and across reruns. Also wrap the package + flutter test calls with `date` timestamps so slow runs make it obvious which sub-step (packaging vs simulator boot vs flutter test) is responsible — useful for follow-up tuning. The cache key is suffixed `-v1` so we can invalidate by bumping when prepare_ios.sh's behavior changes.
1 parent 74ae640 commit b5c2c26

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/test-bridge-build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ jobs:
286286
path: '.fvmrc'
287287
cache: true
288288

289+
# serious_python_darwin's prepare_ios.sh downloads python-ios-dart-<ver>.tar.gz
290+
# (~100MB) into src/serious_python_darwin/darwin/dist_ios/ and skips the
291+
# download if the directory already exists. Cache it so reruns and
292+
# subsequent matrix jobs don't re-fetch from GitHub Releases.
293+
- name: Cache iOS Python framework
294+
uses: actions/cache@v4
295+
with:
296+
path: src/serious_python_darwin/darwin/dist_ios
297+
key: ios-python-dist-${{ matrix.python_version }}-v1
298+
289299
- name: Setup iOS Simulator
290300
id: simulator
291301
uses: futureware-tech/simulator-action@v4
@@ -299,13 +309,17 @@ jobs:
299309
- name: Package + run integration test
300310
working-directory: "src/serious_python_bridge/example"
301311
run: |
312+
ts() { date '+%H:%M:%S'; }
313+
echo "[$(ts)] >>> dart run serious_python:main package"
302314
# certifi is a placeholder requirement: serious_python_darwin's
303315
# sync_site_packages.sh only populates dist_ios/site-xcframeworks
304316
# (which bundle-python-frameworks-ios.sh then requires at build
305317
# time) when iOS-specific site-packages subdirs exist. Empty
306318
# --requirements skips that branch and the build fails.
307319
dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }} --requirements certifi
320+
echo "[$(ts)] >>> flutter test integration_test"
308321
flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }}
322+
echo "[$(ts)] >>> done"
309323
310324
test_bridge_example_linux:
311325
name: Bridge example Linux ${{ matrix.title }} round-trip (Python ${{ matrix.python_version }})

0 commit comments

Comments
 (0)