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,
|
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-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: |
|
2021-06-20 21:36:11 +01:00
|
|
|
cd build && ./ut
|
2021-06-17 07:48:44 +01:00
|
|
|
- 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
|
2021-06-22 01:10:53 +01:00
|
|
|
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
|
2021-06-25 09:05:54 +01:00
|
|
|
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DMEMSAN=1 -DCTSAN=1 ..
|
2021-06-22 01:10:53 +01:00
|
|
|
make
|
|
|
|
- name: run tests
|
|
|
|
run: |
|
2021-06-23 08:00:42 +01:00
|
|
|
cd build && ./ut
|
2021-07-03 00:15:52 +01:00
|
|
|
SPEED:
|
2021-07-03 00:24:16 +01:00
|
|
|
name: Continuous Benchmarking
|
2021-07-03 00:15:52 +01:00
|
|
|
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 benchmarks
|
|
|
|
run: |
|
2021-07-03 00:24:16 +01:00
|
|
|
./build/test/bench/bench --benchmark_format=json | tee benchmark_result.json
|
2021-07-03 00:17:10 +01:00
|
|
|
- uses: rhysd/github-action-benchmark@v1
|
|
|
|
with:
|
|
|
|
tool: 'googlecpp'
|
|
|
|
output-file-path: benchmark_result.json
|