Skip to content

Merge pull request #77 from fidoriel/fix-docs-hint-to-correct-package #313

Merge pull request #77 from fidoriel/fix-docs-hint-to-correct-package

Merge pull request #77 from fidoriel/fix-docs-hint-to-correct-package #313

Workflow file for this run

name: CI
on:
push:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Clang Format'
uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: '.'
extensions: 'h,cpp,c'
clangFormatVersion: 16
inplace: True
- name: 'Ensure no changes'
run: git diff --exit-code
- name: Update package database
run: sudo apt-get update
- name: Install CUnit
run: sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev
- name: Install libopaque dependencies
run: sudo apt-get install libsodium-dev pkgconf
- name: Install gRPC dependencies
run: sudo apt-get install build-essential autoconf libtool
- name: Install wolfssl dependencies
run: sudo apt-get install libtool autogen automake
- name: Install valgrind
run: sudo apt-get install valgrind
- name: Cache gRPC
id: cache-grpc
uses: actions/cache@v3
with:
path: ${{github.workspace}}/deps/grpc
key: ${{ runner.os }}-grpc
- name: Compile gRPC
if: steps.cache-grpc.outputs.cache-hit != 'true'
run: |
mkdir -p ${{github.workspace}}/deps && cd ${{github.workspace}}/deps
git clone --recurse-submodules -b v1.47.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
cd grpc
mkdir -p cmake/build && cd cmake/build
cmake ../.. -DgRPC_INSTALL=ON
make -j8
- name: Use gRPC
run: |
cd ${{github.workspace}}/deps/grpc/cmake/build
sudo make install
- name: Cache wolfssl
id: cache-wolfssl
uses: actions/cache@v3
with:
path: ${{github.workspace}}/deps/wolfssl
key: ${{ runner.os }}-wolfssl
- name: Compile wolfssl
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
run: |
mkdir -p ${{github.workspace}}/deps && cd ${{github.workspace}}/deps
git clone --recurse-submodules -b v5.2.0-stable --depth 1 --shallow-submodules https://github.com/wolfssl/wolfssl
cd wolfssl
./autogen.sh
./configure --enable-dtls --enable-debug --enable-certgen --enable-tls13 CFLAGS="-DHAVE_SECRET_CALLBACK" --enable-opensslextra
make
- name: Use wolfssl
run: |
cd ${{github.workspace}}/deps/wolfssl
sudo make install
- name: Set LD_LIBRARY_PATH
run: echo "LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH):/usr/local/lib" >> $GITHUB_ENV
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_RASTA_GRPC_BRIDGE=ON -DENABLE_RASTA_TLS=ON -DENABLE_RASTA_OPAQUE=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -v
- name: Rcat UDP Test
run: cd ${{github.workspace}} && ./examples/example_scripts/example_udp.sh
timeout-minutes: 1
- name: Rcat TCP Test
run: cd ${{github.workspace}} && ./examples/example_scripts/example_tcp.sh
timeout-minutes: 1
- name: Rcat TLS Test
run: cd ${{github.workspace}} && ./examples/example_scripts/example_tls.sh
timeout-minutes: 1
- name: Rcat DTLS Test
run: cd ${{github.workspace}} && ./examples/example_scripts/example_dtls.sh
timeout-minutes: 1
- name: Rcat KEX / Opaque Test
run: cd ${{github.workspace}} && ./examples/example_scripts/example_kex.sh
- name: CTest
run: cd ${{github.workspace}}/build && ctest . --output-on-failure
- name: Valgrind Memcheck
run: cd ${{github.workspace}}/build && ctest . -T memcheck --output-on-failure
- name: Configure CMake without extensions
# force full rebuild
run: rm -r ${{github.workspace}}/build && cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_RASTA_GRPC_BRIDGE=ON -DENABLE_RASTA_TLS=ON
- name: Build without extensions
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Rcat UDP Test without extensions
run: cd ${{github.workspace}} && ./examples/example_scripts/example_udp.sh
timeout-minutes: 1
- name: Rcat TCP Test without extensions
run: cd ${{github.workspace}} && ./examples/example_scripts/example_tcp.sh
timeout-minutes: 1
- name: Rcat TLS Test without extensions
run: cd ${{github.workspace}} && ./examples/example_scripts/example_tls.sh
timeout-minutes: 1
- name: Rcat DTLS Test without extensions
run: cd ${{github.workspace}} && ./examples/example_scripts/example_dtls.sh
timeout-minutes: 1
- name: CTest without extensions
run: cd ${{github.workspace}}/build && ctest .