20 Commits

Author SHA1 Message Date
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
d55e9d39aa scripts: cleanup
* fix some shellcheck
2025-01-10 10:38:45 +01:00
Corentin Le Molgat
b8ff43dbd7 scripts: add c++14 test
note: abseil 20240722 and Protbuf v29.x should be the last version supporting c++14
ref: 40084d5c4f
2025-01-08 13:50:49 +01:00
Corentin Le Molgat
a5cdf49057 bazel: Add .bazelrc
* support per-user options

note: since bazelrc `--cxxopts` is append after `BAZEL_CXXOPTS`,
you must use `--cxxopts` on the command line to override it...
note: same file than the one in pybind11_protobuf
2025-01-08 13:50:49 +01:00
Corentin Le Molgat
4113b4846d scripts: fix workspace mode when using bazel 8 2025-01-08 13:50:49 +01:00
Mizux Seiha
98112f51f9 scripts: fix typo 2025-01-08 13:50:49 +01:00
Ralf W. Grosse-Kunstleve
2c49cb53c1 cmake: Use requirements_lock_3_#.txt file (instead of requirements.in).
Fixes `build_and_test / ubuntu-latest cmake` failure as reported here:

* https://github.com/pybind/pybind11_abseil/pull/25#issuecomment-2173642297

PiperOrigin-RevId: 644276088
2024-06-18 00:28:58 -07:00
pybind11_abseil authors
ea2282d11c Add MODULE.bazel
Test Python dependencies now use rules_python
Update deps

PiperOrigin-RevId: 609605937
2024-02-22 21:36:47 -08:00
pybind11_abseil authors
2c3afa7cec Adopted https://github.com/pybind/pybind11_abseil/pull/17
PiperOrigin-RevId: 608701939
2024-02-20 12:43:04 -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
Ralf W. Grosse-Kunstleve
fc75e83b8d Add C++20 testing, remove C++14 testing.
Secondary changes:

* pybind11 needs to be pinned to a version right before https://github.com/pybind/pybind11/pull/4786 was merged, to avoid `ctest` `permission denied` errors (to be debugged separately).

* `find_package(PythonLibs REQUIRED)` is removed. It is deprecated (https://github.com/pybind/pybind11/blob/master/docs/faq.rst) and evidently not needed.

* More complete logging.

PiperOrigin-RevId: 595435856
2024-01-03 10:16:08 -08:00
Ralf W. Grosse-Kunstleve
878383384b Minor whitespace cleanup.
PiperOrigin-RevId: 557291840
2023-08-15 16:47:24 -07:00
pybind11_abseil authors
57fb4c7c98 Add CMake support
PiperOrigin-RevId: 557226797
2023-08-15 13:12:39 -07:00
Ralf W. Grosse-Kunstleve
41f3de4d6a Copy pybind11_protobuf/.pre-commit-config.yaml to pybind11_abseil/.pre-commit-config.yaml
This is to help with whitespace cleanup in the cmake files currently under development under https://github.com/pybind/pybind11_abseil/pull/7

PiperOrigin-RevId: 556026304
2023-08-11 11:29:31 -07:00
pybind11_abseil authors
6c3bd78977 Bump pinned Abseil to latest LTS (20230802.0). Remove C++ 11 support as newest Abseil does not support it.
PiperOrigin-RevId: 555248466
2023-08-09 12:57:17 -07:00
pybind11_abseil authors
95ec002750 Internal change
PiperOrigin-RevId: 419851159
2022-01-05 09:47:38 -08:00
Ken Oslund
8e9b6c5aed Internal change
PiperOrigin-RevId: 417662048
2021-12-21 11:46:54 -08:00
Jean-Baptiste Lespiau
add73a308f Make the scripts executable.
PiperOrigin-RevId: 348515833
2020-12-21 13:08:04 -08:00
pybind11_abseil authors
32cf30f118 Internal change
PiperOrigin-RevId: 348478233
2020-12-21 21:29:42 +01:00