Skip to content

Commit 9fbae77

Browse files
the-shankcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 961054038
1 parent 4e0d121 commit 9fbae77

71 files changed

Lines changed: 16332 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.bazelrc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ build:macos --macos_minimum_os=10.15
4444
# bazel run //bazel:setup_configs > fuzztest.bazelrc
4545
#
4646
try-import %workspace%/fuzztest.bazelrc
47+
48+
# Configure rules_rust to use the nightly channel toolchain by default.
49+
build --@rules_rust//rust/toolchain/channel:channel=nightly

‎.github/workflows/cargo_test.yml‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Cargo Test
16+
17+
on:
18+
push:
19+
branches:
20+
- main
21+
pull_request:
22+
schedule:
23+
# Triggered nightly at 8:00 AM UTC to reset the Bazel & Cargo caches.
24+
- cron: '0 8 * * *'
25+
workflow_dispatch:
26+
27+
env:
28+
CARGO_TERM_COLOR: always
29+
30+
permissions:
31+
contents: read
32+
33+
jobs:
34+
run_cargo_tests:
35+
name: Run Cargo tests
36+
runs-on: ubuntu-22.04
37+
timeout-minutes: 60
38+
steps:
39+
- name: Disable core dumping and piping due to slowness
40+
run: |
41+
sudo sysctl -w kernel.core_pattern=""
42+
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Install system dependencies
47+
run: |
48+
sudo apt-get update && sudo apt-get install -yq \
49+
clang
50+
51+
- name: Setup Rust toolchain
52+
uses: actions-rust-lang/setup-rust-toolchain@v1
53+
with:
54+
toolchain: nightly
55+
56+
- name: Restore Bazel cache
57+
uses: actions/cache/restore@v4
58+
with:
59+
path: "~/.cache/bazel"
60+
key: bazel-centipede-cache-cargo-test-${{ github.run_id }}
61+
restore-keys: |
62+
bazel-centipede-cache-cargo-test-
63+
bazel-centipede-cache-default-
64+
65+
- name: Build Centipede static library and binary with Bazel
66+
run: |
67+
bazel build -c opt //centipede:centipede_engine_static //centipede:centipede
68+
69+
- name: Run Cargo workspace tests
70+
env:
71+
FUZZTEST_LIB_PATH: ${{ github.workspace }}/bazel-bin/centipede
72+
CENTIPEDE_BINARY_PATH: ${{ github.workspace }}/bazel-bin/centipede/centipede
73+
run: |
74+
cargo test --locked --workspace --no-fail-fast -- --test-threads=1
75+
76+
- name: Save Bazel cache based on main
77+
if: github.ref == 'refs/heads/main'
78+
uses: actions/cache/save@v4
79+
with:
80+
path: "~/.cache/bazel"
81+
key: bazel-centipede-cache-cargo-test-${{ github.run_id }}

‎BUILD.bazel‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exports_files(["MODULE.bazel"])

0 commit comments

Comments
 (0)