Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/macos-exporter-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ env:

jobs:
test-release-version:
runs-on: macos-14
# 15: GitHub stopped offering 14 in November 2026. It runs the exporter's whole suite, Tk
# included, so it stays on macOS; the two macOS-14-only decryptor tests skip here now.
runs-on: macos-15

# Only run this for exporter release tags. `macos-exporter-v` is the old spelling, still
# accepted by scripts/release_version.py so that existing tags and existing habits keep
Expand Down Expand Up @@ -128,7 +130,11 @@ jobs:
fail-fast: false
matrix:
include:
- runner: macos-14 # Apple Silicon
# Apple Silicon. 15 because GitHub no longer offers 14. Building on a newer macOS than
# users run is safe here for the same reasons the Intel job below is:
# MACOSX_DEPLOYMENT_TARGET, Homebrew's OpenSSL unlinked, and check_macos_min_version.py
# refusing any binary that would not start on 14.
- runner: macos-15
os: macos
arch: arm64
- runner: macos-15-intel # macos-13 no longer exists; this is the current x64 label
Expand Down Expand Up @@ -202,8 +208,8 @@ jobs:
# the binary demanded macOS 15. A uv-managed CPython carries tkinter, targets 11.0, and ships
# no OpenSSL dylib at all, which removes the offending file rather than arguing with it.
#
# The arm64 job only passed because its runner is macos-14 and 14.0 is the threshold; it would
# have failed the same way the moment GitHub moved that label to 15.
# The arm64 job only passed because its runner was macos-14 and 14.0 is the threshold; it would
# have failed the same way on 15, which is where it runs now.

- name: Install tkinter (Linux)
if: matrix.os == 'linux'
Expand All @@ -222,7 +228,7 @@ jobs:
# already fails harmlessly for `libssl.so.1.1.0` and `libssl.32.dylib` in every build that has
# ever succeeded - so not finding one more name is the normal case, not a new risk.
#
# The arm64 job was never green for a good reason either: its runner is macos-14, so the copy
# The arm64 job was never green for a good reason either: its runner was macos-14, so the copy
# it collected happened to be built for 14 and slipped under the threshold.
- name: Keep Homebrew's OpenSSL out of the bundle (macOS)
if: matrix.os == 'macos'
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/macos-scripts-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,39 @@
name: Exporter Tests

on:
# This file is in its own filter, which it was not: a change to the workflow alone ran nothing,
# so a broken edit here was first exercised by whoever next touched python/ (AGENTS.md rule 16).
push:
branches: [ "main" ]
paths:
- "python/**"
- ".github/workflows/macos-scripts-python.yml"
pull_request:
branches: [ "main" ]
paths:
- "python/**"
- ".github/workflows/macos-scripts-python.yml"
workflow_dispatch:

env:
PYTHONPATH: "${{ github.workspace }}/python:$PYTHONPATH"

jobs:
test:

runs-on: macos-14 # We *need* 14, this whole setup is only supported up to <= 14 (without weird security disabling hacks)
# **macOS 15, because GitHub no longer has 14.** `macos-14` stopped being offered in November
# 2026 ("The configuration 'macos-14-arm64-us-default' is not supported"), and with it every run
# of this workflow was cancelled before a step. It was there for two tests in
# test_airtag_decryptor.py, marked `skip_unless_macos_le14`: the macOS-local export route reads
# a key macOS 15 no longer hands out. Those two now skip here, and that is the coverage this
# gave up - they still run by hand on any Mac on 14 or older. Nothing else under python/ cares
# which macOS it is on.
runs-on: ${{ matrix.runner }}

strategy:
fail-fast: true
matrix:
runner: [ macos-15 ]
# 3.9 used to be here, because it is what the Xcode Command Line Tools install and so what
# anyone running the wizard from source on a stock Mac gets. It is gone because FindMy.py
# requires 3.10, and the iCloud export route is the whole point of this exporter now.
Expand All @@ -39,6 +52,12 @@ jobs:
# source - the VM bootstrap - now needs a Python installed first. The built .app is
# unaffected; it bundles its own interpreter.
python-version: ["3.10", "3.11", "3.12", "3.13"]
# **And Linux, where most people run the exporter**, which nothing tested before. One
# version is enough: what differs there is the platform, and the matrix above already
# covers the interpreters. Its Tk tests need a display, so it runs under Xvfb.
include:
- runner: ubuntu-latest
python-version: "3.13"

