support PrivateKey serialization and add unit test for it #170
Workflow file for this run
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
# Copyright (C) 2021 Intel Corporation | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Build and Test | |
on: | |
# By default this will run when the activity type is "opened", "synchronize", | |
# or "reopened". | |
pull_request: | |
branches: | |
- main | |
- development | |
- "ipcl_v[0-9]+.[0-9]+.[0-9]+" | |
push: | |
branches: | |
- main | |
- development | |
- "ipcl_v[0-9]+.[0-9]+.[0-9]+" | |
# Manually run this workflow on any specified branch. | |
workflow_dispatch: | |
################### | |
# Define env vars # | |
################### | |
env: | |
IPCL_VER: 2.0.0 | |
IPCL_DIR: ${GITHUB_WORKSPACE}/ipcl_install | |
IPCL_HINT_DIR: > | |
-DIPCL_HINT_DIR=${GITHUB_WORKSPACE}/ipcl_install/lib/cmake/ipcl-${IPCL_VER} | |
jobs: | |
format: | |
name: Format check | |
runs-on: [self-hosted, linux, x64, icx, debian] | |
# Use environment protection (require review) | |
environment: intel_workflow | |
steps: | |
- uses: actions/checkout@v2 | |
# Add local bin for cpplint | |
- name: Setup | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: pre-commit | |
run: pre-commit run --all-files | |
build-and-test: | |
name: '${{ matrix.build_type }} qat=${{ matrix.enable_qat }} detect_cpu_runtime=${{ matrix.detect_cpu_runtime }} shared=${{ matrix.shared_lib }}' | |
needs: [format] | |
runs-on: [self-hosted, linux, x64, icx, debian] | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
build_type: [Release, Debug] | |
shared_lib: [ON, OFF] | |
detect_cpu_runtime: [ON, OFF] | |
# qat disabled for ICX - to be added with SPR runner | |
enable_qat: [OFF] | |
include: | |
# run minimum for debug mode | |
- build_type: Debug | |
benchmark_min_time: "--benchmark_min_time=0.001" | |
- build_type: Release | |
benchmark_min_time: "" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v1.13 | |
with: | |
cmake-version: '3.16.x' | |
- name: Validate environment | |
run: | | |
set -x | |
export CC=clang-10 | |
export CXX=clang++-10 | |
# Validate paths | |
whoami | |
echo $HOME | |
echo $GITHUB_WORKSPACE | |
echo "Testing from branch:" | |
echo $GITHUB_REF | |
cmake --version | |
pwd | |
- name: Build library | |
run: | | |
# QAT unavailable in ICX - to be added | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type}} \ | |
-DIPCL_DETECT_CPU_RUNTIME=${{ matrix.detect_cpu_runtime }} \ | |
-DIPCL_ENABLE_QAT=${{ matrix.enable_qat }} \ | |
-DCMAKE_INSTALL_PREFIX=./ipcl_install | |
cmake --build build -j$(nproc) | |
cmake --build build --target install | |
- name: Run unittest | |
run: | | |
cmake --build build --target unittest | |
- name: Run benchmark | |
run: | | |
./build/benchmark/bench_ipcl \ | |
--benchmark_out="${GITHUB_WORKFLOW}_${GITHUB_SHA}" \ | |
--benchmark_out_format=csv ${{ matrix.benchmark_min_time }} | |
- name: Build and run examples | |
run: | | |
cd $GITHUB_WORKSPACE/example | |
cmake -S . -B build ${{ env.IPCL_HINT_DIR }} | |
cmake --build build | |
cmake --build build --target run_all_examples | |
- name: Archive benchmark results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bench_ipcl_${{ github.sha }}.csv | |
path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }} | |
retention-days: 90 | |
# name: Build, test and run kernels - shared | |
# needs: [format] | |
# runs-on: [self-hosted, linux, x64, icx] | |
# defaults: | |
# run: | |
# shell: bash | |
# working-directory: . | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Validate paths | |
# run: | | |
# whoami | |
# echo $HOME | |
# echo $GITHUB_WORKSPACE | |
# echo "Testing from branch:" | |
# echo $GITHUB_REF | |
# pwd | |
# # Build library | |
# - name: Build the repository | |
# run: | | |
# cmake -S . -B build -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DIPCL_ENABLE_QAT=ON | |
# cmake --build build --target all -j | |
# # Unit tests and examples | |
# - name: Run the unit tests | |
# run: ./build/test/unittest_ipcl | |
# - name: Run the benchmarks | |
# run: ./build/benchmark/bench_ipcl | |
# build-and-test-static: | |
# name: Build, test and run kernels - static | |
# needs: [format] | |
# runs-on: [self-hosted, linux, x64, icx] | |
# defaults: | |
# run: | |
# shell: bash | |
# working-directory: . | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Validate paths | |
# run: | | |
# whoami | |
# echo $HOME | |
# echo $GITHUB_WORKSPACE | |
# echo "Testing from branch:" | |
# echo $GITHUB_REF | |
# pwd | |
# # Build library | |
# - name: Build the repository | |
# run: | | |
# cmake -S . -B build -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DIPCL_ENABLE_QAT=ON -DIPCL_SHARED=OFF | |
# cmake --build build --target all -j | |
# # Unit tests and examples | |
# - name: Run the unit tests | |
# run: ./build/test/unittest_ipcl | |
# - name: Run the benchmarks | |
# run: ./build/benchmark/bench_ipcl |