Skip to content

Commit 1466491

Browse files
eduralphclaude
andcommitted
ci(windows): document gramps-vs-branch series caveat
conda-forge has no gramps 6.1 yet, so environment.yml's "gramps<6.1" pin resolves to 6.0.x on every branch. On maintenance/gramps61 the Windows lane therefore validates addons against gramps 6.0.x, not the branch's series. Git-building the matching gramps in the conda env (as the Linux CI image does) is not viable: gramps' own Windows build targets MSYS2 UCRT64, not conda, and the wheel build fails in build_intl when `msgfmt --xml` cannot locate the shared-mime-info/appstream ITS rules absent from the conda env. Add a non-failing "Report gramps-vs-branch series" step to the Windows job that surfaces the caveat in the log on every gramps61+ run. Addon tests needing series-exact gramps behaviour skip themselves on Windows (e.g. TMGimporter's real-DB import tests) and run on the Linux lane, which git-builds the branch's exact gramps. When 6.1 reaches conda-forge the pin picks it up and the caveat disappears. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7f8a839 commit 1466491

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/environment.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ dependencies:
1010
# installed at CI runtime by ci.yml's auto-derive step from .gpr.py
1111
# requires_mod — single source of truth. Keep only the stable base
1212
# here (Gramps + orjson for plugin registration).
13+
#
14+
# conda-forge has no gramps 6.1 yet, so on a maintenance/gramps61 (or later)
15+
# branch this resolves to 6.0.x — i.e. the Windows lane validates addons
16+
# against conda-forge's newest in-range gramps, not the branch's exact series
17+
# (the Linux CI image git-builds the exact series; conda-Windows cannot — see
18+
# ci.yml's "Report gramps-vs-branch series" step). When 6.1 reaches
19+
# conda-forge the pin picks it up automatically.
1320
- pip:
1421
- "gramps>=6.0,<6.1"
1522
- orjson

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ jobs:
378378
# -----------------------------------------------------------------
379379
unit-test-windows:
380380
name: Unit Tests (Windows)
381+
needs: setup
381382
runs-on: windows-latest
382383
defaults:
383384
run:
@@ -399,6 +400,32 @@ jobs:
399400
mamba list | head -30
400401
python -c "import gramps, gi; print('deps OK')"
401402
403+
- name: Report gramps-vs-branch series (Windows lane caveat)
404+
# The Linux lane git-builds the branch's exact gramps in its CI image
405+
# (.github/docker/gramps-ci/Dockerfile, PyPI-first/git-fallback). The
406+
# conda-forge Windows lane CANNOT match that: conda-forge has no gramps
407+
# 6.1 yet, and gramps' own Windows build targets MSYS2 UCRT64, not conda
408+
# — building 6.1 from git here fails in gramps' build hook (build_intl's
409+
# `msgfmt --xml` cannot locate the shared-mime-info/appstream ITS rules,
410+
# which are absent in the conda env). So on a maintenance/gramps61 (or
411+
# later) branch this lane validates addons against conda-forge's newest
412+
# in-range gramps (6.0.x today) rather than the branch's series. This
413+
# step surfaces that honestly; it does NOT fail. Addon tests that depend
414+
# on series-exact gramps behaviour skip themselves on Windows (e.g.
415+
# TMGimporter's real-DB import tests) and run on the Linux lane instead.
416+
# When gramps 6.1 reaches conda-forge, environment.yml's pin picks it up
417+
# and this caveat disappears on its own.
418+
run: |
419+
suffix="${{ needs.setup.outputs.branch_suffix }}" # e.g. gramps61
420+
digits="${suffix#gramps}" # e.g. 61
421+
want="${digits:0:1}.${digits:1}" # e.g. 6.1
422+
have="$(python -c 'from gramps.version import major_version; print(major_version)')"
423+
if [ "$want" = "$have" ]; then
424+
echo "conda-forge gramps $have matches branch series $want — addons tested against the branch's gramps"
425+
else
426+
echo "::warning::Windows lane: branch targets gramps $want but conda-forge ships $have; addons here are validated against $have. Full $want coverage is on the Linux lane (its CI image git-builds $want). See step comment for why conda-Windows cannot build $want."
427+
fi
428+
402429
- name: Install addon system deps (derived, conda-available subset)
403430
# Only the conda-forge-available subset (e.g. graphviz). The GTK 3 addon
404431
# GI libs (goocanvas/osm-gps-map/gexiv2) are NOT on conda-forge, so the

0 commit comments

Comments
 (0)