From deddeb98968d29149f47a48af7514c4d0998adba Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sun, 9 Jan 2022 10:15:08 +0100 Subject: [PATCH] Run all fuzz tests in a matrix configuration --- .github/workflows/build.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5bca9f53..26172fa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,6 +111,15 @@ jobs: fuzz: name: Fuzz test runs-on: ubuntu-latest + strategy: + matrix: + fuzz-target: + - fill_first_fit + - fill_optimal_fit + - wrap_first_fit + - wrap_optimal_fit + - wrap_optimal_fit_usize + steps: - name: Checkout repository uses: actions/checkout@v2 @@ -126,25 +135,16 @@ jobs: - name: Cache fuzz corpus uses: actions/cache@v2 with: - path: fuzz/corpus - key: fuzz-corpus-${{ github.run_id }} + path: fuzz/corpus/${{ matrix.fuzz-target }} + key: fuzz-corpus-${{ matrix.fuzz-target }}-${{ github.run_id }} restore-keys: | - fuzz-corpus- - - - name: Build fuzz targets - run: cargo fuzz build - - - name: Fuzz test wrap_first_fit - run: cargo fuzz run wrap_first_fit -- -max_total_time=30 - - - name: Fuzz test wrap_optimal_fit - run: cargo fuzz run wrap_optimal_fit -- -max_total_time=30 + fuzz-corpus-${{ matrix.fuzz-target }} - - name: Minimize wrap_first_fit corpus - run: cargo fuzz cmin wrap_first_fit + - name: Run fuzz test + run: cargo fuzz run ${{ matrix.fuzz-target }} -- -max_total_time=30 - - name: Minimize wrap_optimal_fit corpus - run: cargo fuzz cmin wrap_optimal_fit + - name: Minimize fuzz corpus + run: cargo fuzz cmin ${{ matrix.fuzz-target }} binary-sizes: name: Compute binary sizes