Skip to content

CI: GCC on Linux, oldest and newest Python per platform; Windows stays out - #96

Closed
mcencini wants to merge 4 commits into
mainfrom
claude/windows-ci-72sq34
Closed

mcencini wants to merge 4 commits into
mainfrom
claude/windows-ci-72sq34

Conversation

@mcencini

@mcencini mcencini commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Matteo · project thread

What changed

Before: the test matrix built Linux with clang (3.10, 3.12) and GCC 14 (3.12 with MKL), and macOS on 3.12. The docs gallery, CUDA build and Copilot setup built with clang. The CUDA wheel was loaded only from Python 3.12. The docs said Windows was unsupported because "BART does not build on it".

After: CI uses upstream BART's toolchains, GCC 14 on Linux and Apple's clang on macOS. Each platform tests Python 3.10 and 3.14 only (MKL on Linux 3.10, coverage on Linux 3.14). The docs gallery, CUDA build and Copilot setup build with GCC 14; the CUDA build keeps nvcc's host compiler at g++-12, the newest Ubuntu's nvcc accepts. The publish workflow loads the CUDA wheel from every Python from 3.10 to 3.14, as the CPU wheels are already tested on Linux x86_64 and macOS arm64. The Windows statement in AGENTS.md, the prerequisites pages and pyproject now gives the real reason.

Why

Windows was attempted on this branch and reverted. BART builds under MinGW GCC, and the resulting DLL loads into MSVC-built Python through the C ABI. But Windows is LLP64: BART keeps every dimension, size and byte stride in long, which is 32 bits there, so no array can exceed 2 GiB. No macro can widen it without editing BART. #define long long long breaks BART's long longs, a typedef breaks its unsigned longs, and optreg.c's sscanf("%lu") would still write 4 bytes. WSL2 remains the route.

Dropping Linux clang means the vendored Blocks runtime, which only clang on non-Apple systems uses, is no longer exercised in CI; CMake still supports that build.

Validation

  • ./scripts/lint.sh: clean.
  • Linux GCC 14 build, local suite: 1842 passed, 100 skipped, 12 failed only on optional modules missing from the local environment (TorchSim and friends).
  • CI on this PR, and a manual run of publish.yml on this branch (builds and tests every wheel, publishes nothing).

Public API and documentation

No API change. Updated AGENTS.md, docs/guides/user/prerequisites.md, docs/guides/developer/prerequisites.md and docs/guides/developer/pull-requests.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GEk7xWNYS2EqnCP1UMyzTg

CI's toolchains are upstream BART's: GCC 14 on Linux, Apple's clang on
macOS, and MSYS2's UCRT64 GCC on Windows.  The library builds there as a
self-contained DLL: BART's win/ port is compiled in, what MinGW lacks
(getsubopt, readlink, C11 threads) is supplied beside it, assertions
reach BART's error path through the C runtime's import slots, and the
GCC runtime, OpenMP and winpthreads are linked statically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GEk7xWNYS2EqnCP1UMyzTg
@mcencini mcencini self-assigned this Sep 28, 2026
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

BART builds under MinGW, but Windows' 32-bit long caps every array at
2 GiB and no macro can widen it without editing BART, so the Windows
build is reverted and the documentation says why.  The test matrix runs
3.10 and 3.14 on Linux (GCC 14) and macOS (clang); the CUDA wheel is
loaded from every supported Python, as the CPU wheels are tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GEk7xWNYS2EqnCP1UMyzTg
@mcencini mcencini changed the title Build and test on Windows; drop clang from Linux CI CI: GCC on Linux, oldest and newest Python per platform; Windows stays out Sep 28, 2026
@mcencini
mcencini marked this pull request as ready for review September 28, 2026 13:29
mcencini pushed a commit that referenced this pull request Sep 28, 2026
Linux CI, the documentation build, the CUDA build and the Copilot
environment use upstream BART's Linux toolchain, GCC 14, with nvcc's
host compiler at g++-12.  The CUDA wheel is loaded from each Python
from 3.10 to 3.14, as the CPU wheels are tested from each.  Carried
over from #96, which this supersedes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HV1XJrQxFRsusBwNuvwh3j

Copy link
Copy Markdown
Collaborator Author

Superseded. #98 brought Windows in as a real LLP64 port, and #99 carries over what this PR had that #98 lacked: GCC 14 on Linux CI, the docs and CUDA builds, and loading the CUDA wheel from every Python. Closing at Matteo's request.


Generated by Claude Code

@mcencini mcencini closed this Sep 28, 2026
mcencini added a commit that referenced this pull request Sep 28, 2026
…#99)

Linux CI, the documentation build, the CUDA build and the Copilot
environment use upstream BART's Linux toolchain, GCC 14, with nvcc's
host compiler at g++-12.  The CUDA wheel is loaded from each Python
from 3.10 to 3.14, as the CPU wheels are tested from each.  Carried
over from #96, which this supersedes.


Claude-Session: https://claude.ai/code/session_01HV1XJrQxFRsusBwNuvwh3j

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants