initial version of SQIsign
Co-authored-by: Jorge Chavez-Saab <jorgechavezsaab@gmail.com> Co-authored-by: Maria Corte-Real Santos <36373796+mariascrs@users.noreply.github.com> Co-authored-by: Luca De Feo <github@defeo.lu> Co-authored-by: Jonathan Komada Eriksen <jonathan.eriksen97@gmail.com> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Antonin Leroux <18654258+tonioecto@users.noreply.github.com> Co-authored-by: Patrick Longa <plonga@microsoft.com> Co-authored-by: Lorenz Panny <lorenz@yx7.cc> Co-authored-by: Francisco Rodríguez-Henríquez <francisco.rodriguez@tii.ae> Co-authored-by: Sina Schaeffler <108983332+syndrakon@users.noreply.github.com> Co-authored-by: Benjamin Wesolowski <19474926+Calodeon@users.noreply.github.com>
This commit is contained in:
121
.github/workflows/cmake.yml
vendored
Normal file
121
.github/workflows/cmake.yml
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
name: CMake
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '*' ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
||||
# You can convert this to a matrix build if you need cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
sqisign_build_type: [opt]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install dependencies Valgrind, GMP, Doxygen, TeX
|
||||
run: |
|
||||
sudo apt --fix-missing install valgrind libgmp-dev doxygen texlive-xetex
|
||||
echo "Valgrind installed"
|
||||
|
||||
- name: Install Valgrind dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ValgrindCI
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }}
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Build documentation
|
||||
# Create html and latex documentation, TODO: do we need different docs for ref and opt?
|
||||
run: doxygen Doxyfile && cd latex && xelatex refman
|
||||
|
||||
- name: Upload latex documentation
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docs
|
||||
path: latex/refman.pdf
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Examples
|
||||
if: false
|
||||
working-directory: ${{github.workspace}}/build/apps
|
||||
run: |
|
||||
./PQCgenKAT_sign_lvl1
|
||||
./PQCgenKAT_sign_lvl1_varp6983
|
||||
./example_nistapi_lvl1
|
||||
./example_nistapi_lvl1_varp6983
|
||||
|
||||
- name: CT-Tests
|
||||
# TODO: re-enable for those tests that should be ct
|
||||
if: false
|
||||
run: |
|
||||
rm -rf build
|
||||
cmake -Bbuild -DENABLE_CT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }}
|
||||
cmake --build build
|
||||
# valgrind --track-origins=yes build/
|
||||
# valgrind --track-origins=yes build/
|
||||
# valgrind --track-origins=yes build/
|
||||
# valgrind --track-origins=yes build/
|
||||
|
||||
- name: Memcheck
|
||||
run: |
|
||||
rm -rf build
|
||||
cmake -Bbuild -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DSQISIGN_TEST_REPS=10
|
||||
cmake --build build
|
||||
ctest -T memcheck --test-dir build
|
||||
if: false
|
||||
|
||||
- name: Address Sanitizer ASAN
|
||||
run: |
|
||||
rm -rf build
|
||||
cmake -Bbuild -DCMAKE_BUILD_TYPE=ASAN -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DCMAKE_C_COMPILER=clang
|
||||
cmake --build build
|
||||
ctest -v --test-dir build
|
||||
|
||||
- name: Memory Sanitizer MSAN
|
||||
run: |
|
||||
rm -rf build
|
||||
cmake -Bbuild -DCMAKE_BUILD_TYPE=MSAN -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DCMAKE_C_COMPILER=clang
|
||||
cmake --build build
|
||||
ctest -v --test-dir build
|
||||
|
||||
- name: Leak Sanitizer LSAN
|
||||
run: |
|
||||
rm -rf build
|
||||
cmake -Bbuild -DCMAKE_BUILD_TYPE=LSAN -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DCMAKE_C_COMPILER=clang
|
||||
cmake --build build
|
||||
ctest -v --test-dir build
|
||||
|
||||
- name: Undefined Behavior Sanitizer UBSAN
|
||||
run: |
|
||||
rm -rf build
|
||||
cmake -Bbuild -DCMAKE_BUILD_TYPE=UBSAN -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DCMAKE_C_COMPILER=clang
|
||||
cmake --build build
|
||||
ctest -v --test-dir build
|
||||
Reference in New Issue
Block a user