/bazel-pybind11

Bazel C++ Pybind11 Sample

Primary LanguageC++Apache License 2.0Apache-2.0

Github-CI: Build Status Build Status Build Status Build Status

Introduction

| Requirement | Codemap | Dependencies | Build | CI | Appendices | License |

Bazel C++ pybind11 sample with tests and GitHub CI support.

This project should run on GNU/Linux, MacOS and Windows.

Requirement

You'll need:

  • "Bazel >= 4.0".

Codemap

The project layout is as follow:

Build

To build this example you should use:

  • on UNIX:

    bazel build --cxxopt=-std=c++17 ...
  • on Windows when using MSVC:

    bazel build --cxxopt="-std:c++17" ...

Running Tests

To build this example you should use:

  • on UNIX:

    bazel test --cxxopt=-std=c++17 ...
  • on Windows when using MSVC:

    bazel test --cxxopt="-std:c++17" ...

CI Setup

Please take a look at .github/workflows to find the configuration file for each jobs.

To install bazel on each hosted runner, follow these links: ref: https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-windows-runners

Appendices

Few links on the subject...

Resources

Project layout:

  • The Pitchfork Layout Revision 1 (cxx-pflR1)

Bazel:

Misc

Image has been generated using plantuml:

plantuml -Tsvg docs/{file}.dot

So you can find the dot source files in docs.

License

Apache 2. See the LICENSE file for details.

Disclaimer

This is not an official Google product, it is just code that happens to be owned by Google.