Skip to content

Commit

Permalink
Add basic build checks for fuzz tests
Browse files Browse the repository at this point in the history
Co-authored-by: Spencer Wilson <[email protected]>
Signed-off-by: Nathaniel Brough <[email protected]>
  • Loading branch information
nathaniel-brough and SWilson4 committed Oct 16, 2024
1 parent 516a3de commit 1a5b1f1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,37 @@ 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 \
-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 1a5b1f1

Please sign in to comment.