steps:
- name: Checkout code
Expand All @@ -59,6 +78,10 @@ jobs:
working-directory: ./python
run: uv sync --frozen --python ${{ matrix.python-version }}

- name: Install a display for the Tk tests (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y xvfb

- name: Lint with flake8
working-directory: . # run flake8 from repository root, so it picks up .flake8
run: |
Expand All @@ -69,7 +92,8 @@ jobs:
# Both suites: the wizard's own, and the shared export package's, which live with the package.
- name: Test with pytest
working-directory: ./python
run: uv run --frozen pytest ./test ./opentagviewer_export
# -rs, so the log says which tests skipped and why. xvfb-run only where there is no display.
run: ${{ runner.os == 'Linux' && 'xvfb-run -a ' || '' }}uv run --frozen pytest ./test ./opentagviewer_export -rs

# The release check reads VERSION out of main/version.py by parsing the module, so a refactor
# that makes it unreadable - moving it into a class, computing it from parts - would otherwise
Expand Down
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,16 +571,19 @@ with `widget.bind("<Key>")` rather than `event_generate`: a Toplevel under a wit
focus from nobody, so a generated keypress is dropped in silence and the test passes without
having pressed anything.

**CI runs them on one job in four.** The matrix is 3.10 to 3.13 on `macos-14`, and only its 3.13
has `_tkinter` — the other three skip both files at collection, so a green square there says
nothing about the window. `-rs` is what tells you which you got:
**CI runs them on two jobs in five.** The matrix is 3.10 to 3.13 on `macos-15`, plus 3.13 on
`ubuntu-latest` under Xvfb. Only the two 3.13 jobs have `_tkinter` — the other three skip both
files at collection, so a green square there says nothing about the window. `-rs` is what tells you
which you got, and CI passes it:

```bash
uv run pytest ./test -rs
```

`361 passed, 4 skipped` means Tk was missing and neither file ran. `378 passed, 2 skipped` means
they did, and the two remaining skips are the macOS-14-only decryptor tests.
Read the skip reasons rather than the count, which moves with every test added. `Requires macOS
version ≤ 14` is the two decryptor tests for the macOS-local route: **they skip in CI, always**,
since GitHub stopped offering macOS 14 runners in November 2026, and run only by hand on a Mac
that old. A skip naming `_tkinter` means the window tests did not run.

### Tooling tests

Expand Down Expand Up @@ -890,7 +893,7 @@ run regardless: each AES entry carries a fresh random salt.
| `static-checks.yml` | `app/**`, `scripts/**` changes | Translation check, pyright, tooling tests, Java import check. Seconds, no Android |
| `build-debug.yml` | Android build inputs change | Instrumented tests on an emulator, JVM tests, Chaquopy bridge tests, debug APK. Also publishes the generated Room schemas as `room-schemas`, so a version bump made without an Android toolchain can still commit the JSON rule 1 requires |
| `build-release.yml` | on release | Translation check, JVM tests, Chaquopy bridge tests, release APK |
| `macos-scripts-python.yml` | `python/**` changes | Exporter and shared-package tests across Python 3.10–3.13 on macOS 14 |
| `macos-scripts-python.yml` | `python/**` or its own changes, or by hand | Exporter and shared-package tests across Python 3.10–3.13 on macOS 15, and 3.13 on Ubuntu under Xvfb |
| `macos-exporter-python.yml` | on release | Tag/version check, exporter tests, and the PyInstaller build for macOS (both architectures), Windows and Linux |
| `exporter-build-check.yml` | PR and push to `main`, `python/**` | Builds the Windows binary and starts it. The release workflow above only runs on `release: published`, so without this a broken bundle is first run by whoever downloads it |
| `update-contributors.yml` | weekly, **and on merging a PR by anyone but the owner** | Regenerates the contributor list on the Information page, opens a PR if it changed. The merge run names who it expected to find and fails if GitHub's cached stats did not have them yet — the weekly run is still the guarantee |
Expand Down
Loading