feat: add support for bazel (#759)

This commit is contained in:
Jaya Kasa
2025-05-07 04:09:44 -04:00
committed by GitHub
parent 6325edefcf
commit a63f0c1ac3
7 changed files with 249 additions and 4 deletions

View File

@@ -107,6 +107,14 @@ jobs:
mkdir libs
cp libsnmallocshim*.so libs
for lib in `ls libs`; do echo; echo Testing $lib; ninja clean; LD_PRELOAD=libs/$lib ninja libsnmallocshim.so; done
- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache # Optional
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- run: bazel build -c opt //:snmalloc
- run: bazel build -c opt //:snmalloc-rs
# If this looks remarkably familiar, that's because it is. Sigh.
macos:
@@ -151,6 +159,14 @@ jobs:
mkdir libs
cp libsnmallocshim*.so libs
for lib in `ls libs`; do echo; echo Testing $lib; ninja clean; LD_PRELOAD=libs/$lib ninja libsnmallocshim.so; done
- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache # Optional
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- run: bazel build -c opt //:snmalloc
- run: bazel build -c opt //:snmalloc-rs
# GitHub doesn't natively support *BSD, but we can run them in VMs on Mac /
@@ -448,7 +464,6 @@ jobs:
run: ctest -j 2 --interactive-debug-mode 0 --output-on-failure -C ${{ matrix.build-type }} --timeout 400
timeout-minutes: 20
# Job to run clang-format and report errors
format:
runs-on: ubuntu-22.04
@@ -488,6 +503,13 @@ jobs:
run: cmake --build ${{github.workspace}}/build --target snmalloc-fuzzer
- name: Test
run: ${{github.workspace}}/build/fuzzing/snmalloc-fuzzer
- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache # Optional
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- run: bazel test -c opt --config=asan //fuzzing:snmalloc_fuzzer
self-vendored:
strategy: