Co-authored-by: Marius A. Aardal <marius.andre.aardal@gmail.com> Co-authored-by: Gora Adj <gora.adj@tii.ae> Co-authored-by: Diego F. Aranha <dfaranha@cs.au.dk> Co-authored-by: Andrea Basso <sqisign@andreabasso.com> Co-authored-by: Isaac Andrés Canales Martínez <icanalesm0500@gmail.com> Co-authored-by: Jorge Chávez-Saab <jorgechavezsaab@gmail.com> Co-authored-by: Maria Corte-Real Santos <mariascrsantos98@gmail.com> Co-authored-by: Luca De Feo <github@defeo.lu> Co-authored-by: Max Duparc <max.duparc@epfl.ch> Co-authored-by: Jonathan Komada Eriksen <jonathan.eriksen97@gmail.com> Co-authored-by: Décio Luiz Gazzoni Filho <decio@decpp.net> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Antonin Leroux <antonin.leroux@polytechnique.org> Co-authored-by: Patrick Longa <plonga@microsoft.com> Co-authored-by: Luciano Maino <mainoluciano.96@gmail.com> Co-authored-by: Michael Meyer <michael@random-oracles.org> Co-authored-by: Hiroshi Onuki <onuki@mist.i.u-tokyo.ac.jp> Co-authored-by: Lorenz Panny <lorenz@yx7.cc> Co-authored-by: Giacomo Pope <giacomopope@gmail.com> Co-authored-by: Krijn Reijnders <reijnderskrijn@gmail.com> Co-authored-by: Damien Robert <damien.robert@inria.fr> Co-authored-by: Francisco Rodríguez-Henriquez <francisco.rodriguez@tii.ae> Co-authored-by: Sina Schaeffler <sschaeffle@student.ethz.ch> Co-authored-by: Benjamin Wesolowski <benjamin.wesolowski@ens-lyon.fr>
189 lines
8.7 KiB
YAML
189 lines
8.7 KiB
YAML
name: Known Answer Tests (KAT)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
commit_sha:
|
|
description: 'The commit SHA to run the workflow on'
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
x86-KAT:
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
strategy:
|
|
matrix:
|
|
compiler: [gcc]
|
|
build_type: [Release]
|
|
platform: [x64]
|
|
#fast_math: [-ffast-math, -fno-fast-math]
|
|
#fp_contract: [-ffp-contract=on, -ffp-contract=fast, -ffp-contract=off]
|
|
fast_math: [""]
|
|
fp_contract: [""]
|
|
toolchain: ["", ".cmake/32bit.cmake"]
|
|
sqisign_build_type: [ref]
|
|
gf_radix: [AUTO, 32]
|
|
gmp_library: [SYSTEM, MINI]
|
|
|
|
runs-on: [self-hosted, "${{ matrix.platform }}"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.inputs.commit_sha }}
|
|
|
|
## - name: Install dependencies Valgrind, GMP, Doxygen, TeX, gcc-multilib
|
|
## run: |
|
|
## sudo apt update && sudo apt --fix-missing install valgrind libgmp-dev doxygen texlive-xetex gcc-multilib
|
|
|
|
- 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_C_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DGF_RADIX=${{ matrix.gf_radix }} -DGMP_LIBRARY=${{ matrix.gmp_library }} ${{ matrix.toolchain && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.toolchain) || '' }} -DCMAKE_C_FLAGS="${{ matrix.fast_math }} ${{ matrix.fp_contract }}"
|
|
|
|
- name: Build
|
|
# Build your program with the given configuration
|
|
run: |
|
|
if [ -n "${{ matrix.toolchain }}" ]; then
|
|
cp ~/gmp-6.3.0.tar.xz ${{github.workspace}}/build/libgmp/src
|
|
fi
|
|
cmake --build ${{github.workspace}}/build --parallel 8 --config ${{matrix.build_type}}
|
|
|
|
- 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 -R KAT$ -j3 -C ${{matrix.build_type}}
|
|
|
|
broadwell-KAT:
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
strategy:
|
|
matrix:
|
|
compiler: [clang, gcc]
|
|
build_type: [Release]
|
|
platform: [x64]
|
|
#fast_math: [ON, OFF]
|
|
#fp_contract: [ON, FAST, OFF]
|
|
fast_math: [""]
|
|
fp_contract: [""]
|
|
toolchain: [""]
|
|
sqisign_build_type: [broadwell]
|
|
gf_radix: [AUTO]
|
|
gmp_library: [SYSTEM, MINI]
|
|
|
|
runs-on: [self-hosted, "${{ matrix.platform }}"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
## - name: Install dependencies Valgrind, GMP, Doxygen, TeX, gcc-multilib
|
|
## run: |
|
|
## sudo apt update && sudo apt --fix-missing install valgrind libgmp-dev doxygen texlive-xetex gcc-multilib
|
|
|
|
- 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_C_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DGF_RADIX=${{ matrix.gf_radix }} -DGMP_LIBRARY=${{ matrix.gmp_library }} ${{ matrix.toolchain && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.toolchain) || '' }} -DCMAKE_C_FLAGS="${{ matrix.fast_math }} ${{ matrix.fp_contract }}"
|
|
|
|
- name: Build
|
|
# Build your program with the given configuration
|
|
run: |
|
|
if [ -n "${{ matrix.toolchain }}" ]; then
|
|
cp ~/gmp-6.3.0.tar.xz ${{github.workspace}}/build/libgmp/src
|
|
fi
|
|
cmake --build ${{github.workspace}}/build --parallel 8 --config ${{matrix.build_type}}
|
|
|
|
- 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 -R KAT$ -j3 -C ${{matrix.build_type}}
|
|
|
|
arm64-KAT:
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
strategy:
|
|
matrix:
|
|
compiler: [clang, gcc]
|
|
build_type: [Release]
|
|
platform: [arm64]
|
|
#fast_math: [ON, OFF]
|
|
#fp_contract: [ON, FAST, OFF]
|
|
fast_math: [""]
|
|
fp_contract: [""]
|
|
toolchain: [""]
|
|
sqisign_build_type: [ref]
|
|
gf_radix: [AUTO]
|
|
gmp_library: [SYSTEM, MINI]
|
|
|
|
runs-on: [self-hosted, "${{ matrix.platform }}"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
## - name: Install dependencies Valgrind, GMP, Doxygen, TeX, gcc-multilib
|
|
## run: |
|
|
## sudo apt update && sudo apt --fix-missing install valgrind libgmp-dev doxygen texlive-xetex gcc-multilib
|
|
|
|
- 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_C_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DGF_RADIX=${{ matrix.gf_radix }} -DGMP_LIBRARY=${{ matrix.gmp_library }} ${{ matrix.toolchain && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.toolchain) || '' }} -DCMAKE_C_FLAGS="${{ matrix.fast_math }} ${{ matrix.fp_contract }}"
|
|
|
|
- name: Build
|
|
# Build your program with the given configuration
|
|
run: |
|
|
if [ -n "${{ matrix.toolchain }}" ]; then
|
|
cp ~/gmp-6.3.0.tar.xz ${{github.workspace}}/build/libgmp/src
|
|
fi
|
|
cmake --build ${{github.workspace}}/build --parallel 8 --config ${{matrix.build_type}}
|
|
|
|
- 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 -R KAT$ -j3 -C ${{matrix.build_type}}
|
|
|
|
DebugKAT:
|
|
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
|
strategy:
|
|
matrix:
|
|
compiler: [clang, gcc]
|
|
build_type: [Debug]
|
|
platform: [x64]
|
|
#fast_math: [OFF]
|
|
#fp_contract: [FAST]
|
|
fast_math: [""]
|
|
fp_contract: [""]
|
|
toolchain: [""]
|
|
sqisign_build_type: [ref, broadwell]
|
|
gf_radix: [AUTO]
|
|
gmp_library: [SYSTEM]
|
|
|
|
runs-on: [self-hosted, "${{ matrix.platform }}"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
## - name: Install dependencies Valgrind, GMP, Doxygen, TeX, gcc-multilib
|
|
## run: |
|
|
## sudo apt update && sudo apt --fix-missing install valgrind libgmp-dev doxygen texlive-xetex gcc-multilib
|
|
|
|
- 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_C_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSQISIGN_BUILD_TYPE=${{ matrix.sqisign_build_type }} -DGF_RADIX=${{ matrix.gf_radix }} -DGMP_LIBRARY=${{ matrix.gmp_library }} ${{ matrix.toolchain && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.toolchain) || '' }} -DCMAKE_C_FLAGS="${{ matrix.fast_math }} ${{ matrix.fp_contract }}"
|
|
|
|
- name: Build
|
|
# Build your program with the given configuration
|
|
run: |
|
|
if [ -n "${{ matrix.toolchain }}" ]; then
|
|
cp ~/gmp-6.3.0.tar.xz ${{github.workspace}}/build/libgmp/src
|
|
fi
|
|
cmake --build ${{github.workspace}}/build --parallel 8 --config ${{matrix.build_type}}
|
|
|
|
- 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 -R KAT$ -j3 -C ${{matrix.build_type}}
|
|
|