Skip to content

Declare serious_python_darwin as static_framework for xcframework ven… #41

Declare serious_python_darwin as static_framework for xcframework ven…

Declare serious_python_darwin as static_framework for xcframework ven… #41

name: Test bridge (no publish, no slow platform tests)
# Throwaway workflow that exercises just the new bridge_example end-to-end
# on Darwin (macOS + iOS) — the platforms ported so far in the dart-bridge
# branch's consolidation work. Other platforms (Linux/Windows/Android) will
# return as each `serious_python_*` plugin gets wired up to download
# pre-built libdart_bridge binaries from flet-dev/dart-bridge releases.
#
# Delete before merging to main.
on:
push:
branches: [dart-bridge]
workflow_dispatch:
env:
SERIOUS_PYTHON_SITE_PACKAGES: "${{ github.workspace }}/site-packages"
jobs:
test_bridge_example_macos:
name: Bridge example macOS round-trip (Python ${{ matrix.python_version }})
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python_version: ['3.12', '3.13', '3.14']
env:
SERIOUS_PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
with:
path: '.fvmrc'
cache: true
- name: Package + run integration test
working-directory: "src/serious_python/example/bridge_example"
run: |
dart run serious_python:main package app/src --platform Darwin --python-version ${{ matrix.python_version }}
flutter test integration_test -d macos
test_bridge_example_ios:
name: Bridge example iOS round-trip (Python ${{ matrix.python_version }})
runs-on: macos-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
python_version: ['3.12', '3.13', '3.14']
env:
SERIOUS_PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
with:
path: '.fvmrc'
cache: true
# serious_python_darwin's prepare_ios.sh downloads python-ios-dart-<ver>.tar.gz
# (~100MB) into src/serious_python_darwin/darwin/dist_ios/ and skips the
# download if the directory already exists. Cache it so reruns and
# subsequent matrix jobs don't re-fetch from GitHub Releases.
- name: Cache iOS Python framework
uses: actions/cache@v4
with:
path: src/serious_python_darwin/darwin/dist_ios
key: ios-python-dist-${{ matrix.python_version }}-v2
- name: Setup iOS Simulator
id: simulator
uses: futureware-tech/simulator-action@v4
with:
model: 'iPhone 16 Pro Max'
os: "iOS"
os_version: "^18.6"
shutdown_after_job: true
wait_for_boot: true
- name: Package + run integration test
working-directory: "src/serious_python/example/bridge_example"
run: |
ts() { date '+%H:%M:%S'; }
echo "[$(ts)] >>> dart run serious_python:main package"
# certifi is a placeholder requirement: serious_python_darwin's
# sync_site_packages.sh only populates dist_ios/site-xcframeworks
# (which bundle-python-frameworks-ios.sh then requires at build
# time) when iOS-specific site-packages subdirs exist. Empty
# --requirements skips that branch and the build fails.
dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }} --requirements certifi
echo "[$(ts)] >>> flutter test integration_test"
flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }}
echo "[$(ts)] >>> done"