Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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 //...
10 changes: 5 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ bazel_dep(
)
bazel_dep(
name = "rules_shell",
version = "0.3.0",
version = "0.4.0",
)
bazel_dep(
name = "rules_multirun",
version = "0.10.0",
version = "0.11.0",
)

bazel_dep(
Expand All @@ -28,7 +28,7 @@ bazel_dep(
###############################################################################
# C++
###############################################################################
bazel_dep(name = "toolchains_llvm", version = "1.3.0")
bazel_dep(name = "toolchains_llvm", version = "1.4.0")

# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
Expand All @@ -47,12 +47,12 @@ register_toolchains("@llvm_toolchain//:all")
###############################################################################
# Rust
###############################################################################
bazel_dep(name = "rules_rust", version = "0.57.1")
bazel_dep(name = "rules_rust", version = "0.60.0")

# Rust toolchain
RUST_EDITION = "2021"

RUST_VERSION = "1.84.0"
RUST_VERSION = "1.86.0"

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
Expand Down
Loading
Loading