Skip to content

Commit

Permalink
Fix a missing -DOQS_PROVIDER_BUILD_STATIC=ON in CircleCI build stat…
Browse files Browse the repository at this point in the history
…ic jobs. (#242)

A `-DOQS_PROVIDER_BUILD_STATIC=ON` was missing on two jobs (one for linux
and one for macOS).

This commit fixes that issue, and also adds a test to verify that `oqsprovider.a`
was built if static build was requested.
  • Loading branch information
thb-sb authored Aug 31, 2023
1 parent b6da1e9 commit dccb133
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ jobs:
- run:
name: Build OQS-OpenSSL provider (<< parameters.CMAKE_ARGS >> with QSC encoding support)
command: |
mkdir _build && cd _build && cmake -GNinja << parameters.CMAKE_ARGS >> -DUSE_ENCODING_LIB=ON -DOPENSSL_ROOT_DIR=$(pwd)/../.local -DCMAKE_PREFIX_PATH=$(pwd)/../.local .. && ninja && cd ..
oqsprovider_cmake_args="<< parameters.CMAKE_ARGS >>"
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
oqsprovider_cmake_args="${oqsprovider_cmake_args} -DOQS_PROVIDER_BUILD_STATIC=ON"
fi
mkdir _build && cd _build && cmake -GNinja ${oqsprovider_cmake_args} -DUSE_ENCODING_LIB=ON -DOPENSSL_ROOT_DIR=$(pwd)/../.local -DCMAKE_PREFIX_PATH=$(pwd)/../.local .. && ninja && cd ..
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
file _build/lib/oqsprovider.a
fi
- when:
condition:
equal: [ openssl@3, << parameters.OPENSSL_PREINSTALL >> ]
Expand All @@ -69,7 +76,10 @@ jobs:
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
oqsprovider_cmake_args="${oqsprovider_cmake_args} -DOQS_PROVIDER_BUILD_STATIC=ON"
fi
mkdir _build && cd _build && cmake -GNinja ${oqsprovider_cmake_args} -DUSE_ENCODING_LIB=ON -DCMAKE_PREFIX_PATH=$(pwd)/../.local .. && ninja && cd ..
mkdir _build && cd _build && cmake -GNinja ${oqsprovider_cmake_args} -DUSE_ENCODING_LIB=ON -DCMAKE_PREFIX_PATH=$(pwd)/../.local .. && ninja && cd ..
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
file _build/lib/oqsprovider.a
fi
- run:
name: Run tests
command: |
Expand All @@ -93,7 +103,14 @@ jobs:
- run:
name: Build OQS-OpenSSL provider (<< parameters.CMAKE_ARGS >>) with NOPUBKEY_IN_PRIVKEY and QSC encoding support
command: |
rm -rf _build && mkdir _build && cd _build && cmake -GNinja << parameters.CMAKE_ARGS >> -DNOPUBKEY_IN_PRIVKEY=ON -DUSE_ENCODING_LIB=ON -DOPENSSL_ROOT_DIR=$(pwd)/../.local -DCMAKE_PREFIX_PATH=$(pwd)/../.local .. && ninja
oqsprovider_cmake_args="<< parameters.CMAKE_ARGS >>"
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
oqsprovider_cmake_args="${oqsprovider_cmake_args} -DOQS_PROVIDER_BUILD_STATIC=ON"
fi
rm -rf _build && mkdir _build && cd _build && cmake -GNinja ${oqsprovider_cmake_args} -DNOPUBKEY_IN_PRIVKEY=ON -DUSE_ENCODING_LIB=ON -DOPENSSL_ROOT_DIR=$(pwd)/../.local -DCMAKE_PREFIX_PATH=$(pwd)/../.local .. && ninja
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
file _build/lib/oqsprovider.a
fi
- run:
name: Run tests (-DNOPUBKEY_IN_PRIVKEY=ON)
command: |
Expand Down Expand Up @@ -164,15 +181,25 @@ jobs:
oqsprovider_cmake_args="${oqsprovider_cmake_args} -DOQS_PROVIDER_BUILD_STATIC=ON"
fi
export OPENSSL_INSTALL=$(pwd)/.local && mkdir _build && cd _build && cmake -GNinja -DOPENSSL_ROOT_DIR=$OPENSSL_INSTALL -DCMAKE_PREFIX_PATH=$(pwd)/../.local ${oqsprovider_cmake_args} .. && ninja && echo "export OPENSSL_INSTALL=$OPENSSL_INSTALL" >> "$BASH_ENV"
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
file _build/lib/oqsprovider.a
fi
- when:
condition:
equal: [ [email protected], << parameters.OPENSSL_PREINSTALL >> ]
steps:
- run:
name: Build OQS-OpenSSL provider
command: |
oqsprovider_cmake_args="<< parameters.CMAKE_ARGS >>"
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
oqsprovider_cmake_args="${oqsprovider_cmake_args} -DOQS_PROVIDER_BUILD_STATIC=ON"
fi
export OPENSSL_INSTALL="$(brew --prefix << parameters.OPENSSL_PREINSTALL >>)"
mkdir _build && cd _build && liboqs_DIR=`pwd`/../.local cmake -GNinja -DOPENSSL_ROOT_DIR="${OPENSSL_INSTALL}" .. && ninja && echo "export OPENSSL_INSTALL=$OPENSSL_INSTALL" >> "$BASH_ENV" && cd .. && echo "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$OPENSSL_INSTALL/lib" >> "$BASH_ENV"
mkdir _build && cd _build && liboqs_DIR=`pwd`/../.local cmake -GNinja -DOPENSSL_ROOT_DIR="${OPENSSL_INSTALL}" ${oqsprovider_cmake_args} .. && ninja && echo "export OPENSSL_INSTALL=$OPENSSL_INSTALL" >> "$BASH_ENV" && cd .. && echo "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$OPENSSL_INSTALL/lib" >> "$BASH_ENV"
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
file _build/lib/oqsprovider.a
fi
- run:
name: Run tests
command: |
Expand All @@ -189,6 +216,9 @@ jobs:
oqsprovider_cmake_args="${oqsprovider_cmake_args} -DOQS_PROVIDER_BUILD_STATIC=ON"
fi
rm -rf _build && mkdir _build && cd _build && cmake -GNinja -DUSE_ENCODING_LIB=ON -DOPENSSL_ROOT_DIR=$OPENSSL_INSTALL -DCMAKE_PREFIX_PATH=$(pwd)/../.local ${oqsprovider_cmake_args} .. && ninja
if << parameters.OQS_PROVIDER_BUILD_STATIC >> ; then
file _build/lib/oqsprovider.a
fi
- run:
name: Run tests
command: |
Expand Down

0 comments on commit dccb133

Please sign in to comment.