1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-29 19:01:22 +00:00
pqcrypto/.github/workflows/main.yml

105 lines
2.6 KiB
YAML
Raw Normal View History

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,
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
- 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 &&
2022-07-11 17:56:44 +01:00
wget http://amongbytes.com/files/kat.zip
2021-03-25 18:44:54 +00:00
unzip kat.zip
2022-07-11 23:03:38 +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
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