Skip to content

Upgrade to Bazel 9 (#3) #7

Upgrade to Bazel 9 (#3)

Upgrade to Bazel 9 (#3) #7

Workflow file for this run

name: Bazel CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Test & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Bazel Cache
id: bazel-cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel-cache-${{ runner.os }}
- name: Run Lint
run: bazel test --config=lint //...
build-opt:
name: Test Optimized
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bazel-contrib/setup-bazel@0.14.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Bazel Cache
id: bazel-cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel-cache-${{ runner.os }}
- name: Run Optimized Tests
run: bazel test --compilation_mode=opt //...
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Check Build Formatting
run: bazel run buildfmt.check
- name: Check Code Formatting
run: bazel test --config=fmt //...