All Projects → ngalaiko → bazel-action

ngalaiko / bazel-action

Licence: MIT license
A GitHub action to run @bazelbuild commands

Programming Languages

Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to bazel-action

Xchammer
XCHammer generates Xcode projects from a Bazel Workspace.
Stars: ✭ 195 (+983.33%)
Mutual labels:  bazel
Bazel Compilation Database
Tool to generate compile_commands.json from the Bazel build system
Stars: ✭ 236 (+1211.11%)
Mutual labels:  bazel
bazel-stack-vscode
VSCode Extension for Bazel
Stars: ✭ 50 (+177.78%)
Mutual labels:  bazel
Trunk
Make bazel an out of box solution for C++/Java developers
Stars: ✭ 203 (+1027.78%)
Mutual labels:  bazel
Rules python
Experimental Bazel Python Rules
Stars: ✭ 233 (+1194.44%)
Mutual labels:  bazel
Rules rust
Rust rules for Bazel
Stars: ✭ 241 (+1238.89%)
Mutual labels:  bazel
Starlark Rust
Starlark (https://github.com/bazelbuild/starlark) in Rust
Stars: ✭ 190 (+955.56%)
Mutual labels:  bazel
rules proto grpc
Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
Stars: ✭ 201 (+1016.67%)
Mutual labels:  bazel
Rules kotlin
Bazel rules for Kotlin
Stars: ✭ 235 (+1205.56%)
Mutual labels:  bazel
bazel-boost
A bazel workspace for using boost
Stars: ✭ 12 (-33.33%)
Mutual labels:  bazel
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (+1044.44%)
Mutual labels:  bazel
Rules k8s
This repository contains rules for interacting with Kubernetes configurations / clusters.
Stars: ✭ 222 (+1133.33%)
Mutual labels:  bazel
Bazel Watcher
Tools for building Bazel targets when source files change.
Stars: ✭ 245 (+1261.11%)
Mutual labels:  bazel
Rules haskell
Haskell rules for Bazel.
Stars: ✭ 196 (+988.89%)
Mutual labels:  bazel
bazel-maven-proxy
A local (read-only) proxy for Bazel to access Maven resources behind a secure repository or from the local Maven repository
Stars: ✭ 22 (+22.22%)
Mutual labels:  bazel
Podtobuild
An easy way to integrate CocoaPods into Bazel
Stars: ✭ 193 (+972.22%)
Mutual labels:  bazel
Index Import
Tool to import swiftc and clang index-store files into Xcode
Stars: ✭ 240 (+1233.33%)
Mutual labels:  bazel
Bazel bin
Bazel's pre-built binaries for armv7l / aarch64 / x86_64.
Stars: ✭ 23 (+27.78%)
Mutual labels:  bazel
bazel-emscripten
C++ to WASM or JS using Bazel and Emscripten
Stars: ✭ 40 (+122.22%)
Mutual labels:  bazel
rules openapi
🍃 bazel rules for generating code from openapi specifications
Stars: ✭ 49 (+172.22%)
Mutual labels:  bazel

DO NOT USE

The existence of this action is completely unnecessary when basilisk project exists, consider using it instead.

Cons:

name: CI

on:
  push: {}

jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1

    - name: Mount bazel cache
      uses: actions/cache@v1
      with:
        path: "/home/runner/.cache/bazel"
        key: bazel

    - name: Install bazelisk
      run: |
        curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
        mkdir -p "${GITHUB_WORKSPACE}/bin/"
        mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
        chmod +x "${GITHUB_WORKSPACE}/bin/bazel"

    - name: Test
      run: |
        "${GITHUB_WORKSPACE}/bin/bazel" test //...

    - name: Build
      run: |
        "${GITHUB_WORKSPACE}/bin/bazel" build //...

CI Status Docker Hub

Bazel Action

This actions allows you to run bazel commands.

How to use

Create a .github/workflows/workflow.yml file with the following contents:

on: push
name: My Action
jobs:
  checks:
    name: run
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master

    - name: run
      uses: ngalaiko/bazel-action/1.2.1@master
      with:
        args: build //...

with Arguments

Additional context can be passed to the bazel action with the with field. The following fields are supported:

with field Description
working_dir Sets the directory that bazel will run in.

bazel version

In order to speed up builds, ngalaiko/bazel-action/<version>@<tag> uses prebuilt images with installed bazel and all dependencies. Images are stored in the DockerHub.

If you need a specific bazel version, you can import it by changeing uses import path. For example:

uses: ngalaiko/bazel-action/2.0.0@master

or

uses: ngalaiko/bazel-action/1.2.1@master

If you need another version, please open an issue, or send a PR.

If you don't want to use a prebuild image, the action with the bazel's latest version is always accessible via

uses: ngalaiko/bazel-action@master

GitHub actions

You can read more about GitHub actions in the documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].