Skip to content

Commit

Permalink
update cov
Browse files Browse the repository at this point in the history
runner

wip

add deps back

add deps back..properly

tweaks

clang ver

final tweak back
  • Loading branch information
nlgripto committed Dec 20, 2024
1 parent 6cd7cb0 commit 9b12e0f
Showing 1 changed file with 37 additions and 8 deletions.
45 changes: 37 additions & 8 deletions .github/workflows/clusterfuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,70 @@ jobs:
solfuzz-build-and-publish:
timeout-minutes: 30
runs-on:
group: github-v1
group: github-v1 #CHANGEME back after testing in fork
env:
MACHINE: linux_clang_haswell
OBJ_DIR: build/linux/clang/haswell
COV_BUILD_DIR: cov
COV_OBJ_DIR: build/cov
EXTRAS: fuzz asan
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: ./.github/actions/deps
with:
compiler: clang


- run: sudo apt update && sudo apt install -y zip

- uses: asymmetric-research/clusterfuzz-fuzzbot-builder@main
name: Build fuzz tests
name: Build shared object (+asan) for fd_exec_sol_compat*.so
with:
command: make -j -Otarget lib

- uses: asymmetric-research/clusterfuzz-fuzzbot-builder@main
name: Build shared objects with coverage enabled
env:
BUILDDIR: ${{ env.COV_BUILD_DIR }}
EXTRAS: fuzz llvm-cov
MACHINE: linux_clang_haswell
with:
command: make -j -Otarget lib

- name: List Artifacts

- name: List Artifacts, copy sources
run: |
ls ${{ env.OBJ_DIR }}/lib
ls ${{ env.COV_OBJ_DIR}}/lib
cd src && pwd > buildpwd && cd -
git config --global --add safe.directory /github/workspace/${{ env.OBJ_DIR}}/lib
sudo mkdir -p build/cov/lib
sudo chmod -R 777 build/cov/lib
cp -r src/ build/cov/lib/libfd_exec_sol_compat_src/
# we give it this path so that the glob hits.
cp -r src/ ${{ env.COV_OBJ_DIR}}/lib/libfd_exec_sol_compat_src/
# rename the coverage .so's so they don't overwrite on unpack.
mv ${{ env.COV_OBJ_DIR }}/lib/libfd_exec_sol_compat.so ${{ env.COV_OBJ_DIR }}/lib/libfd_exec_sol_compat_cov.so
# also the stubbed target
mv ${{ env.COV_OBJ_DIR }}/lib/libfd_exec_sol_compat_stubbed.so ${{ env.COV_OBJ_DIR }}/lib/libfd_exec_sol_compat_stubbed_cov.so
ls ${{ env.COV_OBJ_DIR}}/lib

- name: upload so artifact
- name: upload so artifacts
uses: actions/upload-artifact@v4
with:
path: ${{ env.OBJ_DIR }}/lib/libfd_exec_sol_compat.so
path: ${{ env.OBJ_DIR }}/lib/libfd_exec_sol_compat*.so
name: libfd_exec_sol_compat
retention-days: 14

- name: upload stubbed so artifact
- name: upload .so with cov
uses: actions/upload-artifact@v4
with:
path: ${{ env.OBJ_DIR }}/lib/libfd_exec_sol_compat_stubbed.so
name: libfd_exec_sol_compat_stubbed
path: ${{ env.COV_OBJ_DIR }}/lib/libfd_exec_sol_compat* # includes ${{ env.COV_OBJ_DIR}}/lib/libfd_exec_sol_compat_src/
name: libfd_exec_sol_compat_cov
retention-days: 14


Expand Down

0 comments on commit 9b12e0f

Please sign in to comment.