Skip to content

Bazel protobuf and gtest #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 12, 2016
Merged

Conversation

wangkuiyi
Copy link
Collaborator

@wangkuiyi wangkuiyi commented Dec 11, 2016

Fixes #816

In this PR,

  1. I initialize Bazel WORKSPACE file to declare an external dependency to https://github.com/pubref/rules_protobuf, which implements the Google-style protobuf building rules.

    For more information please refer to this example repo: https://github.com/wangkuiyi/learn-bazel.

  2. I also add a simple package in /third_party/protobuf_test to demonstrate using protobuf and gtest.

  3. I updated the docker_install_en.rst documents to show how we can develop using Docker and Bazel.


Dear reviewers:

Please feel free to use Docker and Bazel to check this PR as described in my update to Docker document in this PR.

@wangkuiyi wangkuiyi changed the title Bazel protobuf Bazel protobuf and gtest Dec 11, 2016
This was referenced Dec 12, 2016
@wangkuiyi
Copy link
Collaborator Author

Following discussions in #819 (review), I changed WORKSPACE to use Google protobuf as the external dependency for protobuf. @reyoung @lipeng-unisound Please review.

Copy link
Collaborator

@reyoung reyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

# rules. This method comes from
# https://github.com/pubref/rules_protobuf#usage.
git_repository(
name = "org_pubref_rules_protobuf",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protobuf google官方有。

@reyoung
Copy link
Collaborator

reyoung commented Dec 12, 2016

The whole plan about bazel build, see #792.

@wangkuiyi We could edit the issue for every updates.

@wangkuiyi
Copy link
Collaborator Author

@reyoung Good point. To keep each PR a reasonablly small size, I splitted the work "incorporate glog, gtest, gflags, protobuf" listed in #792 into two:

  1. incorporate gtest and protobuf Incorporate gtest and protobuf #816
  2. incorporate glog and gflags Incorporate glog and gflags into Bazel #822

This PR fixes #816 . Since it incorporate gtest, someone else working on a PR fixing #822 can use gtest.

@reyoung reyoung merged commit 3b1acd2 into PaddlePaddle:develop Dec 12, 2016
@wangkuiyi wangkuiyi deleted the bazel-protobuf branch December 12, 2016 05:08
.. code-block:: bash

docker run \
-d # run the container in background mode \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backslash continues the comments to next lines, thus makes the docker run command wrong.

zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
wwbitejotunn pushed a commit to wwbitejotunn/Paddle that referenced this pull request Jun 21, 2024
tianyuzhou668 pushed a commit to tianyuzhou668/Paddle that referenced this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants