Skip to content

Commit dfe05be

Browse files
committed
add bazel fuzz testing to workflows
1 parent 193214e commit dfe05be

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ jobs:
110110
mkdir libs
111111
cp libsnmallocshim*.so libs
112112
for lib in `ls libs`; do echo; echo Testing $lib; ninja clean; LD_PRELOAD=libs/$lib ninja libsnmallocshim.so; done
113+
- uses: bazelbuild/setup-bazelisk@v3
114+
- name: Mount bazel cache # Optional
115+
uses: actions/cache@v4
116+
with:
117+
path: "~/.cache/bazel"
118+
key: bazel
119+
- run: bazel build -c opt //:snmalloc
120+
- run: bazel build -c opt //:snmalloc-rs
113121

114122
# If this looks remarkably familiar, that's because it is. Sigh.
115123
macos:
@@ -154,6 +162,14 @@ jobs:
154162
mkdir libs
155163
cp libsnmallocshim*.so libs
156164
for lib in `ls libs`; do echo; echo Testing $lib; ninja clean; LD_PRELOAD=libs/$lib ninja libsnmallocshim.so; done
165+
- uses: bazelbuild/setup-bazelisk@v3
166+
- name: Mount bazel cache # Optional
167+
uses: actions/cache@v4
168+
with:
169+
path: "~/.cache/bazel"
170+
key: bazel
171+
- run: bazel build -c opt //:snmalloc
172+
- run: bazel build -c opt //:snmalloc-rs
157173

158174

159175
# GitHub doesn't natively support *BSD, but we can run them in VMs on Mac /
@@ -457,6 +473,15 @@ jobs:
457473
working-directory: ${{ github.workspace }}/build
458474
run: ctest -j 2 --interactive-debug-mode 0 --output-on-failure -C ${{ matrix.build-type }} --timeout 400
459475
timeout-minutes: 20
476+
- uses: bazelbuild/setup-bazelisk@v3
477+
- name: Mount bazel cache # Optional
478+
uses: actions/cache@v4
479+
with:
480+
path: "~/.cache/bazel"
481+
key: bazel
482+
- run: bazel build -c opt //:snmalloc
483+
- run: bazel build -c opt //:snmalloc-rs
484+
460485

461486

462487
# Job to run clang-format and report errors
@@ -498,6 +523,13 @@ jobs:
498523
run: cmake --build ${{github.workspace}}/build --target snmalloc-fuzzer
499524
- name: Test
500525
run: ${{github.workspace}}/build/fuzzing/snmalloc-fuzzer
526+
- uses: bazelbuild/setup-bazelisk@v3
527+
- name: Mount bazel cache # Optional
528+
uses: actions/cache@v4
529+
with:
530+
path: "~/.cache/bazel"
531+
key: bazel
532+
- run: bazel test -c opt --config=asan //fuzzing:snmalloc_fuzzer
501533

502534
self-vendored:
503535
strategy:

0 commit comments

Comments
 (0)