Skip to content

Commit

Permalink
Add fuzz to CI (#690)
Browse files Browse the repository at this point in the history
* Add fuzz to CI

* Change compiler to clang++

* Fix flag name

* Remove fuzzing from a requirement.

* Update to checkout v4
  • Loading branch information
mjp41 authored Nov 19, 2024
1 parent 0b53b93 commit e343232
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.variant }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: "sudo apt install ninja-build"

Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.extra-cmake-flags }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
# The homebrew packages are broken at the moment and error out
# after trying to install Python as a dependency of ninja because
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
runs-on: ubuntu-22.04
name: FreeBSD-${{ matrix.os.version}} ${{ matrix.build-type }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.os.version}}
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
runs-on: ubuntu-22.04
name: NetBSD-${{ matrix.os.version}} ${{ matrix.build-type }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: vmactions/netbsd-vm@v1
with:
release: ${{ matrix.os.version}}
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
# runs-on: macos-latest
# name: OpenBSD-${{ matrix.os.version}} ${{ matrix.build-type }}
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - uses: vmactions/openbsd-vm@v0
# with:
# release: ${{ matrix.os.version}}
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.variant }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: ${{ matrix.dependencies }}

Expand Down Expand Up @@ -323,7 +323,7 @@ jobs:
runs-on: ${{matrix.arch.host-os}}
name: ${{matrix.build-type}} cross-build for ${{ matrix.arch.triple }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Install cross-compile toolchain and QEMU (ubuntu-20.04)"
# Install the dependencies and clang 13. Earlier versions of clang don't
# find the multilib things for this week's Ubuntu filesystem layout.
Expand Down Expand Up @@ -443,7 +443,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.build-type }} ${{ matrix.toolchain }} ${{ matrix.variant }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -A ${{ matrix.arch }} ${{ matrix.toolchain }} ${{ matrix.extra-cmake-flags }} -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On
Expand All @@ -463,7 +463,7 @@ jobs:
runs-on: ubuntu-22.04
# We don't need to do the build for this job, but we need to configure it to get the clang-format target
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install clang-tidy and clang-format
run: |
sudo apt update
Expand All @@ -485,8 +485,20 @@ jobs:
exit 1
fi
fuzzing:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DSNMALLOC_ENABLE_FUZZING=ON -DFUZZTEST_FUZZING_MODE=ON -DCMAKE_CXX_COMPILER=clang++
- name: Build
run: cmake --build ${{github.workspace}}/build --target snmalloc-fuzzer
- name: Test
run: ${{github.workspace}}/build/fuzzing/snmalloc-fuzzer

all-checks:
# Currently FreeBSD and NetBSD CI are not working, so we do not require them to pass.
# Add fuzzing back when the memove issue is fixed.
needs: [ubuntu, macos, freebsd, netbsd, sanitizer, qemu-crossbuild, windows, format]
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit e343232

Please sign in to comment.