diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 895ed7b171..c4a1ff3c26 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -10,8 +10,10 @@ jobs: fail-fast: false matrix: abi: [armeabi-v7a, arm64-v8a, x86, x86_64] + stfl_opt: [ON, OFF] + steps: - name: Checkout code uses: actions/checkout@v3 - name: Build project - run: ./scripts/build-android.sh $ANDROID_NDK_HOME -a ${{ matrix.abi }} + run: ./scripts/build-android.sh $ANDROID_NDK_HOME -a ${{ matrix.abi }} -f "-DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=${{ matrix.stfl_opt }}" diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index 1ced2dea76..bd446ba694 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -10,10 +10,13 @@ jobs: fail-fast: false matrix: platform: [OS64, TVOS] + stfl_opt: [OFF, ON] steps: - name: Checkout code uses: actions/checkout@v3 - name: Generate project - run: cmake -B build --toolchain .CMake/apple.cmake -DOQS_USE_OPENSSL=OFF -DPLATFORM=${{ matrix.platform }} . + run: | + cmake -B build --toolchain .CMake/apple.cmake -DOQS_USE_OPENSSL=OFF -DPLATFORM=${{ matrix.platform }} \ + -DOQS_ENABLE_SIG_STFL_LMS -DOQS_ENABLE_SIG_STFL_XMSS -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=${{ matrix.stfl_opt }} . - name: Build project run: cmake --build build diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ce0052f78d..a4f0d0a950 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -71,15 +71,19 @@ jobs: include: - name: alpine container: openquantumsafe/ci-alpine-amd64:latest - CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON + CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON + PYTEST_ARGS: --ignore=tests/test_alg_info.py + - name: alpine-no-stfl-key-sig-gen + container: openquantumsafe/ci-alpine-amd64:latest + CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=OFF -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON PYTEST_ARGS: --ignore=tests/test_alg_info.py - name: alpine-openssl-all container: openquantumsafe/ci-alpine-amd64:latest - CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON -DOQS_USE_AES_OPENSSL=ON -DOQS_USE_SHA2_OPENSSL=ON -DOQS_USE_SHA3_OPENSSL=ON + CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=ON -DBUILD_SHARED_LIBS=ON -DOQS_USE_AES_OPENSSL=ON -DOQS_USE_SHA2_OPENSSL=ON -DOQS_USE_SHA3_OPENSSL=ON -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON PYTEST_ARGS: --ignore=tests/test_alg_info.py - name: alpine-noopenssl container: openquantumsafe/ci-alpine-amd64:latest - CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=OFF + CMAKE_ARGS: -DOQS_STRICT_WARNINGS=ON -DOQS_USE_OPENSSL=OFF -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON PYTEST_ARGS: --ignore=tests/test_alg_info.py - name: focal-nistr4-openssl container: openquantumsafe/ci-ubuntu-focal-x86_64:latest @@ -91,7 +95,11 @@ jobs: PYTEST_ARGS: --ignore=tests/test_leaks.py - name: address-sanitizer container: openquantumsafe/ci-ubuntu-focal-x86_64:latest - CMAKE_ARGS: -DCMAKE_C_COMPILER=clang-9 -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address + CMAKE_ARGS: -DCMAKE_C_COMPILER=clang-9 -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON + PYTEST_ARGS: --ignore=tests/test_distbuild.py --ignore=tests/test_leaks.py --numprocesses=auto --maxprocesses=10 + - name: address-sanitizer-no-stfl-key-sig-gen + container: openquantumsafe/ci-ubuntu-focal-x86_64:latest + CMAKE_ARGS: -DCMAKE_C_COMPILER=clang-9 -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=OFF -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON PYTEST_ARGS: --ignore=tests/test_distbuild.py --ignore=tests/test_leaks.py --numprocesses=auto --maxprocesses=10 container: image: ${{ matrix.container }} @@ -126,7 +134,12 @@ jobs: include: - name: armhf ARCH: armhf - CMAKE_ARGS: -DOQS_ENABLE_SIG_SPHINCS=OFF -DOQS_USE_OPENSSL=OFF -DOQS_OPT_TARGET=generic + CMAKE_ARGS: -DOQS_ENABLE_SIG_SPHINCS=OFF -DOQS_USE_OPENSSL=OFF -DOQS_OPT_TARGET=generic -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON + PYTEST_ARGS: --ignore=tests/test_alg_info.py + include: + - name: armhf-no-stfl-key-sig-gen + ARCH: armhf + CMAKE_ARGS: -DOQS_ENABLE_SIG_SPHINCS=OFF -DOQS_USE_OPENSSL=OFF -DOQS_OPT_TARGET=generic -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=OFF -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_LMS=ON PYTEST_ARGS: --ignore=tests/test_alg_info.py # no longer supporting armel # - name: armel diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 807730a469..6c67c8f560 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -6,10 +6,13 @@ jobs: windows-arm64: runs-on: windows-2022 + strategy: + matrix: + stfl_opt: [ON, OFF] steps: - uses: actions/checkout@v3 - name: Generate Project - run: cmake -B build --toolchain .CMake/toolchain_windows_arm64.cmake . + run: cmake -B build --toolchain .CMake/toolchain_windows_arm64.cmake -DOQS_ENABLE_SIG_STFL_LMS=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=${{ matrix.stfl_opt }} . - name: Build Project run: cmake --build build @@ -19,10 +22,11 @@ jobs: fail-fast: false matrix: toolchain: [.CMake/toolchain_windows_x86.cmake, .CMake/toolchain_windows_amd64.cmake] + stfl_opt: [ON, OFF] steps: - uses: actions/checkout@v3 - name: Generate Project - run: cmake -B build --toolchain ${{ matrix.toolchain }} . + run: cmake -B build --toolchain ${{ matrix.toolchain }} -DOQS_ENABLE_SIG_STFL_LMS=ON -DOQS_ENABLE_SIG_STFL_XMSS=ON -DOQS_ENABLE_SIG_STFL_KEY_SIG_GEN=${{ matrix.stfl_opt }} . - name: Build Project run: cmake --build build - name: Test dependencies diff --git a/scripts/build-android.sh b/scripts/build-android.sh index 574c8d8ea4..d3a9d6b3c3 100755 --- a/scripts/build-android.sh +++ b/scripts/build-android.sh @@ -6,12 +6,13 @@ set -e show_help() { echo "" - echo " Usage: ./build-android -a [abi] -b [build-directory] -s [sdk-version]" + echo " Usage: ./build-android -a [abi] -b [build-directory] -s [sdk-version] -f [extra-cmake-flags]" echo " ndk-dir: the directory of the Android NDK (required)" echo " abi: the Android ABI to target for the build" echo " build-directory: the directory in which to build the project" echo " sdk-version: the minimum Android SDK version to target" + echo " extra-cmake-flags: extra flags to use for CMake configuration" echo "" exit 0 } @@ -52,12 +53,13 @@ MINSDKVERSION=21 BUILDDIR="build" OPTIND=2 -while getopts "a:s:b:" flag +while getopts "a:s:b:f:" flag do case $flag in a) ABI=$OPTARG;; s) MINSDKVERSION=$OPTARG;; b) BUILDDIR=$OPTARG;; + f) EXTRAFLAGS="$OPTARG";; *) exit 1 esac done @@ -107,7 +109,10 @@ cmake .. -DOQS_USE_OPENSSL=OFF \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_TOOLCHAIN_FILE="$NDK"/build/cmake/android.toolchain.cmake \ -DANDROID_ABI="$ABI" \ - -DANDROID_NATIVE_API_LEVEL="$MINSDKVERSION" + -DANDROID_NATIVE_API_LEVEL="$MINSDKVERSION" \ + -DOQS_ENABLE_SIG_STFL_LMS \ + -DOQS_ENABLE_SIG_STFL_XMSS \ + $EXTRAFLAGS cmake --build ./ # Provide rudimentary information following build