Skip to content
Open
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
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bazel
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
common --enable_bzlmod
test --test_output=errors

# The C++ toolchain (clang from the LLVM tree) and all ABI-critical flags are
# centralized in the cppjit_bazel module, which registers @llvm//:cc_toolchain.
# No per-repo compiler wiring needed.
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.3.1
51 changes: 51 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Best-effort, NON-GATING Bazel build. The supported build is setup.py/CMake;
# this job never blocks a PR (continue-on-error). The build and test steps run
# for real and surface a regression as a warning, not a false green.
#
# The build is standalone: CppInterOp comes from the pinned commit in
# MODULE.bazel, so no sibling clone is needed. Only LLVM comes from the host.
name: bazel (best-effort)

on:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: read

jobs:
bazel:
name: bazel (best-effort) llvm${{ matrix.llvm }}
runs-on: ubuntu-24.04
continue-on-error: true
strategy:
fail-fast: false
matrix:
llvm: ["22"]
steps:
- name: Checkout cppjit
uses: actions/checkout@v7

- name: Setup LLVM ${{ matrix.llvm }}
uses: compiler-research/ci-workflows/actions/setup-llvm@main
with:
version: ${{ matrix.llvm }}
os: ubuntu-24.04

- name: Point LLVM_DIR at the tree root for the @llvm Bazel extension
run: |
# setup-llvm sets LLVM_DIR=<prefix>/lib/cmake/llvm (CMake convention);
# bazel/llvm.bzl needs the tree root holding bin/llvm-config.
echo "LLVM_DIR=${GITHUB_WORKSPACE}/install" >> "$GITHUB_ENV"

- name: bazel build //...
run: |
bazelisk build //... \
|| echo "::warning::bazel build //... failed (best-effort, non-gating)"

- name: bazel test //...
run: |
bazelisk test //... \
|| echo "::warning::bazel test //... failed (best-effort, non-gating)"
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ venv/
.envrc
.python-version

# Bazel convenience symlinks and module lock
/bazel-bin
/bazel-out
/bazel-testlogs
/bazel-cppjit
MODULE.bazel.lock

# Editors / OS
.idea/
.vscode/
Expand Down
Loading
Loading