Commit da7965f
Phase 7: GitHub Actions CI with cibuildwheel and trusted-publisher
Five-job pipeline driven by .github/workflows/ci.yml, following the
pylu/pydgq pattern with wlsqm-specific adjustments:
1. lint (ubuntu-latest):
- ruff check . --ignore SIM103 (blocking)
- ruff check . --select SIM103 || true (advisory, non-blocking)
- cython-lint on every .pyx and .pxd, non-blocking (|| true)
so that advisory drift in the Cython layer does not block merges.
2. test (needs: lint) matrix: {linux, macOS, windows} x Python 3.11-3.14
- On macOS, `brew install libomp` before the build so meson's
`dependency('openmp', required: false)` can find it. If it still
cannot, the build falls back to serial (via the required:false
arg) and tests still pass.
- `pip install meson-python meson ninja Cython numpy scipy pytest`
then `pip install --no-build-isolation -e .` then `pytest tests/ -v`.
3. build-wheels (needs: test) matrix: {linux, macOS, windows}
- pypa/cibuildwheel@v3.4. Config lives in pyproject.toml
([tool.cibuildwheel]) from Phase 2: build cp311 through cp314,
skip 32-bit and musllinux, test-requires numpy+scipy+pytest,
test-command `pytest {project}/tests -v`, and the macOS
before-all that does `brew install libomp`.
- Wheels uploaded as `wheels-${{ matrix.os }}` artifacts.
4. sdist (needs: test) on ubuntu-latest:
- `python -m build --sdist` (the build backend is meson-python and
the sdist already ships the .pxd files so downstream cimport
users can build against it — verified locally).
- Uploaded as `sdist` artifact.
5. publish (needs: build-wheels + sdist) on refs/tags/v*:
- Environment `pypi` with `id-token: write` permission, using the
pypa/gh-action-pypi-publish@release/v1 trusted-publisher action.
- No PyPI API token stored as a GitHub secret; the job mints a
short-lived OIDC token via the trusted-publisher mechanism.
External setup still required (documented in the brief, needs to be
done on PyPI's side before the first tag push):
- Log in to pypi.org, register the `wlsqm` package name if not taken,
go to Publishing settings, add a trusted publisher with:
- Repository: Technologicat/python-wlsqm
- Workflow: ci.yml
- Environment: pypi
- On GitHub, create the `pypi` environment for this repo.
Dev-dep changes (pyproject.toml + pdm.lock):
- Add `build` so `python -m build --sdist` works locally for pre-
release sanity checks, matching the CI sdist step.
- Add `pyyaml` so that .github/workflows/*.yml can be validated from
the dev venv without a separate install.
Verified locally: ruff clean (blocking + SIM103), cython-lint clean,
pytest 57/57 green, `python -m build --sdist` produces a self-contained
wlsqm-1.0.0.tar.gz including every .pyx/.pxd and meson.build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2938571 commit da7965f
3 files changed
+220
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
144 | 149 | | |
0 commit comments