Skip to content

Commit

Permalink
Create matrix for fuzzing (#457)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
  • Loading branch information
Alan-Jowett and Alan Jowett committed May 9, 2024
1 parent 7c0f8ba commit 45aefaa
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/fuzzing.yml
Expand Up @@ -11,14 +11,16 @@ on:
- cron: '00 21 * * *'
workflow_dispatch: # Run manually


jobs:
build:
env:
platform: ubuntu-latest
arch: x86_64
strategy:
matrix:
platform:
- ubuntu-latest
arch:
- x86_64

runs-on: ${{ env.platform }}
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
Expand All @@ -27,7 +29,7 @@ jobs:

- name: Generate the cache key
id: cache_key
run: echo "VALUE=platform-${{ env.platform }}_arch=${{ env.arch }}_type=fuzzing" >> $GITHUB_OUTPUT
run: echo "VALUE=platform-${{ matrix.platform }}_arch=${{ matrix.arch }}_type=fuzzing" >> $GITHUB_OUTPUT

- name: Update the cache (ccache)
uses: actions/cache@v4.0.2
Expand All @@ -41,7 +43,7 @@ jobs:
ccache
- name: Install system dependencies (Linux)
if: env.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
Expand All @@ -55,25 +57,20 @@ jobs:
libboost-filesystem-dev \
libelf-dev
if [[ "${{ env.scan_build }}" == "true" ]] ; then
sudo apt-get install -y \
clang-tools
fi
if [[ "${{ env.arch }}" == "arm64" ]] ; then
if [[ "${{ matrix.arch }}" == "arm64" ]] ; then
sudo apt install -y \
g++-aarch64-linux-gnu \
gcc-aarch64-linux-gnu \
qemu-user
fi
- name: Build/install libbpf From Source
if: env.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-latest'
run: ./.github/scripts/build-libbpf.sh
shell: bash

- name: Install system dependencies (macOS)
if: env.platform == 'macos-11'
if: matrix.platform == 'macos-11'
run: |
brew install \
cmake \
Expand All @@ -90,7 +87,7 @@ jobs:
-G Ninja \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=${{ env.build_type }} \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DUBPF_ENABLE_LIBFUZZER=1 \
Expand All @@ -101,10 +98,6 @@ jobs:
run: |
export CCACHE_DIR="$(pwd)/ccache"
if [[ "${{ env.scan_build }}" == "true" ]] ; then
command_prefix="scan-build -o scan_build_report"
fi
${command_prefix} cmake \
--build build
Expand Down

0 comments on commit 45aefaa

Please sign in to comment.