From 8417026756c8777127ed3ae256d380ecd6ddcf49 Mon Sep 17 00:00:00 2001 From: patwie Date: Wed, 22 Jul 2026 22:09:11 +0000 Subject: [PATCH] ci: Document and verify Eigen 5 compatibility Agents and users integrating the Bazel module routinely misread the declared `eigen 3.4.0.bcr.3` dependency as a pin and conclude the library only works with old Eigen. Under bzlmod it is a minimum: version selection resolves to the highest Eigen requested anywhere in the module graph, and every BCR eigen release from 3.4.0 through 5.x shares compatibility_level 1. Make this explicit in the README integration section and next to the bazel_dep itself, and add a dedicated workflow that appends a single_version_override for the newest BCR Eigen 5 release and runs the full test suite, so the compatibility claim stays verified as new Eigen versions land. The override is appended in CI rather than committed because single_version_override is only honored in the root module and would otherwise force the pin on consumers. --- .github/workflows/eigen5.yml | 52 ++++++++++++++++++++++++++++++++++++ MODULE.bazel | 5 ++++ README.md | 13 ++++++++- 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/eigen5.yml diff --git a/.github/workflows/eigen5.yml b/.github/workflows/eigen5.yml new file mode 100644 index 0000000..43ce119 --- /dev/null +++ b/.github/workflows/eigen5.yml @@ -0,0 +1,52 @@ +name: Eigen 5 Compatibility + +# The Bazel module declares eigen 3.4.0.bcr.3 as its minimum, so the main +# CI workflow exercises the compatibility floor. This workflow verifies the +# other end of the supported range: it forces the module graph onto the +# newest Eigen 5 release in the BCR and runs the full test suite, keeping +# the "compatible with Eigen 3.4 through 5.x" claim in the README honest. + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + # Newest Eigen in the Bazel Central Registry. Bump when a new release + # lands: https://registry.bazel.build/modules/eigen + EIGEN_VERSION: 5.0.1.bcr.2 + +jobs: + eigen5: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Bazel 9 + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + + - name: Override Eigen to ${{ env.EIGEN_VERSION }} + # single_version_override is only honored in the root module, so it + # cannot live in the committed MODULE.bazel without also forcing the + # pin on consumers. Appending it here keeps the override CI-only. + run: | + cat >> MODULE.bazel <