10 Commits

Author SHA1 Message Date
Corentin Le Molgat
c001d3f9c4 deep rework (mostly ci and build system)
# Bazel
* rework .bazelrc

PiperOrigin-RevId: 886641509
2026-03-20 01:41:46 -07:00
Corentin Le Molgat
b122679b75 bazel: Bump bzlmod dependencies to prepare release 20240722.1
PiperOrigin-RevId: 728110894
2025-02-18 02:10:01 -08:00
Corentin Le Molgat
d1bd9b3ca4 deep rework (mostly ci and build system)
# Fix
* Fix `absl::monostate` support against C++14
* Fix `MSVC C2466` compilation error
  ref: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2466
* Fix `bazel test -c opt` run

# CMake
* Bump CMake minimal version to 3.18 to align with pybind11_protobuf and needed to work with pypa/manylinux image (ed need `Development.Module` option in `FindPython3`)
* rename `status` as `status_py_extension_stub` target to avoid conflict with abseil-cpp when fetched (ed cmake target are NOT scoped)<br>
  note: still provide the `pybind11_abseil::status` target alias.
* Disable C++ gnu extension.
* Rework third party management
  * disable test for dependencies BUT still allow to enable them for pybind11_abseil
  * Bump abseil-cpp from `20230802.0` to `20240722.0`
  * Bump pybind11 from master(floating) to `v2.13.6`
* Fix XCode build using `MODULE` in `pybind_extension`
* Fix Python support by not linking against the python library as manylinux images and PEP-513 require<br>
  ref: https://peps.python.org/pep-0513/#libpythonx-y-so-1

# Bazel
* Update dependencies in `MODULE.bazel` and `WORKSPACE`
  * Bump Protobuf to `v29.2`
* Add a `.bazelignore` to avoid to parse cmake's usual `build` directory
* Add a `.bazelrc` with default options (similar to the one in `pybind11_protobuf`)

# Update CI workflows
* Split CMake and Bazel workflows to get independent badges
* Split MacOS (amd64 and M1) and Windows (amd64) and Linux (amd64) jobs
* import ubuntu-build.yml from pybind11_protobuf

## Bazel
* Add C++14, c++17 and c++20 flavours
* Add `-c opt` and `-c dbg` variants
* only test against the default python3.11

## CMake
* Test Python 3.9, 3.10. 3.11, 3.12
* cmake(linux): Test Unix Makefile and Ninja Build generators
* cmake(macOS): Test XCode and Makefile generators
* cmake(windows): Test MSVC (VC 2022) generator

PiperOrigin-RevId: 721778070
2025-01-31 08:12:32 -08:00
Corentin Le Molgat
2420efdfdb Update gitignore
* Add bazel output dirs
* Add user bazelrc if any
* Add some IDE tmp files

PiperOrigin-RevId: 715957008
2025-01-15 14:55:28 -08:00
Corentin Le Molgat
3266d7b1bf bazel: cleanup MODULE.bazel
* follow abseil-cpp format style convention
2025-01-08 13:50:49 +01:00
Ralf W. Grosse-Kunstleve
d25d7b3f3a Pin pybind11_bazel to the same version currently used for pybind11_protobuf.
Leave it for later to resolve the `ubuntu-latest bazel` failure:

* https://github.com/pybind/pybind11_bazel/issues/94

```
ERROR: /home/runner/work/pybind11_abseil/pybind11_abseil/pybind11_abseil/tests/BUILD:92:17: Linking pybind11_abseil/tests/missing_import.so failed: (Exit 1): gcc failed: error executing CppLink command (from target //pybind11_abseil/tests:missing_import.so) /usr/bin/gcc @bazel-out/k8-fastbuild/bin/pybind11_abseil/tests/missing_import.so-2.params

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/usr/bin/ld.gold: undefs: unknown -z option
```

PiperOrigin-RevId: 659560021
2024-08-05 08:16:53 -07:00
Paul Wankadia
c873afb415 Readd bazel_skylib to MODULE.bazel.
It shouldn't be (and previously wasn't?!) needed, AFAIK, but
something about `use_repo_rule()` seems to require it now...

PiperOrigin-RevId: 617625049
2024-03-20 14:24:30 -07:00
Paul Wankadia
201a58f019 Omit bazel_skylib from MODULE.bazel.
pybind11_abseil doesn't need it; Abseil does.
(Therefore, leave it in `WORKSPACE` for now.)

PiperOrigin-RevId: 609405813
2024-02-22 09:52:22 -08:00
Paul Wankadia
3bd81db220 Update pybind11_abseil to reflect commit d5fd6e6 to pybind11_bazel.
I renamed Bazel files to have `.bazel` extensions, which matters
for pybind11_abseil due to its "floating" use of pybind11_bazel.

PiperOrigin-RevId: 608631652
2024-02-20 09:22:20 -08:00
pybind11_abseil authors
dfb81fec30 Added support for Bzlmod, indicated that WORKSPACE is deprecated and will be removed at a later date. Moved Python dependency support for Bazel from virtualenv to rules_python.
PiperOrigin-RevId: 607438140
2024-02-15 13:33:21 -08:00