2021-03-24 23:39:12 +00:00
|
|
|
name: PQC
|
|
|
|
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-test:
|
|
|
|
name: Unit tests
|
|
|
|
runs-on: [ubuntu-20.04]
|
2021-06-14 19:34:45 +01:00
|
|
|
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,
|
2021-06-17 08:27:29 +01:00
|
|
|
clang-release-asan-build,
|
|
|
|
clang-release-msan-build,
|
2021-06-14 19:34:45 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
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
|
2021-06-17 08:27:29 +01:00
|
|
|
- name: clang-release-asan-build
|
2021-06-14 21:16:14 +01:00
|
|
|
cc: clang
|
|
|
|
cxx: clang++
|
|
|
|
flags: -DCMAKE_BUILD_TYPE=Release -DADDRSAN=1
|
2021-06-17 08:27:29 +01:00
|
|
|
- name: clang-release-msan-build
|
|
|
|
cc: clang
|
|
|
|
cxx: clang++
|
|
|
|
flags: -DCMAKE_BUILD_TYPE=Release -DMEMSAN=1
|
2021-03-24 23:39:12 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: build
|
|
|
|
run: |
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2021-06-14 19:34:45 +01:00
|
|
|
CC=${CC} CXX=${CXX} cmake ${CMAKE_FLAGS} ..
|
2021-03-24 23:39:12 +00:00
|
|
|
make
|
|
|
|
- name: run tests
|
|
|
|
run: |
|
2021-03-24 23:55:30 +00:00
|
|
|
cd build && ./ut
|
2021-03-25 00:08:14 +00:00
|
|
|
- name: Build Rust bindings
|
|
|
|
run: |
|
|
|
|
cd src/rustapi/pqc-sys && cargo build
|
2021-06-17 07:48:44 +01:00
|
|
|
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
|
2021-03-25 18:44:54 +00:00
|
|
|
- name: Run KAT tests
|
|
|
|
run: |
|
|
|
|
cd test/katrunner &&
|
|
|
|
curl http://amongbytes.com/~flowher/permalinks/kat.zip --output kat.zip
|
|
|
|
unzip kat.zip
|
2021-05-25 12:30:35 +01:00
|
|
|
cargo run --release -- --katdir KAT
|