No airbags, we die like a real men #365
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PQC | |
on: | |
- push | |
- pull_request | |
jobs: | |
unit-test: | |
name: Unit tests | |
runs-on: [ubuntu-20.04] | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
CMAKE_FLAGS: ${{matrix.flags}} | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
name: [ | |
gcc-release-build, | |
clang-release-build, | |
gcc-debug-build, | |
clang-debug-build, | |
clang-release-asan-build, | |
] | |
include: | |
- name: gcc-release-build | |
cc: gcc | |
cxx: g++ | |
flags: -DCMAKE_BUILD_TYPE=Release | |
- name: gcc-debug-build | |
cc: gcc | |
cxx: g++ | |
flags: -DCMAKE_BUILD_TYPE=Debug | |
- name: clang-release-build | |
cc: clang | |
cxx: clang++ | |
flags: -DCMAKE_BUILD_TYPE=Release | |
- name: clang-debug-build | |
cc: /usr/bin/clang | |
cxx: /usr/bin/clang++ | |
flags: -DCMAKE_BUILD_TYPE=Debug | |
- name: clang-release-asan-build | |
cc: clang | |
cxx: clang++ | |
flags: -DCMAKE_BUILD_TYPE=Release -DADDRSAN=1 | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: build | |
run: | | |
mkdir -p build | |
cd build | |
CC=${CC} CXX=${CXX} cmake ${CMAKE_FLAGS} .. | |
make | |
- name: run tests | |
run: | | |
cd build && ./ut | |
- name: Build Rust bindings | |
run: | | |
cd src/rustapi/pqc-sys && cargo build | |
KAT: | |
name: Known Answer Tests | |
runs-on: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: build | |
run: | | |
mkdir -p build | |
cd build | |
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release .. | |
make | |
- name: run tests | |
run: | | |
cd build && ./ut | |
- name: Build Rust bindings | |
run: | | |
cd src/rustapi/pqc-sys && cargo build | |
- name: Run KAT tests | |
run: | | |
cd test/katrunner && | |
wget http://www.amongbytes.com/files/kat.zip | |
unzip kat.zip | |
cargo run --release -- --katdir KAT | |
MEMSAN: | |
name: Memory Sanitizer build | |
runs-on: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: build | |
run: | | |
mkdir -p build | |
cd build | |
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DMEMSAN=1 -DCTSAN=1 .. | |
make | |
- name: run tests | |
run: | | |
cd build && ./ut |