Skip to content

Commit

Permalink
add cpp linking test
Browse files Browse the repository at this point in the history
Signed-off-by: Aiden Fox Ivey <[email protected]>
Signed-off-by: Ry Jones <[email protected]>
  • Loading branch information
ryjones committed Oct 24, 2024
1 parent 7132473 commit acd9ad1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/cpp_linking_example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cpp_linking_example.cpp
31 changes: 30 additions & 1 deletion .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,36 @@ jobs:
run: ninja gen_docs
working-directory: build


cppcheck:
name: Check C++ linking with example program
runs-on: ubuntu-latest
container: openquantumsafe/ci-ubuntu-latest:latest
env:
KEM_NAME: ml_kem_768
SIG_NAME: ml_dsa_65
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_MINIMAL_BUILD="KEM_$KEM_NAME;SIG_$SIG_NAME" \
--warn-uninitialized .. > config.log 2>&1 && \
cat config.log && \
cmake -LA -N .. && \
! (grep -i "uninitialized variable" config.log)
- name: Build liboqs
run: ninja
working-directory: build
- name: Link with C++ program
run: /
g++ .github/cpp_linking_example.cpp -g -lcrypto \
-Iinclude lib/liboqs.a -o example_sig --std=c++11
working-directory: build

fuzzbuildcheck:
name: Check that code passes a basic fuzzing build
needs: [ workflowcheck, stylecheck, upstreamcheck ]
Expand Down

0 comments on commit acd9ad1

Please sign in to comment.