From 89fb22996e3b62464bb1f6686a5f6b3d4c6b348e Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Fri, 10 Jul 2026 13:21:58 +0200 Subject: [PATCH 1/9] test --- .github/workflows/build-wheels-version.yml | 7 ++++--- .github/workflows/build-wheels.yml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-wheels-version.yml b/.github/workflows/build-wheels-version.yml index 0a9fe12..82c49fd 100644 --- a/.github/workflows/build-wheels-version.yml +++ b/.github/workflows/build-wheels-version.yml @@ -79,7 +79,7 @@ on: description: | Packages (comma-separated) or 'ALL' to select all available recipes: required: false - default: "pydantic-core:,numpy:,pillow:" + default: "lru-dict:" prebuild_recipes: description: | Recipes (comma-separated; typically flet-lib*) to build FIRST and seed into @@ -454,6 +454,7 @@ jobs: env: PKG_NAME: ${{ steps.detect-tests.outputs.pkg_name }} PKG_VERSION: ${{ steps.detect-tests.outputs.pkg_version }} + INPUT_PYTHON_VERSION: ${{ inputs.python_version }} run: | set -euxo pipefail @@ -479,7 +480,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli flet build apk --arch x86_64 -vv --yes + uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build apk --arch x86_64 -vv --yes --python-version "$INPUT_PYTHON_VERSION" - name: Test on Android emulator (API 28, x86_64) if: matrix.platform == 'android' && steps.detect-tests.outputs.has_tests == 'true' @@ -519,7 +520,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli flet build ios-simulator -v --yes + uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build ios-simulator -vv --yes --python-version "$INPUT_PYTHON_VERSION" - name: Test on iOS Simulator if: matrix.platform == 'ios' && steps.detect-tests.outputs.has_tests == 'true' diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index e519714..7b719e1 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -50,7 +50,7 @@ on: packages: type: string required: false - default: "pydantic-core:,numpy:,pillow:" + default: "lru-dict:" prebuild_recipes: type: string required: false @@ -81,7 +81,7 @@ env: # Used as the fallback recipe set when `packages` input is empty # (workflow_dispatch/workflow_call) or when no `recipes/**` paths # changed in the triggering event (push/pull_request). - SMOKE_TEST_PACKAGES: "pydantic-core:,numpy:,pillow:" + SMOKE_TEST_PACKAGES: "lru-dict:" permissions: contents: read From 3807af77a7a0799d32ffcc1822e175d29583d3e9 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Fri, 10 Jul 2026 13:29:25 +0200 Subject: [PATCH 2/9] test --- .github/workflows/build-wheels-version.yml | 4 ++-- .github/workflows/build-wheels.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheels-version.yml b/.github/workflows/build-wheels-version.yml index 82c49fd..d154712 100644 --- a/.github/workflows/build-wheels-version.yml +++ b/.github/workflows/build-wheels-version.yml @@ -480,7 +480,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build apk --arch x86_64 -vv --yes --python-version "$INPUT_PYTHON_VERSION" + uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build apk --arch x86_64 -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on Android emulator (API 28, x86_64) if: matrix.platform == 'android' && steps.detect-tests.outputs.has_tests == 'true' @@ -520,7 +520,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build ios-simulator -vv --yes --python-version "$INPUT_PYTHON_VERSION" + uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build ios-simulator -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on iOS Simulator if: matrix.platform == 'ios' && steps.detect-tests.outputs.has_tests == 'true' diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 7b719e1..f1e21fd 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -32,7 +32,7 @@ on: Versions in `python_versions` that aren't in this list still build wheels but skip the APK/iOS-simulator test stage. Use "ALL" to run tests for every entry in `python_versions`: required: false - default: "3.12" + default: "3.12,3.13,3.14" python_build_run_id: description: | flet-dev/python-build Actions run-id whose artifacts to use as the From 9d3e138e45d1b0b589ffe8365e11d9de5520f804 Mon Sep 17 00:00:00 2001 From: TheEthicalBoy <98978078+ndonkoHenri@users.noreply.github.com> Date: Fri, 10 Jul 2026 16:53:36 +0200 Subject: [PATCH 3/9] update --- .github/workflows/build-wheels.yml | 2 +- tests/recipe-tester/pyproject.toml.tpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index f1e21fd..e104ca0 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -32,7 +32,7 @@ on: Versions in `python_versions` that aren't in this list still build wheels but skip the APK/iOS-simulator test stage. Use "ALL" to run tests for every entry in `python_versions`: required: false - default: "3.12,3.13,3.14" + default: "ALL" python_build_run_id: description: | flet-dev/python-build Actions run-id whose artifacts to use as the diff --git a/tests/recipe-tester/pyproject.toml.tpl b/tests/recipe-tester/pyproject.toml.tpl index 796f51c..c934c83 100644 --- a/tests/recipe-tester/pyproject.toml.tpl +++ b/tests/recipe-tester/pyproject.toml.tpl @@ -5,7 +5,7 @@ description = "Generic in-app pytest runner for mobile-forge recipe wheels." requires-python = ">=3.10" dependencies = [ - "flet", + "flet>=0.86.0.dev0", "pytest", # `stage_recipe.sh` rewrites the line below to pin the recipe under test (e.g. `"numpy==2.2.2"`), # and replaces the token line after it with any test-only deps declared in @@ -16,7 +16,7 @@ dependencies = [ [dependency-groups] dev = [ - "flet[all]", + "flet[all]>=0.86.0.dev0", ] [tool.flet] From 0ebe90d1b8270b926a39a0da8b17d6ebbbffaaea Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Fri, 10 Jul 2026 21:13:29 +0200 Subject: [PATCH 4/9] recipe-tester: fix iOS test collection under Flet 0.86 Two Flet-0.86 packaging changes broke the on-device pytest run once the app's flet was pinned to 0.86 (past the certifi/AF_UNIX crashes): - cwd is now /Library/Application Support/data, so main.py's relative 'recipe_tests' rootdir/target no longer resolved (pytest EXIT 4). Anchor the path to __file__ instead. - the app is compiled to .pyc with the source stripped by default; pytest only collects .py, so 0 tests were collected (EXIT 5). Set [tool.flet.compile] app = false so the app/test source is kept (--compile-packages stays on). Verified on an iPhone 16 simulator: collected + passed + EXIT 0. --- .github/workflows/certifi-probe.yml | 122 +++++++++++++++++++++++++ tests/recipe-tester/main.py | 13 ++- tests/recipe-tester/pyproject.toml.tpl | 7 ++ 3 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/certifi-probe.yml diff --git a/.github/workflows/certifi-probe.yml b/.github/workflows/certifi-probe.yml new file mode 100644 index 0000000..4861edd --- /dev/null +++ b/.github/workflows/certifi-probe.yml @@ -0,0 +1,122 @@ +name: certifi-probe + +# Diagnostic: does building a BARE flet app on a Linux CI host drop certifi's +# bytecode from the bundle (→ on-device `ModuleNotFoundError: certifi`)? +# Matrix over the builder version to answer "why now": stable 0.85.3 (the +# builder that worked on CI for months) vs the 0.86.0.dev2 prerelease this +# branch pins. No recipe involved — isolates the toolchain from the recipe. + +on: + workflow_dispatch: {} + push: + paths: + - '.github/workflows/certifi-probe.yml' + +env: + FLUTTER_NDK_VERSION: "28.2.13676358" + +jobs: + probe: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + flet_cli: ["0.85.3", "0.86.0.dev2"] + name: certifi-probe (flet-cli ${{ matrix.flet_cli }}) + steps: + - uses: actions/checkout@v4 + + - name: Setup uv + uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ + | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - name: Install NDK for Flutter Android build + run: .ci/install_ndk.sh "$FLUTTER_NDK_VERSION" + + - name: Create a bare flet app + run: | + mkdir -p probeapp/src + cat > probeapp/pyproject.toml <<'EOF' + [project] + name = "certprobe" + version = "0.1.0" + requires-python = ">=3.10" + dependencies = ["flet"] + + [tool.flet] + org = "com.probe" + product = "certprobe" + + [tool.flet.app] + path = "src" + EOF + cat > probeapp/src/main.py <<'PYEOF' + import platform + print(">>>> CERTPROBE start plat=", platform.system(), "py=", platform.python_version(), flush=True) + try: + import certifi + print(">>>> app-side certifi OK ->", certifi.where(), flush=True) + except Exception as e: + print(">>>> app-side certifi FAILED ->", repr(e), flush=True) + import flet as ft + def main(page: ft.Page): + page.add(ft.SafeArea(content=ft.Text("certprobe ok"))) + if __name__ == "__main__": + ft.run(main) + PYEOF + + - name: Build APK with flet-cli ${{ matrix.flet_cli }} + id: build + working-directory: probeapp + continue-on-error: true + run: | + uvx --with flet-cli==${{ matrix.flet_cli }} --with flet==${{ matrix.flet_cli }} \ + flet build apk --arch x86_64 --yes -v --python-version 3.12 + + - name: Inspect certifi bytecode in the Linux-built bundle + working-directory: probeapp + run: | + echo "===== serious_python version resolved =====" + awk '/^ serious_python:/{f=1} f&&/version:/{print $0; exit}' build/flutter/pubspec.lock 2>/dev/null || echo "(no pubspec.lock)" + echo "" + echo "===== certifi dir in build/site-packages =====" + found="" + for d in $(find build/site-packages -maxdepth 2 -iname certifi -type d 2>/dev/null); do + found="$d"; echo "--- $d ---"; ls -la "$d" + done + echo "" + echo "===== VERDICT =====" + if [ -z "$found" ]; then + echo "RESULT: certifi dir NOT FOUND in bundle" + elif [ -f "$found/__init__.pyc" ] || [ -f "$found/__init__.py" ]; then + echo "RESULT: certifi PRESENT (importable __init__ survives) -> should boot" + else + echo "RESULT: certifi BROKEN (no __init__.py/.pyc; only data) -> ModuleNotFoundError expected" + fi + + - name: Run on Android emulator (API 28 x86_64) + read certifi outcome + if: steps.build.outcome == 'success' + uses: reactivecircus/android-emulator-runner@v2 + timeout-minutes: 20 + with: + api-level: 28 + arch: x86_64 + target: default + force-avd-creation: true + disable-animations: true + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot + script: | + adb install probeapp/build/apk/*.apk + adb logcat -c + adb shell am start -n com.probe.certprobe/.MainActivity || true + sleep 45 + echo "===== flet.python / certifi / crash logcat =====" + adb logcat -d -v brief flet.python:V python:V AndroidRuntime:E DEBUG:F '*:S' | tail -40 + echo "===== grep markers =====" + adb logcat -d | grep -iE "certprobe|certifi|CERTPROBE|ModuleNotFound|sp_script" | tail -30 diff --git a/tests/recipe-tester/main.py b/tests/recipe-tester/main.py index bd05d66..092e80f 100644 --- a/tests/recipe-tester/main.py +++ b/tests/recipe-tester/main.py @@ -44,19 +44,28 @@ def _run_pytest() -> None: until the next loop iteration. """ global EXIT_CODE, DONE + import os import pytest + # Anchor the tests dir to THIS module's location, not the cwd. Flet 0.86's + # iOS packaging runs the app with cwd = /Library/Application + # Support/data, while `recipe_tests/` is bundled next to this file — so a + # relative "recipe_tests" resolves against the wrong dir and pytest reports + # "directory not found" (EXIT 4). An absolute __file__-relative path is + # correct on every platform / Flet version. + tests_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "recipe_tests") + EXIT_CODE = pytest.main( [ "-v", "--rootdir", - "recipe_tests", # don't walk the bundled stdlib zip looking for conftest.py + tests_dir, # don't walk the bundled stdlib zip looking for conftest.py "-p", "no:cacheprovider", # don't try to write .pytest_cache/ on a potentially read-only mobile FS "--capture=no", # let test prints reach console.log too (default pytest capture hides stdout) "--no-header", "--tb=short", # compact output for console.log - "recipe_tests/", + tests_dir, ] ) diff --git a/tests/recipe-tester/pyproject.toml.tpl b/tests/recipe-tester/pyproject.toml.tpl index c934c83..de32d1f 100644 --- a/tests/recipe-tester/pyproject.toml.tpl +++ b/tests/recipe-tester/pyproject.toml.tpl @@ -22,5 +22,12 @@ dev = [ [tool.flet] artifact = "recipe-tester" +# Flet 0.86 compiles the app to .pyc and strips the source by default, but pytest +# only collects .py test files — so the bundled recipe_tests would report "0 items" +# (EXIT 5). Keep the app source (main.py + recipe_tests/*.py) as .py. This only +# affects the app; `--compile-packages` still compiles the bundled dependencies. +[tool.flet.compile] +app = false + [tool.flet.app] path = "." From fb990640ceac3c9f32c98dd37e4160802e5ac4b3 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Fri, 10 Jul 2026 21:15:24 +0200 Subject: [PATCH 5/9] ci: drop certifi-probe diagnostic workflow (kept in history) --- .github/workflows/certifi-probe.yml | 122 ---------------------------- 1 file changed, 122 deletions(-) delete mode 100644 .github/workflows/certifi-probe.yml diff --git a/.github/workflows/certifi-probe.yml b/.github/workflows/certifi-probe.yml deleted file mode 100644 index 4861edd..0000000 --- a/.github/workflows/certifi-probe.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: certifi-probe - -# Diagnostic: does building a BARE flet app on a Linux CI host drop certifi's -# bytecode from the bundle (→ on-device `ModuleNotFoundError: certifi`)? -# Matrix over the builder version to answer "why now": stable 0.85.3 (the -# builder that worked on CI for months) vs the 0.86.0.dev2 prerelease this -# branch pins. No recipe involved — isolates the toolchain from the recipe. - -on: - workflow_dispatch: {} - push: - paths: - - '.github/workflows/certifi-probe.yml' - -env: - FLUTTER_NDK_VERSION: "28.2.13676358" - -jobs: - probe: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - flet_cli: ["0.85.3", "0.86.0.dev2"] - name: certifi-probe (flet-cli ${{ matrix.flet_cli }}) - steps: - - uses: actions/checkout@v4 - - - name: Setup uv - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 - - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ - | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - name: Install NDK for Flutter Android build - run: .ci/install_ndk.sh "$FLUTTER_NDK_VERSION" - - - name: Create a bare flet app - run: | - mkdir -p probeapp/src - cat > probeapp/pyproject.toml <<'EOF' - [project] - name = "certprobe" - version = "0.1.0" - requires-python = ">=3.10" - dependencies = ["flet"] - - [tool.flet] - org = "com.probe" - product = "certprobe" - - [tool.flet.app] - path = "src" - EOF - cat > probeapp/src/main.py <<'PYEOF' - import platform - print(">>>> CERTPROBE start plat=", platform.system(), "py=", platform.python_version(), flush=True) - try: - import certifi - print(">>>> app-side certifi OK ->", certifi.where(), flush=True) - except Exception as e: - print(">>>> app-side certifi FAILED ->", repr(e), flush=True) - import flet as ft - def main(page: ft.Page): - page.add(ft.SafeArea(content=ft.Text("certprobe ok"))) - if __name__ == "__main__": - ft.run(main) - PYEOF - - - name: Build APK with flet-cli ${{ matrix.flet_cli }} - id: build - working-directory: probeapp - continue-on-error: true - run: | - uvx --with flet-cli==${{ matrix.flet_cli }} --with flet==${{ matrix.flet_cli }} \ - flet build apk --arch x86_64 --yes -v --python-version 3.12 - - - name: Inspect certifi bytecode in the Linux-built bundle - working-directory: probeapp - run: | - echo "===== serious_python version resolved =====" - awk '/^ serious_python:/{f=1} f&&/version:/{print $0; exit}' build/flutter/pubspec.lock 2>/dev/null || echo "(no pubspec.lock)" - echo "" - echo "===== certifi dir in build/site-packages =====" - found="" - for d in $(find build/site-packages -maxdepth 2 -iname certifi -type d 2>/dev/null); do - found="$d"; echo "--- $d ---"; ls -la "$d" - done - echo "" - echo "===== VERDICT =====" - if [ -z "$found" ]; then - echo "RESULT: certifi dir NOT FOUND in bundle" - elif [ -f "$found/__init__.pyc" ] || [ -f "$found/__init__.py" ]; then - echo "RESULT: certifi PRESENT (importable __init__ survives) -> should boot" - else - echo "RESULT: certifi BROKEN (no __init__.py/.pyc; only data) -> ModuleNotFoundError expected" - fi - - - name: Run on Android emulator (API 28 x86_64) + read certifi outcome - if: steps.build.outcome == 'success' - uses: reactivecircus/android-emulator-runner@v2 - timeout-minutes: 20 - with: - api-level: 28 - arch: x86_64 - target: default - force-avd-creation: true - disable-animations: true - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot - script: | - adb install probeapp/build/apk/*.apk - adb logcat -c - adb shell am start -n com.probe.certprobe/.MainActivity || true - sleep 45 - echo "===== flet.python / certifi / crash logcat =====" - adb logcat -d -v brief flet.python:V python:V AndroidRuntime:E DEBUG:F '*:S' | tail -40 - echo "===== grep markers =====" - adb logcat -d | grep -iE "certprobe|certifi|CERTPROBE|ModuleNotFound|sp_script" | tail -30 From 9daf2a687b5d21c4708e7240b3ff36d945c96ad5 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Fri, 10 Jul 2026 21:35:12 +0200 Subject: [PATCH 6/9] ci: update build-wheels workflows and tests for Python 3.12, additional packages, and Flet >=0.86 compatibility --- .github/workflows/build-wheels-version.yml | 6 +++--- .github/workflows/build-wheels.yml | 6 +++--- tests/recipe-tester/pyproject.toml.tpl | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-wheels-version.yml b/.github/workflows/build-wheels-version.yml index d154712..96c5799 100644 --- a/.github/workflows/build-wheels-version.yml +++ b/.github/workflows/build-wheels-version.yml @@ -79,7 +79,7 @@ on: description: | Packages (comma-separated) or 'ALL' to select all available recipes: required: false - default: "lru-dict:" + default: "lru-dict:,pydantic-core:,numpy:" prebuild_recipes: description: | Recipes (comma-separated; typically flet-lib*) to build FIRST and seed into @@ -480,7 +480,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build apk --arch x86_64 -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" + uvx --with flet-cli>=0.86.0.dev0 --with flet>=0.86.0.dev0 flet build apk --arch x86_64 -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on Android emulator (API 28, x86_64) if: matrix.platform == 'android' && steps.detect-tests.outputs.has_tests == 'true' @@ -520,7 +520,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli==0.86.0.dev2 --with flet==0.86.0.dev2 flet build ios-simulator -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" + uvx --with flet-cli>=0.86.0.dev0 --with flet>=0.86.0.dev0 flet build ios-simulator -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on iOS Simulator if: matrix.platform == 'ios' && steps.detect-tests.outputs.has_tests == 'true' diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index e104ca0..620fca3 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -32,7 +32,7 @@ on: Versions in `python_versions` that aren't in this list still build wheels but skip the APK/iOS-simulator test stage. Use "ALL" to run tests for every entry in `python_versions`: required: false - default: "ALL" + default: "3.12" python_build_run_id: description: | flet-dev/python-build Actions run-id whose artifacts to use as the @@ -50,7 +50,7 @@ on: packages: type: string required: false - default: "lru-dict:" + default: "lru-dict:,pydantic-core:,numpy:" prebuild_recipes: type: string required: false @@ -81,7 +81,7 @@ env: # Used as the fallback recipe set when `packages` input is empty # (workflow_dispatch/workflow_call) or when no `recipes/**` paths # changed in the triggering event (push/pull_request). - SMOKE_TEST_PACKAGES: "lru-dict:" + SMOKE_TEST_PACKAGES: "lru-dict:,pydantic-core:,numpy:" permissions: contents: read diff --git a/tests/recipe-tester/pyproject.toml.tpl b/tests/recipe-tester/pyproject.toml.tpl index de32d1f..2158140 100644 --- a/tests/recipe-tester/pyproject.toml.tpl +++ b/tests/recipe-tester/pyproject.toml.tpl @@ -22,10 +22,10 @@ dev = [ [tool.flet] artifact = "recipe-tester" -# Flet 0.86 compiles the app to .pyc and strips the source by default, but pytest +# Flet >=0.86 compiles the app to .pyc and strips the source by default, but pytest # only collects .py test files — so the bundled recipe_tests would report "0 items" # (EXIT 5). Keep the app source (main.py + recipe_tests/*.py) as .py. This only -# affects the app; `--compile-packages` still compiles the bundled dependencies. +# affects the app; bundled/package dependencies still get compiled. [tool.flet.compile] app = false From 68c53920780c1c750bd0b84c4565f12e3f54b22d Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Fri, 10 Jul 2026 21:43:31 +0200 Subject: [PATCH 7/9] ci: pass INPUT_PYTHON_VERSION to the iOS build step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The iOS 'Stage tests + build recipe-tester iOS sim app' step referenced $INPUT_PYTHON_VERSION but never set it in env (only the APK step did). Under set -u the var was unbound, so --python-version expanded to '' and flet build defaulted to Python 3.14 — whose iOS stdlib lacks _pyrepl, so pytest's pdb import crashed with INTERNALERROR (EXIT 3) even on the 3.12 leg. Set the var like the APK lane so iOS bundles the matrix Python (3.12). --- .github/workflows/build-wheels-version.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-wheels-version.yml b/.github/workflows/build-wheels-version.yml index 96c5799..15f1374 100644 --- a/.github/workflows/build-wheels-version.yml +++ b/.github/workflows/build-wheels-version.yml @@ -502,6 +502,11 @@ jobs: env: PKG_NAME: ${{ steps.detect-tests.outputs.pkg_name }} PKG_VERSION: ${{ steps.detect-tests.outputs.pkg_version }} + # Without this the `--python-version` below expands to '' (set -u prints + # "unbound variable" but the build continues), so `flet build` defaults to + # the newest Python (3.14) whose iOS stdlib is missing `_pyrepl` — pytest's + # pdb import then crashes with INTERNALERROR / EXIT 3. Pin it like the APK lane. + INPUT_PYTHON_VERSION: ${{ inputs.python_version }} run: | set -euxo pipefail From 742692ec14ca61378064de56475afce4c91cc478 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Sat, 11 Jul 2026 00:50:00 +0200 Subject: [PATCH 8/9] ci: quote flet-cli/flet '>=0.86.0.dev0' + enable prereleases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unquoted '>=' in 'uvx --with flet-cli>=0.86.0.dev0' was parsed by the shell as a redirection (> to a file '=0.86.0.dev0'), dropping the version constraint — so flet-cli/flet resolved to stable 0.85.3, whose 'flet build' rejects --python-version and the build failed on both platforms. Quote the specifiers and pass --prerelease allow (a >=dev bound alone doesn't enable prereleases). Verified: uvx --prerelease allow --with 'flet-cli>=0.86.0.dev0' flet --version -> 0.86.0.dev2. --- .github/workflows/build-wheels-version.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels-version.yml b/.github/workflows/build-wheels-version.yml index 15f1374..30fab71 100644 --- a/.github/workflows/build-wheels-version.yml +++ b/.github/workflows/build-wheels-version.yml @@ -480,7 +480,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli>=0.86.0.dev0 --with flet>=0.86.0.dev0 flet build apk --arch x86_64 -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" + uvx --prerelease allow --with 'flet-cli>=0.86.0.dev0' --with 'flet>=0.86.0.dev0' flet build apk --arch x86_64 -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on Android emulator (API 28, x86_64) if: matrix.platform == 'android' && steps.detect-tests.outputs.has_tests == 'true' @@ -502,10 +502,6 @@ jobs: env: PKG_NAME: ${{ steps.detect-tests.outputs.pkg_name }} PKG_VERSION: ${{ steps.detect-tests.outputs.pkg_version }} - # Without this the `--python-version` below expands to '' (set -u prints - # "unbound variable" but the build continues), so `flet build` defaults to - # the newest Python (3.14) whose iOS stdlib is missing `_pyrepl` — pytest's - # pdb import then crashes with INTERNALERROR / EXIT 3. Pin it like the APK lane. INPUT_PYTHON_VERSION: ${{ inputs.python_version }} run: | set -euxo pipefail @@ -525,7 +521,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --with flet-cli>=0.86.0.dev0 --with flet>=0.86.0.dev0 flet build ios-simulator -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" + uvx --prerelease allow --with 'flet-cli>=0.86.0.dev0' --with 'flet>=0.86.0.dev0' flet build ios-simulator -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on iOS Simulator if: matrix.platform == 'ios' && steps.detect-tests.outputs.has_tests == 'true' From e6a4376d07b70d52c93b677956b825a85778a86d Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Sat, 11 Jul 2026 15:37:24 +0200 Subject: [PATCH 9/9] update --- .github/workflows/build-wheels-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels-version.yml b/.github/workflows/build-wheels-version.yml index 30fab71..20c466f 100644 --- a/.github/workflows/build-wheels-version.yml +++ b/.github/workflows/build-wheels-version.yml @@ -480,7 +480,7 @@ jobs: ./tests/recipe-tester/stage_recipe.sh "$PKG_NAME" "$PKG_VERSION" cd tests/recipe-tester PIP_FIND_LINKS="$GITHUB_WORKSPACE/dist-test" \ - uvx --prerelease allow --with 'flet-cli>=0.86.0.dev0' --with 'flet>=0.86.0.dev0' flet build apk --arch x86_64 -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" + uvx --prerelease allow --with 'flet-cli>=0.86.0.dev0' --with 'flet>=0.86.0.dev0' flet build apk -vv --yes --python-version "$(echo "$INPUT_PYTHON_VERSION" | cut -d. -f1-2)" - name: Test on Android emulator (API 28, x86_64) if: matrix.platform == 'android' && steps.detect-tests.outputs.has_tests == 'true'