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
67 changes: 66 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,71 @@ on:
branches: [ master ]

jobs:
rust-candidate:
name: Rust candidate (Bazel ${{ matrix.bazel }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
bazel: ['8.x', '9.x']
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: ^1.17
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest
- uses: actions/checkout@v4
- name: Check Cargo build and tests
run: |
cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --lib --bins --locked
- name: Check Bazel build and tests
env:
USE_BAZEL_VERSION: ${{ matrix.bazel }}
CARGO_BAZEL_ISOLATED: 'false'
run: ~/go/bin/bazelisk test //:rust_tests //tools:benchmark_test --enable_bzlmod=true --enable_workspace=false

rust-candidate-e2e:
name: Rust candidate E2E
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: ^1.17
- name: Setup Bazelisk
run: go install github.com/bazelbuild/bazelisk@latest
- uses: actions/checkout@v4
- name: Run native behavioral suite
env:
USE_BAZEL_VERSION: '8.x'
run: cargo test --locked --test e2e -- --test-threads=1

rust-candidate-msrv:
name: Rust candidate MSRV
runs-on: ubuntu-latest
steps:
- name: Setup Rust 1.85
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.85.0'
- uses: actions/checkout@v4
- name: Check declared minimum Rust version
run: cargo check --locked

test-jre21:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -62,7 +127,7 @@ jobs:
if [ -n "${BAZEL_OUTPUT_USER_ROOT:-}" ]; then
BAZEL_STARTUP=(--output_user_root="${BAZEL_OUTPUT_USER_ROOT}")
fi
~/go/bin/bazelisk "${BAZEL_STARTUP[@]}" coverage --combined_report=lcov //cli/... //tools:coverage_check_test //tools/coverage/... //tools/go/... --enable_bzlmod=true --enable_workspace=false
~/go/bin/bazelisk "${BAZEL_STARTUP[@]}" coverage --combined_report=lcov //cli/... //src:cli_tests //src:rust_tests //tools:coverage_check_test //tools/coverage/... //tools/go/... --enable_bzlmod=true --enable_workspace=false
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage_badge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run bazel-diff tests with coverage
env:
USE_BAZEL_VERSION: '9.x'
run: ~/go/bin/bazelisk coverage --combined_report=lcov //cli/... //tools:coverage_check_test --enable_bzlmod=true --enable_workspace=false
run: ~/go/bin/bazelisk coverage --combined_report=lcov //cli/... //src:cli_tests //src:rust_tests //tools:coverage_check_test --enable_bzlmod=true --enable_workspace=false
- name: Regenerate coverage badge
env:
USE_BAZEL_VERSION: '9.x'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ TAG=$1
mkdir -p archives
tar --exclude-vcs \
--exclude=bazel-* \
--exclude=target \
--exclude=.github \
--exclude=archives \
-zcf "archives/release.tar.gz" .
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ user.bazelrc
archives/
# Coverage HTML report (genhtml output from `make coverage-html`).
coverage-html/
/target/
# Claude Code local state (per-user settings + scratch worktrees).
# Skills under .claude/skills/ ARE checked in -- they're shared team docs --
# so this is a precise ignore list, not a blanket .claude/ ignore.
Expand Down
23 changes: 23 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
load("@rules_kotlin//kotlin:core.bzl", "define_kt_toolchain")
load("@rules_license//rules:license.bzl", "license")

exports_files(
[
"build.rs",
"rust/proto/analysis_v2.proto",
"rust/proto/build.proto",
],
visibility = ["//src:__pkg__"],
)

alias(
name = "bazel-diff",
actual = "//cli:bazel-diff",
)

alias(
name = "bazel-diff-rust",
actual = "//src:bazel-diff",
visibility = ["//visibility:public"],
)

test_suite(
name = "rust_tests",
tests = [
"//src:cli_tests",
"//src:rust_tests",
],
)

alias(
name = "format",
actual = "//cli/format:format",
Expand Down
Loading
Loading