Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matrix of TLS engines, including wolfSSL #1923

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@ name: linux
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
tls:
- engine: mbed
pkg: libmbedtls-dev
dir: build.mbed
- engine: wolf
pkg: libwolfssl-dev
dir: build.wolf
name: build
runs-on: [ubuntu-latest]
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Install mbedTLS
run: sudo apt-get install libmbedtls-dev

- name: Install ninja
run: sudo apt-get install ninja-build

- name: Install TLS engine
run: sudo apt-get install ${{ matrix.tls.pkg }}

- name: Configure
run: mkdir build && cd build && cmake -G Ninja -D NNG_ENABLE_TLS=ON ..
run: mkdir ${{ matrix.tls.dir }} && cd ${{ matrix.tls.dir }} && cmake -G Ninja -D NNG_ENABLE_TLS=ON -DNNG_TLS_ENGINE=${{ matrix.tls.engine }} ..

- name: Build
run: cd build && ninja
run: cd ${{ matrix.tls.dir }} && ninja

- name: Test
run: cd build && ctest --output-on-failure
run: cd ${{ matrix.tls.dir }} && ctest --output-on-failure
6 changes: 3 additions & 3 deletions cmake/FindwolfSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ file(STRINGS ${WOLFSSL_INCLUDE_DIR}/wolfssl/version.h _WOLFSSL_VERLINE
REGEX "^#define[ \t]+LIBWOLFSSL_VERSION_STRING[\t ].*")
string(REGEX REPLACE ".*WOLFSSL_VERSION_STRING[\t ]+\"(.*)\"" "\\1" WOLFSSL_VERSION ${_WOLFSSL_VERLINE})

add_library(wolfSSL::wolfssl UNKNOWN IMPORTED)
add_library(wolfssl::wolfssl UNKNOWN IMPORTED)

set_target_properties(wolfSSL::wolfssl PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${WOLFSSL_INCLUDE_DIR}")
set_target_properties(wolfSSL::wolfssl PROPERTIES IMPORTED_LOCATION "${WOLFSSL_LIBRARY}")
set_target_properties(wolfssl::wolfssl PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${WOLFSSL_INCLUDE_DIR}")
set_target_properties(wolfssl::wolfssl PROPERTIES IMPORTED_LOCATION "${WOLFSSL_LIBRARY}")

set(wolfSSL_TARGET wolfssl::wolfssl)

Expand Down
Loading