Skip to content

Commit 446434e

Browse files
committed
Fix iOS + Linux/Windows bridge_example CI failures
Three issues from the previous CI run: 1. test_wheel_build (throwaway) didn't upload wheel artifacts — only built them and listed filenames. Bridge example Linux/Windows then failed downloading the missing artifacts. Added actions/upload- artifact step that mirrors ci.yml's release_build. 2. iOS bridge_example failed: serious_python_darwin's sync_site_packages.sh only populates dist_ios/site-xcframeworks when iOS-specific site-packages subdirs (iphoneos.arm64, iphonesimulator.arm64, iphonesimulator.x86_64) exist. Empty --requirements falls to the macOS branch which doesn't create that directory, and bundle-python-frameworks-ios.sh later fails `find dist_ios/site-xcframeworks` with `No such file or directory`. Workaround: pass `--requirements certifi` (a tiny pure-Python placeholder, the same shape as flet_example's flet==0.28.3) to trigger the iOS site-xcframeworks population. 3. test-bridge-build.yml had no workflow-level SERIOUS_PYTHON_SITE_PACKAGES env var. ci.yml sets this at the top (line 15) so all jobs inherit. The throwaway needs the same so sync_site_packages.sh knows where package_command.dart staged the bundled site-packages. The certifi workaround is fragile; a cleaner long-term fix is to patch sync_site_packages.sh to always create site-xcframeworks (with just the base python xcframeworks, no user deps required). Adding to bridge-followups.
1 parent 08bbadc commit 446434e

2 files changed

Lines changed: 26 additions & 8 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,13 @@ jobs:
298298
- name: Run integration test
299299
working-directory: "src/serious_python_bridge/example"
300300
run: |
301-
dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }}
301+
# certifi placeholder: serious_python_darwin's sync_site_packages.sh
302+
# only populates dist_ios/site-xcframeworks when iOS-specific
303+
# site-packages subdirs exist (i.e., requirements installed for
304+
# iphoneos.arm64 + iphonesimulator.arm64 + iphonesimulator.x86_64).
305+
# An empty --requirements skips that branch and bundle-python-
306+
# frameworks-ios.sh later fails finding site-xcframeworks.
307+
dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }} --requirements certifi
302308
flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }}
303309
304310
bridge_example_linux:

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

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ on:
1111
branches: [dart-bridge]
1212
workflow_dispatch:
1313

14+
env:
15+
# Mirrors ci.yml's workflow-level env: serious_python_darwin's
16+
# sync_site_packages.sh and the Linux CMakeLists.txt both read this to know
17+
# where package_command.dart staged the bundled site-packages.
18+
SERIOUS_PYTHON_SITE_PACKAGES: "${{ github.workspace }}/site-packages"
19+
1420
jobs:
1521
test_wheel_build:
1622
name: cibuildwheel (${{ matrix.os }})
@@ -35,12 +41,13 @@ jobs:
3541
echo
3642
echo "Wheel filenames (expect cp312-abi3-<plat>):"
3743
ls wheelhouse/*.whl
38-
echo
39-
echo "Wheel contents (expect dart_bridge.abi3.so):"
40-
for whl in wheelhouse/*.whl; do
41-
echo "--- $whl ---"
42-
python -m zipfile -l "$whl"
43-
done
44+
45+
- name: Upload wheel artifacts
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: bridge-wheels-${{ matrix.os }}
49+
path: wheelhouse/*.whl
50+
if-no-files-found: error
4451

4552
test_android_build:
4653
name: Android cross-build (${{ matrix.abi }})
@@ -169,7 +176,12 @@ jobs:
169176
- name: Package + run integration test
170177
working-directory: "src/serious_python_bridge/example"
171178
run: |
172-
dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }}
179+
# certifi is a placeholder requirement: serious_python_darwin's
180+
# sync_site_packages.sh only populates dist_ios/site-xcframeworks
181+
# (which bundle-python-frameworks-ios.sh then requires at build
182+
# time) when iOS-specific site-packages subdirs exist. Empty
183+
# --requirements skips that branch and the build fails.
184+
dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }} --requirements certifi
173185
flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }}
174186
175187
test_bridge_example_linux:

0 commit comments

Comments
 (0)