Giter Club home page Giter Club logo

codelabs's Introduction

Bazel Codelab

Before you get started

Take a look at these informational slides to learn about Bazel.

Section 1: Hello, Bazel!

  1. Edit: java/src/main/java/bazel/bootcamp/BUILD
  2. Add a java_binary target for the HelloBazelBootcamp.java file
  3. Run the binary using bazel run //java/src/main/java/bazel/bootcamp:HelloBazelBootcamp

Section 2: Go server

  1. The Go BUILD files can be fully generated by Gazelle. Run gazelle with bazel run //:gazelle
  2. Run the go binary using bazel run //go/cmd/server
  3. Go to http://localhost:8081 to see results (there won't be any logs yet): curl http://localhost:8081

Section 3: Java client

  1. Edit the BUILD file for logger.proto
  2. Edit the BUILD file for JavaLoggingClientLibrary.java
  3. Edit the BUILD file for JavaLoggingClient.java
  4. bazel run the Java binary you wrote
  5. bazel run the Go binary from Section 2
  6. Send messages from the client to the server and view them on http://localhost:8081

Section 4: Java client unit tests

  1. Edit the BUILD file for JavaLoggingClientLibraryTest.java
    HintNames matter for tests. The java_test for this file should be named JavaLoggingClientLibraryTest
  2. Edit the BUILD file for JavaLoggingClientTest.java
  3. Run the tests using bazel test

Section 6: Integration test

  1. Edit the BUILD file for integrationtest.sh
  2. Run the test using bazel test and make sure that it passes
  3. Run the test using bazel test <target> --runs_per_test=10 and make sure that it passes
    HintYou may need to modify the BUILD file again to make this work

Section 7: Query

  1. https://docs.bazel.build/versions/master/query-how-to.html

codelabs's People

Contributors

dkelmer avatar benjaminp avatar meteorcloudy avatar aiuto avatar laszlocsomor avatar rupertks avatar laurentlb avatar alexeagle avatar dslomov avatar eytankidron avatar jeromeduval-nam avatar hicksjoseph avatar meistert avatar yannic avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.