Skip to content

Commit

Permalink
Add basic build checks for fuzz tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Brough <nathaniel.brough@gmail.com>
  • Loading branch information
nathaniel-brough committed Sep 23, 2024
1 parent fe9e2c0 commit b84b961
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,38 @@ jobs:
- name: Build documentation
run: ninja gen_docs
working-directory: build


fuzzbuildcheck:
name: Check that code passes a basic fuzzing build
needs: [ workflowcheck, stylecheck, upstreamcheck ]
runs-on: ubuntu-latest
container: openquantumsafe/ci-ubuntu-latest:latest
env:
SIG_NAME: dilithium_2
CC: clang
CXX: clang++
CFLAGS: -fsanitize=fuzzer-no-link,address
LDFLAGS: -fsanitize=address
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Configure
run: |
mkdir build && \
cd build && \
cmake -GNinja -DOQS_STRICT_WARNINGS=ON \
-GNinja \
-DOQS_BUILD_FUZZ_TESTS=ON \
-DOQS_MINIMAL_BUILD="SIG_$SIG_NAME" \
--warn-uninitialized .. > config.log 2>&1 && \
cat config.log && \
cmake -LA -N .. && \
! (grep -i "uninitialized variable" config.log)
- name: Build code
run: ninja
working-directory: build

- name: Short fuzz check (30s)
run: ./tests/fuzz_test_dilithium2 -max_total_time=30
working-directory: build

0 comments on commit b84b961

Please sign in to comment.