/multi-language-bazel-monorepo

Experimenting with bazel & multiple languages in a monorepo.

Primary LanguageStarlark

multi-language-bazel-monorepo

Getting Started with Bazel

I wanted to try to set up a multi-language monorepo using bazel for experimentation purposes. You can follow the journey on YouTube.

  1. Bazel Tutorial: (Part 1) Getting Started, Bazelisk & our First Build Targets
    1. Bazel overview.
    2. Installing & using bazelisk.
    3. WORKSPACE.bazel, BUILD.bazel & creating our first build targets.
  2. Bazel Tutorial: Python targets with py_library, py_test, py_binary (internal & external deps)
    1. Enabline Visual Studio Code Extension.
    2. rules_python.
    3. Creating simple python library without any external dependencies.
      1. py_library target.
      2. py_test target.
    4. Flask application.
      1. py_binary target.
      2. Using third party dependencies.
      3. Using dependencies from the monorepo.
    5. Discuss python version, hermetic etc.
  3. GitHub Actions for Bazel Monorepo - Building & Testing (CI).
  4. Bazel & Go Tutorial: Targets with go_library, go_test & go_binary (internal & external deps).
  5. Bazel & NodeJS Tutorial: library, test & nodejs_binary (internal & external deps).

Prerequisites

Useful Commands

Build all targets

  • bazel build //...

Run all test targets

  • bazel test //...

Run Python web app

Run Go web app

Run NodeJS web app