Skip to content

Commit d18ac6d

Browse files
thunderseethecopybara-github
authored andcommitted
Build bazel project as presubmit.
We don't have caching yet, pending GCP setup, so this might be too slow for a presubmit. It's easy to turn off if that turns out to be the case. PiperOrigin-RevId: 951521838
1 parent ebaef63 commit d18ac6d

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.6.0
1+
9.2.0

.github/workflows/rust.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,15 @@ jobs:
6969
cmake --build build --parallel
7070
cd build
7171
ctest --output-on-failure --parallel 2
72+
73+
test_bazel:
74+
75+
runs-on: ubuntu-latest
76+
77+
steps:
78+
- uses: actions/checkout@v6
79+
- name: Build Bazel test project
80+
run: |
81+
cd examples/build_systems/bazel
82+
bazel build --cxxopt=-std=c++20 //:main
7283
# LINT.ThenChange(//depot/copy.bara.sky)

examples/build_systems/bazel/rust_lib/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Part of the Crubit project, under the Apache License v2.0 with LLVM
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
use base64::alphabet::Alphabet;
45
use base64::engine::general_purpose::PAD;
5-
use base64::engine::{Alphabet, GeneralPurpose};
6+
use base64::engine::GeneralPurpose;
67
use std::path::{Path, PathBuf};
78

89
pub fn add(left: u64, right: u64) -> u64 {

rs_bindings_from_cc/bazel_support/compile_rust.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ def compile_rust(ctx, attr, src, extra_srcs, deps, crate_name, include_coverage,
120120
compile_data_targets = depset([]),
121121
owner = ctx.label,
122122
),
123-
extra_named_deps = extra_named_deps,
124123
rust_flags = remapped_flags,
125124
output_hash = output_hash,
126125
include_coverage = include_coverage,

0 commit comments

Comments
 (0)